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 Data |
---|---|---|---|---|
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 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 Firmware Update | Update firmware 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-appliances | 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/v1beta3/jobs
endpoint with the correct payload for the job.
The following properties are used when creating a job:
Property | JSON Type | Description | Required? |
---|---|---|---|
jobTemplateUri |
string (uri) | A job-template URI with the durable Template ID of the job | Yes |
resourceUri |
string (uri) | A resource URI that the job will operate on | Yes |
data |
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.
Monitoring Jobs
In order to track job progress, request the current job using GET /compute-ops-mgmt/{version}/jobs/{job-id}
with either v1beta3
or v1beta2
as the {version}
.
Using v1beta3
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 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/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",
"resultCode": "SUCCESS",
"status": "Complete",
"statusDetails": {},
"generation": 6
}
Using v1beta2
The response includes a state
and status
which allow you to monitor the current job state and status.
The job state
is 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 finished with an error |
COMPLETE |
The job finished successfully |
Note:
ERROR
andCOMPLETE
are both terminal states for a job.
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
}