Retrieve VM File Info operation
The Retrieve VM File Info operation returns details about the files that match the specified search criteria. The operation searches the folder specified by the datastore and all corresponding subfolders. The Vmware client used by the operation must have at least browse access to the specified datastore.
The following table describes the elements for this request.
Adapter request elements for the Retrieve VM File Info operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of operation: Advanced_Vm | Yes |
<operation-name> | Defines the name of operation: Retrieve_VM_File_Info | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified |
<parameters> | Contains the elements required to execute the operation | Yes |
<virtual-machine> | Contains the name of the virtual machine on which this operation is to be executed | Yes |
<datastore> | Contains the name of the datastore to search for files matching the given criteria | Yes |
<datacenter> | Specifies the datacenter hosting the datastore | Conditional |
<virtual-machine> | Contains the name of the virtual machine used to make the method call | No |
match-pattern | Contains the criteria for searching files in the datastore | No |
The following code sample shows a sample adapter request for the Retrieve VM File Info operation.
Sample adapter request for the Retrieve VM File Info operation
<operation-type>Advanced_Vm</operation-type>
<operation-name>Retrieve_VM_File_Info</operation-name>
<soap-url></soap-url>
<transport></transport
<user-name></user-name>
<password></password>
<parameters>
<datastore>abc15 disk3</datastore>
<virtual-machine>TestVM6</virtual-machine>
<search-spec>
<match-pattern>*.vmdk</match-pattern>
</search-spec>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Retrieve VM File Info operation.
Sample adapter response for the Retrieve VM File Info operation
<metadata>
<status>success</status>
</metadata>
<RetrieveVMFileInfoResponse>
<returnval>
<Task>session[E421C3ED-FCC7-4BA2-93D8-1E7562B9BC06]2E8B024F-0048-4681-8A4A-546F96871866</Task>
<propSet>
<name>info</name>
<TaskInfo>
<key>session[E421C3ED-FCC7-4BA2-93D8-1E7562B9BC06]2E8B024F-0048-4681-8A4A-546F96871866</key>
<Task>session[E421C3ED-FCC7-4BA2-93D8-1E7562B9BC06]2E8B024F-0048-4681-8A4A-546F96871866</Task>
<name>SearchDatastoreSubFolders_Task</name>
<descriptionId>host.DatastoreBrowser.searchSubFolders</descriptionId>
<Datacenter>datacenter-2</Datacenter>
<entityName>ABC_DEV</entityName>
<state>success</state>
<cancelled>false</cancelled>
<cancelable>false</cancelable>
<ArrayOfHostDatastoreBrowserSearchResults>
<HostDatastoreBrowserSearchResults>
<Datastore>datastore-15</Datastore>
<folderPath>[abc15 disk3] TestVM6/</folderPath>
<file>
<path>TestVM6-flat.vmdk</path>
<fileSize>5144576000</fileSize>
<modification>2009-10-12T07:27:02-04:00</modification>
</file>
<file>
<path>TestVM6.vmdk</path>
<fileSize>396</fileSize>
<modification>2009-10-13T07:10:39-04:00</modification>
</file>
<file>
<path>TestVM6_1-flat.vmdk</path>
<fileSize>5144576000</fileSize>
<modification>2009-10-12T07:29:39-04:00</modification>
</file>
<file>
<path>TestVM6_1.vmdk</path>
<fileSize>398</fileSize>
<modification>2009-10-13T07:10:40-04:00</modification>
</file>
</HostDatastoreBrowserSearchResults>
</ArrayOfHostDatastoreBrowserSearchResults>
<TaskReasonUser>
<userName>rba</userName>
</TaskReasonUser>
<queueTime>2009-12-28T06:13:32.6875Z</queueTime>
<startTime>2009-12-28T06:13:32.6875Z</startTime>
<completeTime>2009-12-28T06:13:32.8125Z</completeTime>
<eventChainId>0</eventChainId>
</TaskInfo>
</propSet>
</returnval>
</RetrieveVMFileInfoResponse>
</vmware-infrastructure-response>
The following code sample describes the adapter response elements.
Adapter response elements for the Retrieve VM File Info operation
Element | Definition |
---|---|
<Task> | A task is used to monitor and potentially cancel long running operations |
<cancelable> | Flag to indicate whether or not the cancel task operation is supported |
<cancelled> | Flag to indicate whether or not the client requested cancellation of the task |
<completeTime> | Time stamp when the task was completed (whether success or failure) |
<descriptionId> | An identifier for this operation |
<entity> | Managed entity to which the operation applies |
<entityName> | The name of the managed entity, locale-specific, retained for the history collector database |
<error> | If the task state is error, this property contains the fault code. |
<eventChainId> | Event chain ID that leads to the corresponding events |
<locked> | If the state of the task is running, this property is a list of managed entities that the operation has locked, with a shared lock. |
<name> | The name of the operation that created the task |
<progress> | If the task state is running, this property contains a progress measurement, expressed as percentage completed, from 0 to 100. |
<queueTime> | Time stamp when the task was created |
<reason> | Kind of entity responsible for creating this task |
<result> | If the task state is success, this property may contain a return value |
<startTime> | Time stamp when the task started running |
<state> | Runtime status of the task |
<task> | The managed object that represents this task |