Datacenter_Operation
This section illustrates the adapter request and response for the Retrieve Datacenter operation.
Retrieve Datacenters operation
The Retrieve Datacenters operation retrieves the known datacenters and configuration on a VMware VirtualCenter.
The following table describes the elements for this request.
Adapter request elements for Retrieve Datacenters operation
Element | Definition | Required |
|---|---|---|
<operation-type> | Defines the type of operation: Datacenter | Yes |
<operation-name> | Defines the name of operation: Retrieve_Datacenters | 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 data types and elements required to execute the operation | Yes |
The following code sample shows a sample adapter request for the Retrieve Datacenters operation.
Sample adapter request for Retrieve Datacenters operation
<operation-type>Datacenter</operation-type>
<operation-name>Retrieve_Datacenters</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters></parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Retrieve Datacenters operation.
Sample adapter response for Retrieve Datacenters operation
<metadata>
<status>success</status>
</metadata>
<RetrieveDatacentersResponse>
<returnval>
<Datacenter>datacenter-2</Datacenter>
<propSet>
<name>configIssue</name>
<ArrayOfEvent></ArrayOfEvent>
</propSet>
<propSet>
<name>configStatus</name>
<ManagedEntityStatus>gray</ManagedEntityStatus>
</propSet>
<propSet>
<name>customValue</name>
<ArrayOfCustomFieldValue></ArrayOfCustomFieldValue>
</propSet>
<propSet>
<name>datastore</name>
<ArrayOfManagedObjectReference>
<Datastore>dev15 disk1</Datastore>
<Datastore>dev15 disk2</Datastore>
<Datastore>dev15 disk3</Datastore>
</ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>declaredAlarmState</name>
<ArrayOfAlarmState>
<AlarmState>
<key>alarm-1.datacenter-2</key>
<Datacenter>datacenter-2</Datacenter>
<Alarm>alarm-1</Alarm>
<overallStatus>gray</overallStatus>
<time>2009-11-17T06:48:19.09375Z</time>
</AlarmState>
</ArrayOfAlarmState>
</propSet>
<propSet>
<name>disabledMethod</name>
<ArrayOfString></ArrayOfString>
</propSet>
<propSet>
<name>effectiveRole</name>
<ArrayOfInt>
<int>1</int>
</ArrayOfInt>
</propSet>
<propSet>
<name>hostFolder</name>
<Folder>host</Folder>
</propSet>
<propSet>
<name>name</name>
<val>ABC_DEV</val>
</propSet>
<propSet>
<name>network</name>
<ArrayOfManagedObjectReference>
<Network>DummyNetwork</Network>
<Network>VM Network</Network>
</ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>overallStatus</name>
<ManagedEntityStatus>gray</ManagedEntityStatus>
</propSet>
<propSet>
<name>parent</name>
<Folder>Datacenters</Folder>
</propSet>
<propSet>
<name>permission</name>
<ArrayOfPermission>
<Permission>
<Datacenter>datacenter-2</Datacenter>
<principal>abc</principal>
<group>false</group>
<roleId>1</roleId>
<propagate>true</propagate>
</Permission>
<Permission>
<Datacenter>datacenter-2</Datacenter>
<principal>user1</principal>
<group>false</group>
<roleId>-2</roleId>
<propagate>true</propagate>
</Permission>
</ArrayOfPermission>
</propSet>
<propSet>
<name>recentTask</name>
<ArrayOfManagedObjectReference></ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>triggeredAlarmState</name>
<ArrayOfAlarmState></ArrayOfAlarmState>
</propSet>
<propSet>
<name>vmFolder</name>
<Folder>vm</Folder>
</propSet>
</returnval>
<returnval>
<Datacenter>datacenter-60</Datacenter>
<propSet>
<name>configIssue</name>
<ArrayOfEvent></ArrayOfEvent>
</propSet>
<propSet>
<name>configStatus</name>
<ManagedEntityStatus>gray</ManagedEntityStatus>
</propSet>
<propSet>
<name>customValue</name>
<ArrayOfCustomFieldValue></ArrayOfCustomFieldValue>
</propSet>
<propSet>
<name>datastore</name>
<ArrayOfManagedObjectReference>
<Datastore>storage1</Datastore>
<Datastore>storage2</Datastore>
<Datastore>storage3</Datastore>
</ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>declaredAlarmState</name>
<ArrayOfAlarmState>
<AlarmState>
<key>alarm-1.datacenter-60</key>
<Datacenter>datacenter-60</Datacenter>
<Alarm>alarm-1</Alarm>
<overallStatus>gray</overallStatus>
<time>2009-11-17T06:48:19.109375Z</time>
</AlarmState>
</ArrayOfAlarmState>
</propSet>
<propSet>
<name>disabledMethod</name>
<ArrayOfString></ArrayOfString>
</propSet>
<propSet>
<name>effectiveRole</name>
<ArrayOfInt>
<int>1</int>
</ArrayOfInt>
</propSet>
<propSet>
<name>hostFolder</name>
<Folder>host</Folder>
</propSet>
<propSet>
<name>name</name>
<val>ABC_DEV2</val>
</propSet>
<propSet>
<name>network</name>
<ArrayOfManagedObjectReference>
<Network>VM Network</Network>
<Network>Virtual Machine Network</Network>
</ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>overallStatus</name>
<ManagedEntityStatus>gray</ManagedEntityStatus>
</propSet>
<propSet>
<name>parent</name>
<Folder>Datacenters</Folder>
</propSet>
<propSet>
<name>permission</name>
<ArrayOfPermission>
<Permission>
<Datacenter>datacenter-60</Datacenter>
<principal>qauser</principal>
<group>false</group>
<roleId>2</roleId>
<propagate>true</propagate>
</Permission>
<Permission>
<Datacenter>datacenter-60</Datacenter>
<principal>rba</principal>
<group>false</group>
<roleId>1</roleId>
<propagate>true</propagate>
</Permission>
<Permission>
<Datacenter>datacenter-60</Datacenter>
<principal>aouser</principal>
<group>false</group>
<roleId>-2</roleId>
<propagate>true</propagate>
</Permission>
</ArrayOfPermission>
</propSet>
<propSet>
<name>recentTask</name>
<ArrayOfManagedObjectReference></ArrayOfManagedObjectReference>
</propSet>
<propSet>
<name>triggeredAlarmState</name>
<ArrayOfAlarmState></ArrayOfAlarmState>
</propSet>
<propSet>
<name>vmFolder</name>
<Folder>vm</Folder>
</propSet>
</returnval>
</RetrieveDatacentersResponse>
</vmware-infrastructure-response>
The following table describes the response elements.
Adapter response elements for the Retrieve Datacenters operation
Element | Definition |
|---|---|
<datastore> | A collection of references to the datastore objects available in the datacenter |
<hostFolder> | The folder hierarchy that contains the compute resources, including hosts and clusters, for the datacenter |
<network> | A collection of references to the network objects available in this datacenter |
<vmFolder> | The folder hierarchy that contains the virtual machines and templates for the datacenter |
<effectiveRole> | Access rights of the current session to the datacenter |
<permission> | List of permissions defined for the datacenter |
<overallStatus> | The general health of the datacenter. The value combines the status of all the alarms attached to a datacenter. |