in src/slurm_plugin/clustermgtd.py [0:0]
def _get_basic_config(self, config):
"""Get basic config options."""
self.region = config.get("clustermgtd", "region")
self.cluster_name = config.get("clustermgtd", "cluster_name")
self.dynamodb_table = config.get("clustermgtd", "dynamodb_table")
self.head_node_private_ip = config.get("clustermgtd", "head_node_private_ip")
self.head_node_hostname = config.get("clustermgtd", "head_node_hostname")
self.head_node_instance_id = config.get("clustermgtd", "instance_id", fallback="unknown")
# Configure boto3 to retry 1 times by default
self._boto3_retry = config.getint("clustermgtd", "boto3_retry", fallback=self.DEFAULTS.get("max_retry"))
self._boto3_config = {"retries": {"max_attempts": self._boto3_retry, "mode": "standard"}}
self.loop_time = config.getint("clustermgtd", "loop_time", fallback=self.DEFAULTS.get("loop_time"))
self.disable_all_cluster_management = config.getboolean(
"clustermgtd",
"disable_all_cluster_management",
fallback=self.DEFAULTS.get("disable_all_cluster_management"),
)
self.heartbeat_file_path = config.get("clustermgtd", "heartbeat_file_path")
proxy = config.get("clustermgtd", "proxy", fallback=self.DEFAULTS.get("proxy"))
if proxy != "NONE":
self._boto3_config["proxies"] = {"https": proxy}
self.boto3_config = Config(**self._boto3_config)
self.logging_config = config.get("clustermgtd", "logging_config", fallback=self.DEFAULTS.get("logging_config"))