HPE Compute Ops Management Jobs
Job Definition
A job is a multi-step task that is managed by Compute Ops Management to perform an action on a resource. For example performing power operations or firmware updates on a server.
Available Jobs
The following table summarizes the jobs that can be performed in COM.
Job Template IDs
The template ID of a job is durable which means that it's the same across all Compute Ops Management regions. It uniquely identifies a job and can be hard-coded in your scripts and tools.
Name | Description | Resource Type | Template ID | Required JobParams |
---|---|---|---|---|
Server Power Off | Power off a server | compute-ops-mgmt/server | d0c13b58-748c-461f-9a61-c0c5c71f1bb4 | -- |
Server Power On | Power on a server | compute-ops-mgmt/server | 0cbb2377-1834-488d-840c-d5bf788c34fb | -- |
Server Restart | Restart a server | compute-ops-mgmt/server | 30110551-cad6-4069-95b8-dbce9bbd8525 | -- |
Server Cold Boot | Cold boot a server | compute-ops-mgmt/server | aacfb3e0-6575-4d4f-a711-1ee1ae768407 | -- |
Server Firmware Update | Update firmware on a server | compute-ops-mgmt/server | fd54a96c-cabc-42e3-aee3-374a2d009dba | bundle_id |
Server iLO Firmware Update | Update iLO component firmware on a server | compute-ops-mgmt/server | 94caa4ef-9ff8-4805-9e97-18a09e673b66 | -- |
Server External Storage Details | Collect external storage details | compute-ops-mgmt/server | 139cc26b-ac93-4da0-826c-220d15e3a422 | -- |
Group Firmware Update | Update firmware on servers in a group | compute-ops-mgmt/group | 91159b5e-9eeb-11ec-a9da-00155dc0a0c0 | -- |
Group Firmware Compliance | Calculate firmware compliance of servers in a group | compute-ops-mgmt/group | 23b8ba2a-6c46-4223-b028-919382c7dcac | devices |
Group Internal Storage Configuration | Configures internal storage volume for servers in a group | compute-ops-mgmt/group | c708eb57-235d-4ea8-9e21-8ceea2438773 | devices |
Group Apply Server Setting | Apply server setting on a group | compute-ops-mgmt/group | beff07ce-f36d-4699-9ac3-f872dcd63133 | redfish_subsystem |
Group Apply External Storage Settings | Apply external storage settings on servers in a group | compute-ops-mgmt/group | 1262f08e-79eb-4e9f-91d2-6984da9d31cd | -- |
Group Apply OneView Server Templates | Apply server template settings on appliances in a group | compute-ops-mgmt/group | db3620d4-19a4-4b54-9804-83f8f59d48a4 | targetApplianceIds |
Group Appliance Update | Update appliances in a group | compute-ops-mgmt/group | f69f553a-5004-4a08-9283-5b60abd9eb4a | targetApplianceIds |
Group External Storage Compliance | Calculate external storage compliance of servers in a group | compute-ops-mgmt/group | 977139e0-f9d9-4940-9418-e0c321b5a458 | -- |
Settings Update OneView Server Template | Update server template settings | compute-ops-mgmt/setting | abfda355-6e58-4c00-be0a-af35dbd70398 | templatesData |
Appliance Software Update | Update software of an appliance | compute-ops-mgmt/oneview-appliance | 1c4ac4be-8eeb-49f2-a86a-fd8c9182616c | applianceFirmwareId |
Carbon Footprint Report | Create carbon footprint report | compute-ops-mgmt/filter | b0001d36-6490-48ac-93af-a87adfb997ed | reportType |
Group OS Installation | Install operating system on servers in a group | compute-ops-mgmt/group | e2952628-2629-4088-93db-91742304ef0c | -- |
Server Inventory | Collect server inventory | compute-ops-mgmt/server | d6595f1b-84e6-4587-ade5-656e2a5ea20d | -- |
Server Network Connectivity | Collect Server Network Connectivity | compute-ops-mgmt/server | b21ca9e2-8a1b-11ee-b9d1-0242ac120002 | -- |
Configure ignore iLO security risk settings | update ilo security ignore settings | compute-ops-mgmt/server | e1d69e76-38cc-4079-9192-a380baea2973 | -- |
Group Apply OneView appliance settings | Apply OneView appliance settings to specified appliance group members | compute-ops-mgmt/group | a229a162-b43f-45b0-b7bb-692df77b9746 | targetApplianceIds |
Refresh OneView appliance settings | Refresh the OneView appliance settings cache in Compute Ops Management | compute-ops-mgmt/oneview-appliance | fc16aa48-c73c-4463-9112-e061383ebfa9 | -- |
Note: Click on the job name to learn more about the required and optional data on the job details page.
Create Job
A job can be created by issuing a POST
to the /compute-ops-mgmt/v1/jobs
endpoint with the correct payload for the job.
The following properties are used when creating a job:
Property | JSON Type | Description | Required? |
---|---|---|---|
jobTemplate |
string (id) | The durable Template ID of the job | Yes |
resourceType |
string (type) | The TYPE of the resource the job will operate on | Yes |
resourceId |
string (id) | The ID of the resource the job will operate on | Yes |
jobParams |
object | Any additional data required by the job | No |
If the job was created successfully, a 201 Created
response is returned. The response includes the job resource which has a
job resourceUri
that you can use to track the progress of the job.
Migrating Job Creation to the Stable v1 API
To transition from the deprecated beta versions (v1beta2
and v1beta3
) to the stable v1
API for job creation, refer to the following. It outlines how to replace previous parameters.
This migration ensures compatibility with the stable API and aligns with the latest Compute Ops Management standards.
Template Identifier The template is now identified only by the template's durable ID.
-
Deprecated:
- jobTemplateUri= "/compute-ops-mgmt/v1beta2/job-templates/91159b5e-9eeb-11ec-a9da-00155dc0a0c0"
-
V1 Stable:
- jobTemplate= "91159b5e-9eeb-11ec-a9da-00155dc0a0c0"
Resource Identifier The resource is now identified by two attributes the resourceType and resourceId
-
Deprecated:
- resourceUri= "/compute-ops-mgmt/v1beta2/groups/a3853ee1-da05-47d6-bcc4-d35244d59605"
-
V1 Stable:
- resourceType= "compute-ops-mgmt/group"
- resourceId= "a3853ee1-da05-47d6-bcc4-d35244d59605"
Job Parameters The parameters for the job haven't changed, but now go to the jobParams property.
-
Deprecated:
- data= {json body}
-
V1 Stable:
- jobParams= {json body (same contents)}
Monitoring Jobs
In order to track job progress, request the current job using GET /compute-ops-mgmt/{version}/jobs/{job-id}
with v1
as the {version}
, or the deprecated values v1beta3
and v1beta2
.
Using v1
The response includes a state
and resultCode
which allow you to monitor the current job state and result.
The job also includes a status
which can provide more details about the current job progress.
The job state
and resultCode
are defined as follows:
State | Description |
---|---|
PENDING |
The job is queued behind other running jobs |
RUNNING |
The job is currently running |
STALLED |
The job is not making progress and needs to be terminated manually |
ERROR |
The job terminated unexpectedly due to an error |
COMPLETE |
The job completed |
Note:
ERROR
andCOMPLETE
are both terminal states for a job.
Result Code | Description |
---|---|
SUCCESS |
The job completed successfully |
FAILURE |
The job completed without achieving its intended outcome |
null |
The job is in a non-terminal state |
Example
The following example shows a completed GroupFirmwareCompliance job using the v1
jobs route.
{
"id": "2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"parentJobId": null,
"type": "compute-ops-mgmt/job",
"resourceUri": "/compute-ops-mgmt/v1/jobs/2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"createdAt": "2022-08-04T18:52:26.278608+00:00",
"updatedAt": "2022-08-04T18:54:09.903588+00:00",
"deleteOnComplete": false,
"cancelable": true,
"name": "GroupFirmwareCompliance",
"jobTemplate": "23b8ba2a-6c46-4223-b028-919382c7dcac",
"resource": {
"type": "compute-ops-mgmt/group",
"id": "8a3a2a46-0102-48e2-bdd9-a29ee6909860"
},
"jobParams": {},
"state": "COMPLETE",
"resultCode": "SUCCESS",
"status": "Complete",
"statusDetails": {},
"generation": 6
}
Using v1beta3
The older v1bets3
response tracks resource by URIs, not ID & TYPE like in the stable 'v1
api.
Example
The following example shows a completed GroupFirmwareCompliance job using the v1beta3
jobs route.
{
"id": "2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"parentJobId": null,
"type": "compute-ops-mgmt/job",
"resourceUri": "/compute-ops-mgmt/v1beta3/jobs/2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"createdAt": "2022-08-04T18:52:26.278608+00:00",
"updatedAt": "2022-08-04T18:54:09.903588+00:00",
"displayName": "GroupFirmwareCompliance",
"name": "GroupFirmwareCompliance",
"jobTemplateUri": "/compute-ops-mgmt/v1beta3/job-templates/23b8ba2a-6c46-4223-b028-919382c7dcac",
"associatedResourceUri": "/compute-ops-mgmt/v1beta3/groups/8a3a2a46-0102-48e2-bdd9-a29ee6909860",
"resource": {
"resourceUri": "/compute-ops-mgmt/v1beta3/groups/8a3a2a46-0102-48e2-bdd9-a29ee6909860",
"type": "groups"
},
"data": {},
"state": "COMPLETE",
"resultCode": "SUCCESS",
"status": "Complete",
"statusDetails": {},
"generation": 6
}
Using v1beta2
The older v1beta2
response uses URIs, and does not have resultCode
, but includes a state
and status
.
Example
The following example shows a completed GroupFirmwareCompliance job using the v1beta2
jobs route.
{
"id": "2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"parentJobId": null,
"type": "compute-ops-mgmt/job",
"resourceUri": "/compute-ops-mgmt/v1beta2/jobs/2b8540fc-f275-48bb-ae4b-bf9a42b6cc91",
"createdAt": "2022-08-04T18:52:26.278608+00:00",
"updatedAt": "2022-08-04T18:54:09.903588+00:00",
"displayName": "GroupFirmwareCompliance",
"name": "GroupFirmwareCompliance",
"jobTemplateUri": "/compute-ops-mgmt/v1beta2/job-templates/23b8ba2a-6c46-4223-b028-919382c7dcac",
"associatedResourceUri": "/compute-ops-mgmt/v1beta2/groups/8a3a2a46-0102-48e2-bdd9-a29ee6909860",
"resource": {
"resourceUri": "/compute-ops-mgmt/v1beta2/groups/8a3a2a46-0102-48e2-bdd9-a29ee6909860",
"type": "groups"
},
"data": {},
"state": "COMPLETE",
"status": "Complete",
"statusDetails": {},
"generation": 6
}