Skip to content
Last updated

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.

NameDescriptionResource TypeTemplate IDRequired JobParams
Server Power OffPower off a servercompute-ops-mgmt/serverd0c13b58-748c-461f-9a61-c0c5c71f1bb4--
Server Power OnPower on a servercompute-ops-mgmt/server0cbb2377-1834-488d-840c-d5bf788c34fb--
Server RestartRestart a servercompute-ops-mgmt/server30110551-cad6-4069-95b8-dbce9bbd8525--
Server Cold BootCold boot a servercompute-ops-mgmt/serveraacfb3e0-6575-4d4f-a711-1ee1ae768407--
Server Firmware UpdateUpdate firmware on a servercompute-ops-mgmt/serverfd54a96c-cabc-42e3-aee3-374a2d009dbabundle_id
Server iLO Firmware UpdateUpdate iLO component firmware on a servercompute-ops-mgmt/server94caa4ef-9ff8-4805-9e97-18a09e673b66--
Server External Storage DetailsCollect external storage detailscompute-ops-mgmt/server9310319e-7b7f-41ba-8b24-8b34eed1ca62--
Group Firmware UpdateUpdate firmware on servers in a groupcompute-ops-mgmt/group91159b5e-9eeb-11ec-a9da-00155dc0a0c0--
Group Firmware ComplianceCalculate firmware compliance of servers in a groupcompute-ops-mgmt/group23b8ba2a-6c46-4223-b028-919382c7dcacdevices
Group Apply Internal Storage SettingsConfigures internal storage volume for servers in a groupcompute-ops-mgmt/group54095626-3911-4fea-9741-816e2531994einitialize volumes
Group Apply Server SettingApply server setting on a groupcompute-ops-mgmt/groupbeff07ce-f36d-4699-9ac3-f872dcd63133redfish_subsystem
Group Apply External Storage SettingsApply external storage settings on servers in a groupcompute-ops-mgmt/groupfcb79270-5954-42e9-9374-6a065b6d494a--
Group Apply OneView Server TemplatesApply server template settings on appliances in a groupcompute-ops-mgmt/groupdb3620d4-19a4-4b54-9804-83f8f59d48a4targetApplianceIds
Group Appliance UpdateUpdate appliances in a groupcompute-ops-mgmt/groupf69f553a-5004-4a08-9283-5b60abd9eb4atargetApplianceIds
Group External Storage ComplianceCalculate external storage compliance of servers in a groupcompute-ops-mgmt/group7177aa6a-e8f8-4e9b-ae31-e01dafcc81df--
Settings Update OneView Server TemplateUpdate server template settingscompute-ops-mgmt/settingabfda355-6e58-4c00-be0a-af35dbd70398templatesData
Appliance Software UpdateUpdate software of an appliancecompute-ops-mgmt/oneview-appliance1c4ac4be-8eeb-49f2-a86a-fd8c9182616capplianceFirmwareId
Group OS InstallationInstall operating system on servers in a groupcompute-ops-mgmt/groupe2952628-2629-4088-93db-91742304ef0c--
Server InventoryCollect server inventorycompute-ops-mgmt/serverd6595f1b-84e6-4587-ade5-656e2a5ea20d--
Server Network ConnectivityCollect Server Network Connectivitycompute-ops-mgmt/serverb21ca9e2-8a1b-11ee-b9d1-0242ac120002--
Configure ignore iLO security risk settingsupdate ilo security ignore settingscompute-ops-mgmt/servere1d69e76-38cc-4079-9192-a380baea2973--
Group Apply OneView appliance settingsApply OneView appliance settings to specified appliance group memberscompute-ops-mgmt/groupa229a162-b43f-45b0-b7bb-692df77b9746targetApplianceIds
Refresh OneView appliance settingsRefresh the OneView appliance settings cache in Compute Ops Managementcompute-ops-mgmt/oneview-appliancefc16aa48-c73c-4463-9112-e061383ebfa9--
Collect Server logCollect server logcompute-ops-mgmt/server2d744494-22d4-4d61-8c65-647ccadeb6b6--
Server Firmware DownloadDownload firmware on a servercompute-ops-mgmt/server0683ada8-1a89-49dd-bf04-6df715b708a6bundle_id
Group Firmware DownloadDownload firmware on servers in a groupcompute-ops-mgmt/groupa17a7aa9-4540-4c21-bbf2-31af4ff65e98--

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:

PropertyJSON TypeDescriptionRequired?
jobTemplatestring (id)The durable Template ID of the jobYes
resourceTypestring (type)The TYPE of the resource the job will operate onYes
resourceIdstring (id)The ID of the resource the job will operate onYes
jobParamsobjectAny additional data required by the jobNo

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:

StateDescription
PENDINGThe job is queued behind other running jobs
RUNNINGThe job is currently running
STALLEDThe job is not making progress and needs to be terminated manually
ERRORThe job terminated unexpectedly due to an error
COMPLETEThe job completed

Note: ERROR and COMPLETE are both terminal states for a job.

Result CodeDescription
SUCCESSThe job completed successfully
FAILUREThe job completed without achieving its intended outcome
nullThe 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
}