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

ResourceDefinition ​

uris ​

  • /redfish/v1/JobService

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-JobService资源模型的OData描述信息
@odata.idstringtrue-JobService资源节点的访问路径
@odata.typestringtrue-JobService资源类型
DateTimestringtrue-JobService当前日期和时间设置
Descriptionstringtrue-JobService资源的描述
Idstringtrue-JobService资源的Id
Namestringtrue-JobService资源的名称
Jobs {objecttrue-编排任务集合的链接,包含指向资源的链接
Jobs.@odata.idstringtrue-编排任务集合的链接
}
Log {objecttrue-编排任务服务所使用日志服务的链接
Log.@odata.idstringtrue-LogService资源的链接
}
ServiceCapabilities {objecttrue-编排任务的服务能力
ServiceCapabilities.Schedulingbooleantruetrue,false是否支持任务调度
ServiceCapabilities.MaxJobsnumbertrue-支持的最大任务数
}
ServiceEnabledbooleanfalsetrue,false使能状态
Status {objecttrue-资源及其从属或依赖资源的状态和运行状况
Status.Statestringtrue-JobService服务状态
Status.Healthstringtrue-JobService服务健康状态
Status.HealthRollupstringtrueOK,WarningJobService子资源整体运行状态,通常取值为OK,任意Job子资源JobStatus存在异常(Critical)时取值为Warning,包括:
● OK:正常
● Warning:警告
}
Oem {objecttrue-自定义属性
Oem.Public {objectfalse-自定义属性
Oem.Public.DeleteOnCompletionTimeoutMinutesnumbertrue-已完成状态Job任务超时自动删除时间
已完成状态包含:
● Cancelled:取消时删除
● Exception:异常时删除
● Completed:完成时删除
Oem.Public.JobTypes [ {arraytrue-所有JobType对应的执行参数
Oem.Public.JobTypes[].JobTypestringtrue-Job任务类型
Oem.Public.JobTypes[].PayloadParams[ ]arraytrue-Job任务需要的参数,样例中{"filepath": "string"}表明该类型Job入参为对象,key为filepath,值为字符串类型
} ]
}
}

附:已支持的JobType类型如下:

json
{
"JobType": "SPOSInstall",
"PayloadParams": []
}
json
{
"JobType": "SPDiagnose",
"PayloadParams": []
}
json
{
"JobType": "SPFWUpdate",
"PayloadParams": []
}
json
{
"PayloadParams": [],
"JobType": "Upgrade"
}

supported_methods ​

  • GET
  • PATCH

HTTP methods ​

GET ​

命令功能

查询编排任务服务信息

说明

openUBMC 25.12 LTS及以上版本支持

命令格式

URL: https://device_ip/redfish/v1/JobService

请求头:

text
X-Auth-Token: auth_value

请求消息体: 无

参数说明

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

使用指南

无

使用实例

请求样例:

http
GET <https://device_ip/redfish/v1/JobService>

请求头:

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

请求消息体:无

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#JobService.JobService",
"@odata.id": "/redfish/v1/JobService",
"@odata.type": "#JobService.v1_0_6.JobService",
"DateTime": "2024-12-13T10:15:33+08:00",
"Description": "Represent a job service for a Redfish",
"Id": "JobService",
"Name": "Job Service",
"Jobs": {
"@odata.id": "/redfish/v1/JobService/Jobs"
},
"Log": {
"@odata.id": "/redfish/v1/Managers/1/LogServices/RunLog"
},
"ServiceCapabilities": {
"Scheduling": true,
"MaxJobs": 32
},
"ServiceEnabled": true,
"Status": {
"State": "Enabled",
"Health": "OK",
"HealthRollup": "OK"
},
"Oem": {
"Public": {
"DeleteOnCompletionTimeoutMinutes": 10080,
"JobTypes": [
{
"PayloadParams": [],
"JobType": "Upgrade"
},
{
"PayloadParams": [],
"JobType": "SPDiagnose"
},
{
"PayloadParams": [],
"JobType": "SPFWUpdate"
},
{
"PayloadParams": [],
"JobType": "SPOSInstall"
}
]
}
}
}

响应码:200

PATCH ​

命令功能

修改编排任务服务信息

说明

openUBMC 25.12 LTS及以上版本支持

命令格式

URL: https://device_ip/redfish/v1/JobService

请求头:

text
X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value

请求消息体:

json
{
"ServiceEnabled": true
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ServiceEnabled使能状态● true:开启
● false:关闭

使用指南

无

使用实例

请求样例:

http
PATCH <https://device_ip/redfish/v1/JobService>

请求头:

text
X-Auth-Token: 123456789***********************
Content-Type: application/json
If-Match: W/"bc428df5"

请求消息体:

json
{
"ServiceEnabled": false
}

响应样例:

json
{
"@odata.context": "/redfish/v1/$metadata#JobService.JobService",
"@odata.id": "/redfish/v1/JobService",
"@odata.type": "#JobService.v1_0_6.JobService",
"DateTime": "2024-12-13T10:15:33+08:00",
"Description": "Represent a job service for a Redfish",
"Id": "JobService",
"Name": "Job Service",
"Jobs": {
"@odata.id": "/redfish/v1/JobService/Jobs"
},
"Log": {
"@odata.id": "/redfish/v1/Managers/1/LogServices/RunLog"
},
"ServiceCapabilities": {
"Scheduling": true,
"MaxJobs": 32
},
"ServiceEnabled": false,
"Status": {
"State": "Enabled",
"Health": "OK",
"HealthRollup": "OK"
},
"Oem": {
"Public": {
"DeleteOnCompletionTimeoutMinutes": 10080,
"JobTypes": [
{
"PayloadParams": [],
"JobType": "Upgrade"
},
{
"PayloadParams": [],
"JobType": "SPDiagnose"
},
{
"PayloadParams": [],
"JobType": "SPFWUpdate"
},
{
"PayloadParams": [],
"JobType": "SPOSInstall"
}
]
}
}
}

响应码:200