Operation: get-job

Home  Previous  Next

The get-job operation lets a workflow determine the current status of a job that was previously triggered by an earlier operation, such as create-lun, create-storage-pool, etc.

The get-job operation is typically used in a loop to continuously check the status of a pending job and wait for its completion before starting another operation that depends on the success of a previous step (like assigning hosts to a LUN, only once the LUN has been successfully created).

When no job-id value is provided, the operation lists all of the jobs in the EMC SMI-S Provider, pending, running and completed. The list can become very long when a lot of activity has taken place with the EMC SMI-S Provider.

Adapter Request Elements for 'get-job' Operation

 

Definition

Required

operation-name

Specifies the name of the operation you want to perform.

Valid value: get-job.

Yes

arguments

Parent element for <argument> element.

Yes

argument

Specifies a list of arguments that is required for this operation

Yes

target

Specifies the connection information for an EMC SMI-S Provider.

Valid value: The value specified for <target> element must be the same as the value that has been specified for the name attribute of <config> element in the adapter configuration. You can skip this element. In this case the request will be executed on the first defined adapter configuration. You can leave this element empty. In this case the request will be executed on the first defined adapter configuration.
Default value: The first defined adapter configuration.

No

timeout-secs

Specifies the time in seconds after which the attempt to connect to the EMC SMI-S Provider times out. The "timeout-secs" specified in adapter request overrides the value specified in adapter configuration.

Valid value: A numeric value which specifies the time in seconds.
Default Value: 180, if no "timeout-secs" is provided in adapter configuration.

No

You can specify one or more of the following elements to retrieve specific information. If none of the elements is specified, then all the details are fetched.

storage-system-name

Specifies the user defined storage system name.

Valid value: Please refer to the get-storage-system operation to list the valid values of this field.
Default value: None.

No

job-id

Specifies the user defined job id

Valid value: Any valid number.
Default value: None

No

Sample Adapter Request for 'get-job' Operation

<emc-storage-request>

    <operation-name>get-job</operation-name>

    <arguments>

      <argument>

              <storage-system-name/>

 <job-id/>

      </argument>

   </arguments>

</emc-storage-request>

Adapter Response Elements for  'get-job' Operation

 

Description

job-id

Number identifying the job.

job-description

Detailed information about the job.

job-status

Status of the job.

job-status-description

Detailed information about the status of the job.

Sample Adapter Response for 'get-job' Operation

<emc-storage-response>

  <metadata>

    <status>success</status>

    <response-count>1</response-count>

  </metadata>

  <responses>

    <response>

      <metadata>

        <status>success</status>

        <execution-milliseconds>31</execution-milliseconds>

        <line-count>39</line-count>

        <job-count>7</job-count>

        <target>pythagoras-p27p</target>

        <config-name>pythagoras-p27p</config-name>

      </metadata>

      <output>

        <jobs>

          <job>

            <job-id>260918743</job-id>

            <job-description>Volume Create</job-description>

            <job-status>Completed - Volume Create</job-status>

            <job-status-descriptions>

              <job-status-description>Completed</job-status-description>

              <job-status-description>OK</job-status-description>

            </job-status-descriptions>

          </job>

          <job>

            <job-id>260920567</job-id>

            <job-description>Volume Create</job-description>

            <job-status>Completed - Volume Create</job-status>

            <job-status-descriptions>

              <job-status-description>Completed</job-status-description>

              <job-status-description>OK</job-status-description>

            </job-status-descriptions>

          </job>

          <job>

            <job-id>260920594</job-id>

            <job-description>Volume Delete</job-description>

            <job-status>Completed - Volume Delete</job-status>

            <job-status-descriptions>

              <job-status-description>Completed</job-status-description>

              <job-status-description>OK</job-status-description>

            </job-status-descriptions>

          </job>

          <job>

            <job-id>260920613</job-id>

            <job-status>Failed - Composite Volume Create</job-status>

            <job-status-description>StorConfigChgControl commit failed|f4246|An error from a sub-library call occurred||2|4e24|The Metalun operation failed due to invalid arguments</job-status-description>

          </job>

        </jobs>

      </output>

    </response>

  </responses>

</emc-storage-response>