PATCH – 更新安全引导属性
使用 PATCH 方法更新 Redfish 服务的 SecureBoot 资源中的属性。
请求 URL
PATCH https://<BMC_IPADDR>/redfish/v1/Systems/1/SecureBoot
请求正文
要更新的属性如下所示。
字段 | 类型 | 描述 |
---|---|---|
SecureBootEnable | 字符串 | 启用或禁用 UEFI 安全引导(在下次引导时生效)。 XCC2 将在收到此命令时在内部执行 RPP 断言。 如果成功断言 RPP,则返回代码 200 + @Message.ExtendedInfo “RebootRequired”: "RebootRequired": { "Description": "Indicates that one or more properties were changed, and/or actions completed successfully.However, these changes will not take effect until the next system reboot.", "Message": "Changes completed successfully, but these changes will not take effect until next reboot.", "Severity": "Warning", "NumberOfArgs": 0, "ParamTypes": [], "Resolution": "Reboot the computer system for the changes to take effect." } 否则,返回 代码 200 + @Message.ExtendedInfo“PhysicalPresenceError”:"PhysicalPresenceError": { "Description": "The operation failed because Physical Presence or Remote Physical Presence was not asserted.", "Message": " The operation failed because of Remote Physical Presence security requirements.", "Severity": "Warning", "NumberOfArgs": 0, "ParamTypes": [], "Resolution": "Attempt asserting Physical Presence or Remote Physical Presence, and retry the operation." } |
响应正文
响应返回的内容与 GET 操作相同,但更新了属性。
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
200 | RebootRequired |
403 | InsufficientPrivilege |
500 | InternalError |
响应示例
以下示例是 PATCH 正文。
{
"SecureBootEnable": true
}
获取以下响应:
{
"SecureBootCurrentBoot": "Disabled",
"@odata.id": "/redfish/v1/Systems/1/SecureBoot",
"Name": "Secure Boot",
"@odata.context": "/redfish/v1/$metadata#SecureBoot.SecureBoot",
"Id": "SecureBoot",
"@odata.type": "#SecureBoot.v1_0_4.SecureBoot",
"SecureBootEnable": true,
"SecureBootMode": "SetupMode",
"@odata.etag": "\"95230d5e00821715e4de6085f28c564e\"",
"Actions": {
"#SecureBoot.ResetKeys": {
"target": "/redfish/v1/Systems/1/SecureBoot/Actions/SecureBoot.ResetKeys",
"title": "ResetKeys",
"@Redfish.ActionInfo": "/redfish/v1/Systems/1/SecureBoot/ResetKeysActionInfo"
}
},
"Description": "UEFI Secure Boot Configuration",
"@Message.ExtendedInfo": [
{
"MessageArgs": [],
"Resolution": "Reboot the computer system for the changes to take effect.",
"MessageId": "ExtendedError.1.1.RebootRequired",
"Severity": "Warning",
"Message": "Changes completed successfully, but these changes will not take effect until next reboot.",
"@odata.type": "#Message.v1_0_6.Message"
}
]
}