This commit is contained in:
Maxim Devaev
2023-11-20 07:08:13 +02:00
parent 627f7821ef
commit 0e42e10c29
3 changed files with 7 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ class RedfishApi:
self.__info_manager.get_submanager("meta").get_state(),
])
try:
host = meta_state.get("server", {})["host"]
host = str(meta_state.get("server", {})["host"]) # type: ignore
except Exception:
host = ""
return make_json_response({
@@ -107,7 +107,7 @@ class RedfishApi:
},
"Id": "0",
"HostName": host,
"PowerState": ("On" if atx_state["leds"]["power"] else "Off"),
"PowerState": ("On" if atx_state["leds"]["power"] else "Off"), # type: ignore
}, wrap_result=False)
@exposed_http("POST", "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset")