Retrieve Task Status operation


The Retrieve Task Status operation retrieves the status, by task ID, of a specific task performed on a virtual machine.
The following table describes the elements for this request.

Adapter request elements for the Retrieve Task Status operation

Element

Definition

Required

<operation-type>

Defines the type of the operation: Monitor_Vm

Yes

<operation-name>

Defines the name of the operation: Retrieve_Task_Status

Yes

<soap-url>

Specifies the URL for the remote SOAP service running on the VMware VirtualCenter

If the <soap-url> element is not specified, the request uses the VirtualCenter Server details specified in the adapter configuration.

Default format for HTTPS: https://<hostName>:<port>/sdk/vim

Default format for HTTP: http://<hostName>:<port>/sdk/vim

Warning

Note

If you want to use an HTTP value, you might need to change the configuration of the VMware Infrastructure application.

No

<transport>

Specifies the transport protocol for the message

If <transport> is not provided, the request uses the VirtualCenter Server details specified in the adapter configuration.

Valid values: https-rpc (default), http-rpc

Warning

Note

If the value of <transport> element is https-rpc, you must install the security certificate for the VMware Virtual Center to the keystore of the peer on which the adapter is enabled.

No

<user-name>

Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center

If no user name is specified, the request is executed with the user that is specified in the configuration.

No

<password>

Specifies the password corresponding to <user-name>

Conditional;
required if <user-name> is specified

<parameters>

Contains the <spec-set>, <object-set>, and <task> elements required to execute the operation

Yes

<spec-set>

Contains the <object-set> and <task ID> elements

Yes

<object-set>

Contains the <task ID> element

Yes

<task>

Specifies the task ID of the task whose status is to be determined

Yes

The following figure shows a sample adapter request for the Retrieve Task Status operation.

Sample adapter request for the Retrieve Task Status operation

<vmware-infrastructure-request>
     <operation-type>Monitor_Vm</operation-type>
     <operation-name>Retrieve_Task_Status</operation-name>
    <soap-url></soap-url>
    <transport></transport>
     <user-name></user-name>
     <password></password>
     <parameters>
         <spec-set>
             <object-set>
                 <task>task-525</task>
             </object-set>
         </spec-set>
     </parameters>
</vmware-infrastructure-request>

The following figure shows the response for the sample Retrieve Task Status operation.

Sample adapter response for the Retrieve Task Status operation

<vmware-infrastructure-response>
 <metadata>
   <status>success</status>
 </metadata>
<RetrieveTaskStatusResponse>
       <returnval>
         <Task>task-2675</Task>
         <propSet>
           <name>info</name>
           <TaskInfo>
             <key>task-2675</key>
             <Task>task-2675</Task>
             <name>PowerOnVM_Task</name>
             <descriptionId>VirtualMachine.powerOn</descriptionId>
             <VirtualMachine>TestDev</VirtualMachine>
             <entityName>TestDev</entityName>
             <state>success</state>
             <cancelled>false</cancelled>
             <cancelable>false</cancelable>
             <TaskReasonUser>
               <userName>bmc</userName>
             </TaskReasonUser>
             <queueTime>2009-05-27T08:26:34.234375Z</queueTime>
             <startTime>2009-05-27T08:26:34.25Z</startTime>
             <completeTime>2009-05-27T08:26:44.484375Z</completeTime>
             <eventChainId>71232</eventChainId>
           </TaskInfo>
         </propSet>
       </returnval>
     </RetrieveTaskStatusResponse>
</vmware-infrastructure-response>

The following table describes the response elements.

 Adapter response elements for the Retrieve Task Status operation


Details for the <TaskReasonAlarm> element

<TaskReasonAlarm>
<alarm></alarm>
<alarmName></alarmName>
<entity></entity>
<entityName></entityName>
</TaskReasonAlarm>



 Details for the <TaskReasonSchedule> element

<TaskReasonSchedule>
<name></name>
<scheduledTask></scheduledTask>
</TaskReasonSchedule>



 Details for the <TaskReasonUser> element

<TaskReasonUser>
<userName></userName>
</TaskReasonUser>



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 20.19.02