跳到主要内容

PATCH – 对更新服务状态进行更新

使用 PATCH 方法对更新服务资源属性和状态进行更新。

请求 URL

PATCH https://<BMC_IPADDR>/redfish/v1/UpdateService

请求正文

字段类型描述

HttpPushUriTargets

数组

项:字符串

项数:0-1

 

HttpPushUriTargets[N]

字符串指示将更新映像应用到何处的 URI 数组。此值最初为空白,并且在 XCC2 重置后不会保留客户端更新的值。

HttpPushUriTargetsBusy

布尔指示是否有任何客户端保留了 HttpPushUriTargets 属性。此值最初为 false,并且在 XCC2 重置后不保留。

VerifyRemoteServerCertificate

布尔如果此属性设置为 true,则在发送传输请求之前此服务是否会验证 SimpleUpdate 中 ImageURI 属性引用的 HTTPS 服务器的证书。

HttpPushUriOptions

对象已展开
 

HttpPushUriApplyTime

对象已展开
  

ApplyTime

字符串

在通过 HTTP 推送更新执行固件更新之前,需要设置此属性。如果值为“Immediate”,则固件更新流程将在上传映像后立即启动。如果值为“Oneset”,则此流程在上传映像后将处于暂挂状态,并将在主机引导或重新启动时继续。

该设置将跨 XCC2 电源周期保留。

响应

响应返回的内容与 GET 操作相同,但更新了属性。

状态代码

HTTP 状态代码错误消息 ID
500InternalError

示例

以下示例是 PATCH 正文

{
"HttpPushUriTargets" : [
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
]
}

成功运行 PATCH 操作后,更新服务资源查询将返回以下示例 JSON 响应:

{
"RemoteServerCertificates": {
"@odata.id": "/redfish/v1/UpdateService/RemoteServerCertificates"
},
"HttpPushUriTargets": [
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
],
"FirmwareInventory": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory"
},
"ServiceEnabled": true,
"MultipartHttpPushUri@Redfish.OperationApplyTimeSupport": {
"@odata.type": "#Settings.v1_3_4.OperationApplyTimeSupport",
"SupportedValues": [
"Immediate",
"OnReset",
"OnStartUpdateRequest"
]
},
"@odata.type": "#UpdateService.v1_11_0.UpdateService",
"@odata.id": "/redfish/v1/UpdateService",
"Actions": {
"#UpdateService.SimpleUpdate": {
"target": "/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate",
"title": "SimpleUpdate",
"Targets@Redfish.AllowableValues": [
"/redfish/v1/UpdateService/FirmwareInventory/BMC-Backup"
],
"TransferProtocol@Redfish.AllowableValues": [
"TFTP",
"SFTP",
"HTTPS",
"HTTP"
],
"@Redfish.ActionInfo": "/redfish/v1/UpdateService/SimpleUpdateActionInfo",
"@Redfish.OperationApplyTimeSupport": {
"@odata.type": "#Settings.v1_3_4.OperationApplyTimeSupport",
"SupportedValues": [
"Immediate",
"OnReset",
"OnStartUpdateRequest"
]
}
},
"Oem": {
"#LenovoUpdateService.BundleRollback": {
"target": "/redfish/v1/UpdateService/Actions/Oem/LenovoUpdateService.BundleRollback",
"title": "BundleRollback"
},
"#LenovoUpdateService.UpdateFromRepository": {
"target": "/redfish/v1/UpdateService/Actions/Oem/LenovoUpdateService.UpdateFromRepository",
"title": "UpdateFromRepository"
},
"#LenovoUpdateService.GetRepoUpdateDetail": {
"target": "/redfish/v1/UpdateService/Actions/Oem/LenovoUpdateService.GetRepoUpdateDetail",
"title": "GetRepoUpdateDetail"
}
},
"#UpdateService.StartUpdate": {
"target": "/redfish/v1/UpdateService/Actions/UpdateService.StartUpdate",
"title": "StartUpdate",
"@Redfish.ActionInfo": "/redfish/v1/UpdateService/StartUpdateActionInfo"
}
},
"MaxImageSizeBytes": 250000000,
"HttpPushUriOptions": {
"HttpPushUriApplyTime": {
"ApplyTime": "Immediate",
"ApplyTime@Redfish.AllowableValues": [
"Immediate",
"OnReset"
]
}
},
"@odata.etag": "\"12fc6cd9e7d7735944e43b\"",
"HttpPushUri": "/fwupdate",
"MultipartHttpPushUri": "/mfwupdate",
"Description": "Lenovo firmware update service.",
"HttpPushUriTargetsBusy": false,
"Name": "Update Service",
"Oem": {
"Lenovo": {
"BundleRepoAvailableSpaceInKB": 2004634,
"FirmwareServices": {
"@odata.id": "/redfish/v1/UpdateService/Oem/Lenovo/FirmwareServices"
},
"@odata.type": "#LenovoUpdateService.v1_0_0.LenovoUpdateService"
}
},
"VerifyRemoteServerCertificate": false,
"@odata.context": "/redfish/v1/$metadata#UpdateService.UpdateService",
"Status": {
"HealthRollup": "OK",
"State": "Enabled",
"Health": "OK"
},
"Id": "UpdateService"
}