in cookbooks/aws-parallelcluster-computefleet/files/clusterstatusmgtd/clusterstatusmgtd.py [0:0]
def _get_basic_config(self, config):
"""Get basic config options."""
self.region = config.get("clusterstatusmgtd", "region")
self.cluster_name = config.get("clusterstatusmgtd", "cluster_name")
self.dynamodb_table = config.get("clusterstatusmgtd", "dynamodb_table")
self.computefleet_status_path = config.get("clusterstatusmgtd", "computefleet_status_path")
self.logging_config = config.get(
"clusterstatusmgtd", "logging_config", fallback=self.DEFAULTS.get("logging_config")
)
self.loop_time = config.getint("clusterstatusmgtd", "loop_time", fallback=self.DEFAULTS.get("loop_time"))
self.update_event_timeout_minutes = config.getint(
"clusterstatusmgtd",
"update_event_timeout_minutes",
fallback=self.DEFAULTS.get("update_event_timeout_minutes"),
)
# Configure boto3 to retry 1 times by default
self._boto3_retry = config.getint("clusterstatusmgtd", "boto3_retry", fallback=self.DEFAULTS.get("max_retry"))
self._boto3_config = {"retries": {"max_attempts": self._boto3_retry, "mode": "standard"}}
# Configure proxy
proxy = config.get("clusterstatusmgtd", "proxy", fallback=self.DEFAULTS.get("proxy"))
if proxy != "NONE":
self._boto3_config["proxies"] = {"https": proxy}
self.boto3_config = Config(**self._boto3_config)