背景
硬件发生故障需要更换备件时,需要人工从官网下载配套的固件,且固件可能有多个,固件升级易出错且效率低,如果有特殊配置,还需要手动进行配置备份和恢复,效率低。
运维人员希望能够在备件更换时,固件自动升级,配置自动恢复,无需人工操作。因此需要固件管理提供本地固件仓,在备件更换时能自动升级的机制
关联ISSUE
暂无
整体方案
- Redfish串行升级接口支持添加本地固件仓固件评审;
- Redfish接口支持获取本地固件仓容量信息评审;
- Redfish接口支持查询本地固件仓评审
- Redfish接口支持删除本地固件仓固件评审;
- 支持添加/更新、删除、查询本地固件仓固件、展示本地固件仓容量信息Web界面评审
- UIRest升级接口支持添加本地固件仓固件评审;
- UIRest接口支持获取本地固件仓容量信息评审;
- UIRest接口支持查询本地固件仓评审
- UIRest接口支持删除和生效本地固件仓固件评审;
评审点一 Redfish串行升级接口支持添加本地固件仓固件评审
详细描述
串行升级支持添加/更新本地固件仓
URI: /redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate
操作类型:POST
操作权限: BasicSetting
变更类型:请求中新增标准属性参数LocalImage
请求参数:
{
…
“ImageURI”: “/tmp/BIOS.hpm”, // 固件URI
“LocalImage”: true // 表征当前固件升级时会同时添加到本地固件仓
…
}
响应参数:保持不变,使用Task进行返回
| 参数 | 类型 | 取值 | 可选/必选 | 备注 |
|---|---|---|---|---|
| LocalImage | boolean | true/false | 可选 | 指示本次升级是否将该固件添加到本地固件仓 |
Schema定义 :
"LocalImage":{
"description": "An indication of whether the service adds the image to the local image store.",
"longDescription": "This parameter shall indicate whether the service adds the image to the resource collection referenced by the LocalImageStore property. If the client does not provide this parameter, the service shall default this value to false .",
"type": [
"boolean",
"null"
]
}
并行升级支持添加/更新本地固件仓
URI: /redfish/v1/UpdateService/Actions/Oem/Huawei/UpdateService.ParallelUpdate
操作类型:POST
操作权限: BasicSetting
变更类型:请求中新增标准属性参数LocalImage
请求参数:
{
“Packages”:[
{
…
“ImageURI”: “/tmp/BMC.hpm”, // 固件URI
“LocalImage”: true // 表征当前固件升级时会同时添加到本地固件仓
…
},
...
]
}
响应参数:保持不变,使用Task进行返回
| 参数 | 类型 | 取值 | 可选/必选 | 备注 |
|---|---|---|---|---|
| LocalImage | boolean | true/false | 可选 | 指示本次升级是否将该固件添加到本地固件仓 |
Schema定义 :
"LocalImage":{
"description": "An indication of whether the service adds the image to the local image store.",
"longDescription": "This parameter shall indicate whether the service adds the image to the resource collection referenced by the LocalImageStore property. If the client does not provide this parameter, the service shall default this value to false .",
"type": [
"boolean",
"null"
]
}
评审点二 Redfish接口支持获取本地固件仓容量信息(UpdateService资源新增标准属性)
详细描述
资源URI:/redfish/v1/UpdateService
资源版本:UpdateService.v1_17_0
属性列表:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| LocalImageStore | object | true | 否 | 否 | ReadOnly | 本地固件仓的清单。此属性应包含指向资源集合的链接,该资源集合的类型为 SoftwareInventoryCollection。该资源集合应包含本地固件仓的集合 Link资源:/redfish/v1/UpdateService/LocalImageStore |
|
| @odata.id | string | true | 否 | 否 | ReadOnly | /redfish/v1/UpdateService/LocalImageStore | |
| LocalImageStoreAvailableCapacityBytes | integer | true | 否 | 否 | ReadOnly | 本地固件仓当前可用的字节数 | |
| LocalImageStoreTotalCapacityBytes | integer | true | 否 | 否 | ReadOnly | 本地固件仓当前的总字节数 |
Schema定义 :
"LocalImageStore": {
"$ref": "http://redfish.dmtf.org/schemas/v1/SoftwareInventoryCollection.json#/definitions/SoftwareInventoryCollection"
"description": "An inventory of locally stored images.",
"longDescription": "This property shall contain a link to a resource collection of type SoftwareInventoryCollection . The resource collection shall contain the set of images that are stored locally by the service. This may include operating system images, drivers, or other software components. These images may be referenced by other features of the service, such as virtual media.",
"readonly": true
},
"LocalImageStoreAvailableCapacityBytes": {
"description": "The number of bytes currently available in the local image store.",
"longDescription": "This property shall contain the number of bytes currently available in the local image store.",
"readonly": true,
"type": [
"integer",
"null"
],
"versionAdded": "v1_17_0"
},
"LocalImageStoreAvailableCapacityBytes": {
"description": "The total number of bytes available to the local image store.",
"longDescription": "This property shall contain the total number of bytes available to the local image store.",
"readonly": true,
"type": [
"integer",
"null"
],
"versionAdded": "v1_17_0"
}
评审点三 Redfish接口支持查询本地固件仓信息评审(新增LocalImageStore标准资源)
详细描述
资源URI:/redfish/v1/UpdateService/LocalImageStore/{SoftwareInventoryId}
资源版本:SoftwareInventory.v1.13.0
属性列表:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| Id | string | 示例:ActiveBMC |
true | 否 | 否 | ReadOnly | |
| Name | string | 示例:ActiveBMC |
true | 否 | 否 | ReadOnly | |
| Status | object | true | 否 | 否 | ReadOnly | 资源及其子资源的状态和健康状况 | |
| State | string | 枚举值:“Enabled”, “Disabled”, “StandbyOffline”, “StandbySpare”, “InTest”, “Starting”, “Absent”, “UnavailableOffline”, “Deferring”, “Quiesced”, “Updating”, “Qualified”, “Degraded” | true | 否 | 否 | ReadOnly | |
| Health | string | 枚举值:“OK”, “Warning”, “Critical” | true | 否 | 否 | ReadOnly | 固件的健康状况 |
| Version | string | 示例:5.13.00.02 |
true | 否 | 否 | ReadOnly | 表示此固件版本 |
| ReleaseDate | string(date-time) | 示例:2026-04-07T21:34:31Z |
true | 否 | 否 | ReadOnly | 软件的发布日期 |
| Updateable | boolean | true/false | true | 否 | 否 | ReadOnly | 标识此软件是否可以通过升级进行更新 |
| RelatedItem | array | true | 否 | 否 | ReadOnly | 固件清单 | |
| SoftwareId | string | true | 否 | 否 | ReadOnly | 标识此软件的ID | |
| Staged | boolean | true/false | true | 否 | 否 | ReadOnly | 固件是否暂存 |
Schema定义 :
softwareinventorycollection.json
"uris": [
"/redfish/v1/UpdateService/LocalImageStore"
]
softwareinventory.json
"uris": [
"/redfish/v1/UpdateService/LocalImageStore/{id}"
]
属性定义:rackmount/softwareinventory.v1_12_0.json
评审点四 接口支持删除本地固件仓固件评审(LocalImageStore资源新增Delete操作)
详细描述
删除本地固件仓接口
资源URI:/redfish/v1/UpdateService/LocalImageStore/{SoftwareInventoryId}
资源版本:SoftwareInventory.v1.13.0
操作类型 :Delete
操作权限 :BasicSetting
输入参数 :NA
响应参数 :使用Task进行返回
响应参数示例
{
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"Id": "1",
"Name": "Init",
"TaskState": "Running",
"StartTime": "2026-04-07T23:51:58+00:00",
"Messages": [],
"Oem": {
"Huawei": {
"TaskPercentage": null
}
}
}
Schema定义 :
"uris": [
"/redfish/v1/UpdateService/LocalImageStore/{id}"
]
评审点五 支持添加/更新、删除、查询本地固件仓固件、展示本地固件仓容量信息Web界面评审
详细描述
内部图片无法上传,评审时展示
评审点六 UIRest升级接口支持添加本地固件仓固件评审
详细描述
串行升级支持添加/更新本地固件仓
URI: /UI/Rest/BMCSettings/UpdateService/FirmwareUpdate
操作类型:POST
操作权限: BasicSetting
变更类型:请求中新增参数LocalImage
请求说明:
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"FilePath": {
"Required": true,
"Type": "string"
},
"LocalImage": {
"Type": "boolean",
},
......
}
},
| 参数 | 类型 | 取值 | 可选/必选 | 备注 |
|---|---|---|---|---|
| LocalImage | boolean | true/false | 可选 | 指示本次升级是否将该固件添加到本地固件仓 |
并行升级支持添加/更新本地固件仓
URI: /UI/Rest/BMCSettings/UpdateService/ParallelUpdate
操作类型:POST
操作权限: BasicSetting
变更类型:请求中新增标准属性参数LocalImage
请求参数:
"ReqBody": {
"Type": "object",
"Required": true,
"Properties": {
"FilePath": {
"Required": true,
"Type": "string"
},
"LocalImage": {
"Type": "boolean",
},
......
}
}
| 参数 | 类型 | 取值 | 可选/必选 | 备注 |
|---|---|---|---|---|
| LocalImage | boolean | true/false | 可选 | 指示本次升级是否将该固件添加到本地固件仓 |
评审点七 UIRest接口支持获取本地固件仓容量信息评审
详细描述
URI:/UI/Rest/BMCSettings/UpdateService
操作类型:POST
变更点:新增属性LocalImageStoreAvailableCapacityBytes、LocalImageStoreTotalCapacityBytes
请求说明:NA
新增响应说明:
| 属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|
| LocalImageStoreAvailableCapacityBytes | integer | true | 否 | 否 | ReadOnly | 本地固件仓当前可用的字节数 | |
| LocalImageStoreTotalCapacityBytes | integer | true | 否 | 否 | ReadOnly | 本地固件仓当前的总字节数 |
评审点八 UIRest接口支持查询本地固件仓评审
详细描述
URI: /UI/Rest/BMCSettings/UpdateService/LocalImageStore
操作类型:Get
变更点:新增URI
说明:UIRest查询本地固件仓固件接口
请求说明:NA
响应说明
| 属性名 | 类型 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|
| LocalImages | Array | true | 否 | 否 | ReadOnly | 本地固件仓固件信息集合,详细内容见LocalImages说明 |
LocalImages内属性说明
| 属性名 | 类型 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|
| Id | string | true | 否 | 否 | ReadOnly | 固件Id |
| FileName | string | true | 否 | 否 | ReadOnly | 固件包名称 |
| FirmwareType | string | true | 否 | 否 | ReadOnly | 固件类型 |
| Version | string | true | 否 | 否 | ReadOnly | 固件版本 |
| FirmwareSize | string | true | 否 | 否 | ReadOnly | 固件大小,单位KB |
评审点九 UIRest接口支持删除和生效本地固件仓固件评审
详细描述
删除本地固件仓接口
URI: /UI/Rest/BMCSettings/UpdateService/LocalImageStore/:Id
操作类型:DELETE
变更点:新增URI
说明:UIRest删除本地固件仓固件接口
请求说明: NA
响应说明:NA
生效本地固件仓接口
URI: /UI/Rest/BMCSettings/UpdateService/LocalImageStore/:Id
操作类型:POST
变更点:新增URI
说明:UIRest删除本地固件仓固件接口
请求说明: NA
响应说明:NA