mixe mixed up dataclass

This commit is contained in:
2026-01-30 15:15:01 +01:00
parent 9bedf0c799
commit d8fc5cd8b8

View File

@@ -392,7 +392,8 @@ async def get_power_data(session, host: HostConfig):
# Start time measurement # Start time measurement
start = time.monotonic() start = time.monotonic()
# Get Root ressources
# Get root ressources
resources = await discover_redfish_resources(session, host) resources = await discover_redfish_resources(session, host)
if not resources or not resources.chassis: if not resources or not resources.chassis:
logging.error("Could not discover any resources for %s", host.fqdn) logging.error("Could not discover any resources for %s", host.fqdn)
@@ -403,7 +404,7 @@ async def get_power_data(session, host: HostConfig):
host.mark_success() host.mark_success()
UP_GAUGE.labels(host=host.fqdn).set(1) UP_GAUGE.labels(host=host.fqdn).set(1)
chassis_url = resources.get("Chassis") chassis_url = f"https://{host.fqdn}{resources.chassis}"
chassis_data = await fetch_with_retry(session, host, chassis_url) chassis_data = await fetch_with_retry(session, host, chassis_url)
if not chassis_data: if not chassis_data:
host.mark_failure() host.mark_failure()