代码仓
中
FirmwareInventoryCollection
更新时间: 2026/11/04
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/UpdateService/FirmwareInventory

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-可升级固件集合资源模型的OData描述信息
@odata.idstringtrue-可升级固件集合资源的访问路径
@odata.typestringtrue-可升级固件集合资源的类型
Namestringtrue-可升级固件集合资源的名称
Members [ {arraytrue-可升级固件列表
Members[].@odata.idstringtrue-单个可升级固件资源的访问路径
} ]
Members@odata.countnumbertrue-可升级固件的个数

supported_methods ​

  • GET
  • POST

HTTP methods ​

GET ​

命令功能

查询可升级固件集合资源信息

命令格式

URL: https://device_ip/redfish/v1/UpdateService/FirmwareInventory

请求头:

text

X-Auth-Token: 123456789***********************

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
auth_value执行该GET请求时,必须在"Headers"中携带"X-Auth-Token"值用于鉴权可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

无

使用实例

请求样例:

http
GET https://device_ip/redfish/v1/UpdateService/FirmwareInventory

请求头:

text

X-Auth-Token: 123456789***********************

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#UpdateService/FirmwareInventory/$entity",
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory",
"@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection",
"Name": "FirmwareInventory Module Collection",
"Members@odata.count": 9,
"Members": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ActiveBMC"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BackupBMC"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/ActiveUboot"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BackupUboot"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/Bios"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/chassisPSU2"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/MainBoardCPLD"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/chassisBC11THBICPLD"
},
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/SDController"
}
]
}

响应码:200

POST (CREATE) ​

命令功能

文件上传

说明

通过redfish接口进行文件上传,上传成功后文件被放在/tmp/web目录下

命令格式

URL:https://device_ip/redfish/v1/UpdateService/FirmwareInventory

请求头:

text
X-Auth-Token: 123456789***********************
Content-Type: header_type
EncryptedUpload: encrypted_upload

请求消息选择表单形式:

html
<form enctype="multipart/form-data" action="https://device_ip/redfish/v1/UpdateService/FirmwareInventory" method="POST">
<input name="imgfile" type="file">
<input type="submit" value="uploadfile">
</form>

表单控件说明:

控件功能说明
imgfile文件选择控件,用于选择上传的文件V3单板允许的文件类型如下:{"hpm","cer","pem","cert","crt","pfx","p12","xml","keys","pub","crl","json"}
V5单板允许的文件类型如下:{"hpm","zip","asc","cer","pem","cert","crt","pfx","p12","xml","keys","pub","keytab","crl","json"}
V3单板hpm文件最大允许110M,v5单板hpm、zip、asc文件最大允许90M。cer、pem、cert、crt、xml、p12、keytab、crl文件最大允许1M,pfx、keys、json文件最大允许2M,pub文件最大允许2KB

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
encrypted_upload表示文件上传后是否需要加密保存如果文件上传后无需加密保存,则无需指定该请求头或者取值为false;如果取值为true,则文件会加密保存。
● true
● false
说明
openUBMC 25.12 LTS及以上版本支持
EncryptedUpload头用于敏感文件上传场景,最大允许上传1M大小的文件,目前仅用于Kerberos控制器秘钥表文件的上传

使用指南

无

使用实例

请求样例1:上传普通文件

http
POST https://device_ip/redfish/v1/UpdateService/FirmwareInventory

请求头:

text
X-Auth-Token: 123456789***********************
Content-Type: multipart/form-data; boundary=xxxx

请求消息体:

html
<form enctype="multipart/form-data" action="https://device_ip/redfish/v1/UpdateService/FirmwareInventory" method="POST">
<input name="imgfile" type="file">
<input type="submit" value="uploadfile">
</form>

响应样例:

json
{
"error": {
"code": "Base.1.0.GeneralError",
"Message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.0.1.0.Success",
"RelatedProperties": [],
"Message": "Successfully Completed Request.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": ""
}
]
}
}

响应码:202

请求样例2:上传Kerberos控制器秘钥表文件

http
POST https://device_ip/redfish/v1/UpdateService/FirmwareInventory

请求头:

text

X-Auth-Token: 123456789***********************
Content-Type: multipart/form-data; boundary=xxxx
EncryptedUpload: true

请求消息体:

html
<form enctype="multipart/form-data" action="https://device_ip/redfish/v1/UpdateService/FirmwareInventory" method="POST">
<input name="imgfile" type="file">
<input type="submit" value="uploadfile">
</form>

响应样例:

json
{
"error": {
"code": "Base.1.0.GeneralError",
"Message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "iBMC.0.1.0.Success",
"RelatedProperties": [],
"Message": "Successfully Completed Request.",
"MessageArgs": [],
"Severity": "OK",
"Resolution": ""
}
]
}
}

响应码:202