feat&fix: add logging for setup function calls and include snapshot name in AWS provider configuration

This commit is contained in:
adlsdztony
2025-05-26 20:37:20 +08:00
parent 874878e882
commit 431a762421
2 changed files with 3 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ class SetupController:
# protocol
setup_function: str = "_{:}_setup".format(config_type)
assert hasattr(self, setup_function), f'Setup controller cannot find init function {setup_function}'
logger.info(f"call function {setup_function}")
getattr(self, setup_function)(**parameters)
logger.info("SETUP: %s(%s)", setup_function, str(parameters))
@@ -229,6 +230,7 @@ class SetupController:
headers = {"Content-Type": "application/json"}
try:
logger.info("REQUEST ADDRESS: %s", self.http_server + "/setup" + "/launch")
response = requests.post(self.http_server + "/setup" + "/launch", headers=headers, data=payload)
if response.status_code == 200:
logger.info("Command executed successfully: %s", response.text)

View File

@@ -224,6 +224,7 @@ def test(args: argparse.Namespace, test_all_meta: dict) -> None:
provider_name="aws",
region="us-east-1",
snapshot_name="ami-05e7d7bd279ea4f14",
screen_size=(args.screen_width, args.screen_height),
headless=args.headless,