mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
pikvm/pikvm#1525: Noop redfish system PATCH and boot override
This commit is contained in:
parent
8e2bc47cd3
commit
bf8761baa9
@ -102,14 +102,26 @@ class RedfishApi:
|
|||||||
"Actions": {
|
"Actions": {
|
||||||
"#ComputerSystem.Reset": {
|
"#ComputerSystem.Reset": {
|
||||||
"ResetType@Redfish.AllowableValues": list(self.__actions),
|
"ResetType@Redfish.AllowableValues": list(self.__actions),
|
||||||
"target": "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset"
|
"target": "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset",
|
||||||
|
},
|
||||||
|
"#ComputerSystem.SetDefaultBootOrder": { # https://github.com/pikvm/pikvm/issues/1525
|
||||||
|
"target": "/redfish/v1/Systems/0/Actions/ComputerSystem.SetDefaultBootOrder",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Id": "0",
|
"Id": "0",
|
||||||
"HostName": host,
|
"HostName": host,
|
||||||
"PowerState": ("On" if atx_state["leds"]["power"] else "Off"), # type: ignore
|
"PowerState": ("On" if atx_state["leds"]["power"] else "Off"), # type: ignore
|
||||||
|
"Boot": {
|
||||||
|
"BootSourceOverrideEnabled": "Disabled",
|
||||||
|
"BootSourceOverrideTarget": None,
|
||||||
|
},
|
||||||
}, wrap_result=False)
|
}, wrap_result=False)
|
||||||
|
|
||||||
|
@exposed_http("PATCH", "/redfish/v1/Systems/0")
|
||||||
|
async def __patch_handler(self, _: Request) -> Response:
|
||||||
|
# https://github.com/pikvm/pikvm/issues/1525
|
||||||
|
return Response(body=None, status=204)
|
||||||
|
|
||||||
@exposed_http("POST", "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset")
|
@exposed_http("POST", "/redfish/v1/Systems/0/Actions/ComputerSystem.Reset")
|
||||||
async def __power_handler(self, req: Request) -> Response:
|
async def __power_handler(self, req: Request) -> Response:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user