PATCH – 启用/禁用主机接口
使用 PATCH 方法更新 Redfish 服务的 HostInterface 资源中的属性。
请求 URL
PATCH https://<BMC_IPADDR>/redfish/v1/Managers/1/HostInterfaces/1
响应正文
响应返回的内容与 GET 操作相同,但更新了属性。
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
响应示例
以下示例是 PATCH 正文。
{
"InterfaceEnabled" : false
}
成功运行 PATCH 操作后,主机接口资源查询将返回以下示例 JSON 响应:
{
"HostInterfaceType": "NetworkHostInterface",
"NetworkProtocol": {
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol"
},
"Id": "1",
"InterfaceEnabled": false,
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/1"
}
]
},
"Name": "Host Interface",
"@odata.context": "/redfish/v1/$metadata#HostInterface.HostInterface",
"@odata.etag": "\"3d8fd8e9aa9e2d0aa76f0ac687eecbbd\"",
"@odata.type": "#HostInterface.v1_2_0.HostInterface",
"ManagerEthernetInterface": {
"@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/ToHost"
},
"@odata.id": "/redfish/v1/Managers/1/HostInterfaces/1",
"ExternallyAccessible": false,
"HostEthernetInterfaces": {
"@odata.id": "/redfish/v1/Managers/1/HostInterfaces/1/HostEthernetInterfaces"
},
"Description": "This resource shall be used to represent Host Interface resources as part of the Redfish specification."
}
提供反馈