From ea63b9afa3f326a00aaa867abff3ca8392c95d73 Mon Sep 17 00:00:00 2001 From: paull Date: Mon, 9 Dec 2024 16:43:12 -0800 Subject: [PATCH] test --- lisa/sut_orchestrator/baremetal/ip_power.py | 2 +- lisa/sut_orchestrator/baremetal/schema.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lisa/sut_orchestrator/baremetal/ip_power.py b/lisa/sut_orchestrator/baremetal/ip_power.py index ce10ed5d4c..96faa27998 100644 --- a/lisa/sut_orchestrator/baremetal/ip_power.py +++ b/lisa/sut_orchestrator/baremetal/ip_power.py @@ -35,7 +35,7 @@ class Ip9285(IPPower): def __init__(self, runbook: IPPowerSchema) -> None: super().__init__(runbook) self._request_cmd = ( - f"http://{runbook.hostname}/set.cmd?" + f"http://{runbook.host}/set.cmd?" f"user={runbook.username}+pass=" f"{runbook.password}+cmd=setpower+P6" ) diff --git a/lisa/sut_orchestrator/baremetal/schema.py b/lisa/sut_orchestrator/baremetal/schema.py index 65d8bbb336..39bd365a70 100644 --- a/lisa/sut_orchestrator/baremetal/schema.py +++ b/lisa/sut_orchestrator/baremetal/schema.py @@ -66,6 +66,24 @@ class KeyLoaderSchema(schema.TypedSchema, schema.ExtendableSchemaMixin): type: str = field(default="build", metadata=field_metadata(required=True)) +@dataclass_json() +@dataclass +class BootConfigSchema(schema.TypedSchema, schema.ExtendableSchemaMixin): + type: str = field(default="boot_config", metadata=field_metadata(required=True)) + + +@dataclass_json() +@dataclass +class IPPowerSchema(schema.TypedSchema, schema.ExtendableSchemaMixin): + type: str = field(default="Ip9285", metadata=field_metadata(required=True)) + host: str = "" + username: str = "" + password: str = "" + + def __post_init__(self, *args: Any, **kwargs: Any) -> None: + add_secret(self.password) + + @dataclass_json() @dataclass class ClusterSchema(schema.TypedSchema, schema.ExtendableSchemaMixin):