Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abuabraham-ttd authored Jan 31, 2025
1 parent 87814fa commit 4981327
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/aws/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def _set_confidential_config(self, secret_identifier: str) -> None:
"""Fetches a secret value from AWS Secrets Manager and adds defaults"""

def add_defaults(configs: Dict[str, any]) -> AWSConfidentialComputeConfig:
"""Adds default values to configuration if missing."""
"""Adds default values to configuration if missing. Sets operator_key if only api_token is specified for backward compatibility """
default_capacity = self.__get_max_capacity()
configs.setdefault("operator_key", configs.get("api_token"))
configs.setdefault("enclave_memory_mb", default_capacity["enclave_memory_mb"])
configs.setdefault("enclave_cpu_count", default_capacity["enclave_cpu_count"])
configs.setdefault("debug_mode", False)
configs.setdefault("core_api_token", configs.get("operator_key", ""))
configs.setdefault("optout_api_token", configs.get("operator_key", ""))
configs.setdefault("core_api_token", configs.get("operator_key"))
configs.setdefault("optout_api_token", configs.get("operator_key"))
return configs

region = self.__get_current_region()
Expand Down

0 comments on commit 4981327

Please sign in to comment.