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

ResourceDefinition ​

uris ​

  • /redfish/v1/Oem/LCNService/LCNDevices/device_id/UpdateService

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-指定UpdateService资源模型的OData描述信息
@odata.idstringtrue-指定UpdateService资源的访问路径
@odata.typestringtrue-指定UpdateService资源的类型
Idstringtrue-指定UpdateService资源ID
Actions {objecttrue-指定UpdateService资源的可执行操作
Actions.#UpdateService.SimpleUpdate {objecttrue-升级指定LCN设备软件
Actions.#UpdateService.SimpleUpdate.targetstringtrue-升级指定LCN设备软件动作的访问路径
Actions.#UpdateService.SimpleUpdate.@Redfish.ActionInfostringtrue-升级指定LCN设备软件参数的查询路径
}
}
Taskstringtrue-升级指定LCN设备软件任务的状态查询路径

supported_methods ​

  • GET
  • POST

HTTP methods ​

GET ​

命令功能

查询指定 LCN 设备升级服务的资源信息

说明

openUBMC 25.12 LTS及以上版本,A800T A3,A800I A3机型支持

命令格式

URL: https://device_ip/redfish/v1/Oem/LCNService/LCNDevices/device_id/UpdateService

请求头:

text

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

请求消息体: 无

参数说明

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

使用指南

无

使用实例

请求样例:

http
GET <https://device_ip/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1/UpdateService>

请求头:

text

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

请求消息体:无

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#LCNUpdateService.LCNUpdateService",
"@odata.id": "/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1/UpdateService",
"@odata.type": "#LCNUpdateService.v1_0_0.LCNUpdateService",
"Id": "LinkBoard1UpdateService",
"Actions": {
"#UpdateService.SimpleUpdate": {
"target": "/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1/UpdateService/Actions/UpdateService.SimpleUpdate",
"@Redfish.ActionInfo": "/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1/UpdateService/SimpleUpdateActionInfo"
}
},
"Task": "/redfish/v1/TaskService/Task/1"
}

响应码:200

POST (ACTION) ​

SimpleUpdate ​

命令功能

升级指定 LCN 设备的系统软件

说明

openUBMC 25.12 LTS及以上版本,A800T A3,A800I A3机型支持

命令格式

URL: https://device_ip/redfish/v1/Oem/LCNService/LCNDevices/device_id/UpdateService/Actions/UpdateService.SimpleUpdate

请求头:

text

X-Auth-Token: 123456789***********************
Content-Type: header_type

请求消息体:

json
{
"ImageURI": image_uri,
"ImageType": image_type
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ImageURILCN设备升级包的文件路径支持的文件传输协议有https、sftp、nfs、cifs、scp,文件格式为cc/pat(不区分大小写)。URI中不应含有"||"、";"、"&&"、"$"、"|"、">>"、">"、"<"等特殊字符,文件名不能超过58个字符
ImageTypeLCN设备升级包的类型● UpdatePackage:软件大包,要求image_uri的文件格式为cc
● PatchPackage:补丁包类型,要求image_uri的文件格式为pat

使用指南

无

使用实例

请求样例:

http
POST <https://device_ip/redfish/v1/Oem/LCNService/LCNDevices/LinkBoard1/UpdateService/Actions/UpdateService.SimpleUpdate>

请求头:

text
X-Auth-Token: ******
Content-Type: application/json

本地升级请求消息体:

json
{
"ImageURI": "/tmp/LCNUpdatePackage.pat",
"ImageType": "PatchPackage"
}

远程升级请求消息体:

json
{
"ImageURI": "sftp://user_name:password@device_ip/LCNUpdatePackage.cc",
"ImageType": "UpdatePackage"
}

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#Task.Task",
"@odata.type": "#Task.v1_0_2.Task",
"@odata.id": "/redfish/v1/TaskService/Tasks/1",
"Id": "1",
"Name": "LCNUpgradeProcessbar",
"Description": "",
"TaskState": "Running",
"TaskStatus": "OK",
"StartTime": "2000-01-03T01:50:51+00:00",
"Messages": [],
"PercentComplete": null,
"Oem": {
"": {
"TaskPercentage": null
}
}
}

响应码:202