ResourceDefinition
uris
/redfish/v1/Sms/1/TaskService/Tasks/{taskid}
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | 任务服务资源模型的OData描述信息 |
| @odata.id | string | true | - | 当前任务资源的访问路径 |
| @odata.type | string | true | - | 任务服务资源的类型 |
| Id | string | true | - | 指定任务资源的ID。首位为任务类型,后3位为对应类型的序号。任务类型:iBMA、Driver、Firmware_Shell、Software、Firmware、Log、File、Configuration、SPService |
| Name | string | true | - | 指定任务资源的名称 |
| TaskState | string | true | New,Starting,Running,Suspended,Interrupted,Pending,Stopping,Completed,Killed,Exception,Service | 指定任务资源的状态,包括: ● Completed:已完成 ● Exception:异常 ● Interrupted:已中断 ● Killed:已终止 ● New:新建 ● Pending:待处理 ● Running:运行中 ● Service:服务中 ● Starting:启动中 ● Stopping:停止中 ● Suspended:已挂起 |
| StartTime | string | true | - | 任务的起始时间 |
| EndTime | string | true | - | 任务的结束时间 |
| Messages { | object | true | - | 任务的相关信息 |
| Messages.@odata.type | string | true | - | 信息类型 |
| Messages.MessageId | string | true | - | 信息编号 |
| Messages.RelatedProperties[ ] | array | true | - | 任务属性描述 |
| Messages.Message | string | true | - | 任务信息 |
| Messages.MessageArgs[ ] | array | true | - | 任务的详细信息,对应原有进度查询的log属性 |
| Messages.Severity | string | true | OK,Warning,Critical | 任务状态,包括: ● Critical:严重 ● OK:正常 ● Warning:警告 |
| Messages.Resolution | string | true | - | 解决任务状态的处理建议 |
| } | ||||
| Oem { | object | true | - | 自定义属性 |
| Oem.Public { | object | true | - | 自定义属性 |
| Oem.Public.Progress | string | true | - | 任务完成进度 |
| } | ||||
| } |
supported_methods
- GET
- POST
HTTP methods
GET
命令功能
查询指定任务资源信息
命令格式
URL: https://device_ip/redfish/v1/Sms/1/TaskService/Tasks/taskid
请求头:
X-Auth-Token: 123456789***********************请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
| taskid | 待查询任务的ID | 可从任务集合资源中获得 |
使用指南
无
使用实例
请求样例:
GET https://device_ip/redfish/v1/Sms/1/TaskService/Tasks/1001请求头:
X-Auth-Token: 123456789***********************请求消息体:无
响应样例:
{
"@odata.context": "/redfish/v1/Sms/1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_3.Task",
"@odata.id": "/redfish/v1/Sms/1/TaskService/Tasks/8",
"Id": "1001",
"Name": "Upgarde Task",
"TaskState": "Running",
"StartTime": "2000-03-02T11:09:02+00:00",
"EndTime": "2000-03-02T12:09:02+00:00",
"Messages": {
"@odata.type": "#Message.v1_0_4.Message",
"MessageId": "iBMC.1.0.FirmwareUpgradeComponent",
"RelatedProperties": [],
"Message": "Upgrading the Motherboard CPLD.",
"MessageArgs": [
"Motherboard CPLD"
],
"Severity": "OK",
"Resolution": "Wait until the upgrade is complete."
},
"Oem": {
"Public": {
"Progress": "8"
}
}
}响应码:200
POST (ACTION)
CollectLog
命令功能
收集日志资源
命令格式
URL: https://device_ip/redfish/v1/Sms/1/Systems/1/LogServices/iBMA/Actions/LogService.CollectLog
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"Type": type,
"SoftwareName": software_name,
"SoftwareParameter": software_parameter,
"TargetDevice": target_device,
"MaxLogSizeMib": max_log_size_mib,
"Protocol": protocol,
"Port": port,
"User": user,
"Password": password,
"LogPath": log_path,
"UploadViaiBMC": upload_via_ibmc
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| type | 日志类型 | iBMA:收集iBMA的日志;SMART:收集硬盘SMART日志;Software:收集iBMA管理的软件日志(iBMA 2.2.0.1及以上版本支持) |
| software_name | 软件名称(iBMA 2.2.0.1及以上版本支持) | Type为Software时有效,必须传入该参数;受iBMA管理的软件名称。支持字母、数字、连字符、下划线、句点、半角冒号和空格 |
| software_parameter | 日志收集参数(iBMA 2.2.0.1及以上版本支持) | Type为Software时有效,选填参数。支持字母、数字、连字符、下划线、句点、半角逗号和空格,最大长度100字符 |
| target_device | 目标设备IP地址 | 收集到的日志回传的目标设备IP地址 |
| max_log_size_mib | 日志最大限制 | 收集到的日志大小限制,如果收集到的日志文件超出大小限制,则需要对日志文件进行过滤,只收集最新的日志;0表示没有限制 |
| protocol | 传输协议类型 | SFTP |
| port | 传输端口号 | 1~65535 |
| user | 用户名 | 小于32字符 |
| password | 密码 | 小于32字符 |
| log_path | 日志存放路径 | 路径长度小于等于200字符。字符串必须以/开头,多级路径以/分隔,且路径名只能为字符集"A-Za-z0-9_-."中的字符 |
| upload_via_ibmc | 是否通过BMC上传 | 默认为true。true:通过BMC上传文件;false:通过业务网口上传文件 |
使用指南
无
使用实例
请求样例:
POST https://device_ip/redfish/v1/Sms/1/Systems/1/LogServices/iBMA/Actions/LogService.CollectLog请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体1:
{
"Type": "iBMA",
"TargetDevice": "192.168.2.100",
"MaxLogSizeMib": 1,
"Protocol": "SFTP",
"Port": 22,
"User": "userexp",
"Password": "pswexp",
"LogPath": "/tmp",
"UploadViaiBMC": false
}响应样例1:
{
"status": "200",
"message": "Collect task is running background.",
"TaskId": "6001"
}响应码:200
请求消息体2:
{
"Type": "Software",
"SoftwareName": "AIE",
"SoftwareParameter": "",
"TargetDevice": "192.168.2.100",
"MaxLogSizeMib": 0,
"Protocol": "SFTP",
"Port": 22,
"User": "userexp",
"Password": "pswexp",
"LogPath": "/tmp",
"UploadViaiBMC": false
}响应样例2:
{
"status": "200",
"message": "Collect task is running background.",
"TaskId": "6001"
}响应码:200
POST (ACTION)
UploadFile
命令功能
上传文件至SP操作
命令格式
URL: https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.UploadFile
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"FileType": file_type,
"SourceURI": source_uri,
"ChecksumData": check_sum_data
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| file_type | 文件类型 | 支持的类型:RootInfoCollection |
| source_uri | 待上传文件路径 | 格式为:<传输协议>://<用户名>:<密码>@<IP>:<端口号>/<文件路径>。支持的文件传输协议有:sftp。文件支持格式为:文件名只能以".ini",".json",".tar.gz",".zip",".iso",".asc",".cms"或".crl"为后缀,且文件名称中的字符取值范围为[A-Za-z0-9_.-&()]。URL中不应含有"||"、";"、"&&"、"$"、"|"、">>"、">"、"<"等特殊字符;文件名不能超过200个字符。端口号若不填写,默认使用22端口号 |
| check_sum_data | 文件sha256值,用于文件完整性校验数值 | SHA256生成的文件校验和数据,长度为64 |
使用指南
该接口为SP定制化包专属接口,需要SP正在运行过程中配合相应功能使用,通用版本iBMA未携带该接口。SP支持版本为1.22.0及以上版本。
使用实例
请求样例:
POST https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.UploadFile请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:
{
"FileType": "RootInfoCollection",
"SourceURI": "sftp://user:passwd@xx.xx.xx.xx:22/mnt/dev_sdb/share/SP/SpTest/RootInfoCollection.tar.gz",
"ChecksumData": "ae3ae1543d096d59dc3005a06f44f698ecd5897060acf03c4a9243a6ae460cbf"
}响应样例:
{
"@odata.context": "/redfish/v1/Sms/1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_3.Task",
"@odata.id": "/redfish/v1/Sms/1/TaskService/Tasks/9003",
"Id": "9003",
"Name": "SPService Task",
"TaskState": "New",
"StartTime": "2026-04-02T11:09:02+00:00",
"status": 200,
"message": "Upload file has started, please wait.",
"TaskId": "9003"
}响应码:200
POST (ACTION)
CollectServerData
命令功能
收集服务器信息操作
命令格式
URL: https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.CollectServerData
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"CollectionType": collection_type,
"FilePath": file_path
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| collection_type | 信息类型 | "RootInfo" |
| file_path | 文件存放路径 | 格式为:<传输协议>://<用户名>:<密码>@<IP>:<端口号>/<文件路径>。支持的文件传输协议有:sftp。路径长度小于等于200字符。字符串必须以/开头,多级路径以/分隔,且路径名只能为字符集"A-Za-z0-9_-."中的字符。URL中不应含有"||"、";"、"&&"、"$"、"|"、">>"、">"、"<"等特殊字符;文件名不能超过200个字符。端口号若不填写,默认使用22端口号 |
使用指南
该接口为SP定制化包专属接口,需要SP正在运行过程中配合相应功能使用,通用版本iBMA未携带该接口。SP支持版本为1.22.0及以上版本。
使用实例
请求样例:
POST https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.CollectServerData请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:
{
"CollectionType": "RootInfo",
"FilePath": "sftp://user:passwd@xx.xx.xx.xx:22/mnt/dev_sdb/share/collect/"
}响应样例:
{
"@odata.context": "/redfish/v1/Sms/1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_3.Task",
"@odata.id": "/redfish/v1/Sms/1/TaskService/Tasks/9003",
"Id": "9003",
"Name": "SPService Task",
"TaskState": "New",
"StartTime": "2026-04-02T11:09:02+00:00",
"status": 200,
"message": "Information collect task is running background.",
"TaskId": "9003"
}响应码:200
POST (ACTION)
CreateDiagnosisTask
命令功能
创建SP诊断任务操作
命令格式
URL: https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.CreateDiagnosisTask
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"TaskType": task_type,
"DeviceToDevice": {
"Sender": {
"ServerIndex": int,
"NPUID": int,
"NPULocalID": int
},
"Receiver": {
"ServerIndex": int,
"NPUID": int,
"NPULocalID": int
}
},
"SwitchToDPU": {
"DPUToSwitchPortCount": int,
"DurationTimeInMillisecond": int,
"PRBSPattern": int
}
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| task_type | 任务类型 | DeviceToDevice、SwitchToDPU |
| device_to_device | DeviceToDevice任务诊断信息,执行Atlas A5 SuperPoD跨域NPU带宽压测 | 对象,DeviceToDevice诊断节点信息。DeviceToDevice诊断项需要同时下发Sender和Receiver,均包含以下字段: ● ServerIndex:超节点内节点编号,整型,取值范围[0, 1024] ● NPUID:节点上NPU对应的NPU ID,整型,取值范围[0, 63] ● NPULocalID:NPU所在节点的rootinfo及topo文件内对应的local_id字段,整型,取值范围[0, 64] |
| switch_to_dpu | SwitchToDPU任务诊断信息。针对Atlas A5 SuperPoD机型,对Unions到DPU间链路压测 | 对象,包含以下字段: ● DPUToSwitchPortCount:DPU到交换机的端口数量,整型,取值范围[8, 16]。针对Atlas A5 SuperPoD机型,当前支持数量为8或者16,对应DPU到Unions的端口数 ● DurationTimeInMillisecond:打流持续时间,单位ms,整型,取值范围[1, 3600000] ● PRBSPattern:打流类型,整型,取值范围[0, 255],支持类型:PRBS7(0)、PRBS9(1)、PRBS10(2)、PRBS11(3)、PRBS15(4)、PRBS20(5)、PRBS23(6)、PRBS31(7)、customer pattern(8)、PRBS58(9)、PRBS13(10)、Linearity(11)、Square wave(12)、NRZ Clock Pattern(13)、long 0(14)、JP03A(16)、JP03B(17)、SSPRQ(23)、停止(255) |
使用指南
该接口为SP定制化包专属接口,需要SP正在运行过程中配合相应功能使用,通用版本iBMA未携带该接口。SP支持版本为1.22.0及以上版本。
使用实例
请求样例:
POST https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.CreateDiagnosisTask请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体1:
{
"TaskType": "DeviceToDevice",
"DeviceToDevice": {
"Sender": {
"ServerIndex": 0,
"NPUID": 6,
"NPULocalID": 6
},
"Receiver": {
"ServerIndex": 1,
"NPUID": 7,
"NPULocalID": 15
}
}
}请求消息体2:
{
"TaskType": "SwitchToDPU",
"SwitchToDPU": {
"DPUToSwitchPortCount": 16,
"DurationTimeInMillisecond": 360000,
"PRBSPattern": 10
}
}响应样例:
{
"@odata.context": "/redfish/v1/Sms/1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_3.Task",
"@odata.id": "/redfish/v1/Sms/1/TaskService/Tasks/9003",
"Id": "9003",
"Name": "SPService Task",
"TaskState": "New",
"StartTime": "2026-04-02T11:09:02+00:00",
"status": 200,
"message": "SP diagnose task is running background.",
"TaskId": "9003"
}响应码:200
POST (ACTION)
StopDiagnosisTask
命令功能
停止SP诊断任务操作
命令格式
URL: https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.StopDiagnosisTask
请求头:
X-Auth-Token: 123456789***********************
Content-Type: header_type请求消息体:
{
"TaskType": task_type
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| task_type | 待结束的任务项与SPService.CreateDiagnosisTask接口中TaskType对应 | DeviceToDevice、SwitchToDPU |
使用指南
该接口为SP定制化包专属接口,需要SP正在运行过程中配合相应功能使用,通用版本iBMA未携带该接口。SP支持版本为1.22.0及以上版本。
使用实例
请求样例:
POST https://device_ip/redfish/v1/Sms/1/Managers/1/SPService/Actions/SPService.StopDiagnosisTask请求头:
X-Auth-Token: 123456789***********************
Content-Type: application/json请求消息体:
{
"TaskType": "DeviceToDevice"
}响应样例:
{
"@odata.context": "/redfish/v1/Sms/1/$metadata#TaskService/Tasks/Members/$entity",
"@odata.type": "#Task.v1_0_3.Task",
"@odata.id": "/redfish/v1/Sms/1/TaskService/Tasks/9003",
"Id": "9003",
"Name": "SPService Task",
"TaskState": "New",
"StartTime": "2026-04-02T11:09:02+00:00",
"status": 200,
"message": "SP diagnose task will be stopped.",
"TaskId": "9003"
}响应码:200