1.5

Table Of Contents
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
</vmext:ResourcePool>
<vmext:ResourcePool
name="cluster3">
<vmext:MoRef>resgroup-230</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
<vmext:DataStoreRefs>
<vmext:VimObjectRef>
<vmext:VimServerRef
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
name="vc9-ds10"
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:MoRef>datastore-174</vmext:MoRef>
<vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:DataStoreRefs>
</vmext:ResourcePool>
...
</vmext:ResourcePoolList>
Retrieve a List of Network Resources from a vCenter Server
You can retrieve the list of network resources such as portgroups and switches that are available on a vCenter
server registered to a cloud. To retrieve the list, make a GET request to the server's networks link.
Retrieving the networks link from a VimServer element returns a VimObjectRefList element that contains
references to available DV_SWITCH and DV_PORTGOUP objects on the server. DV_SWITCH and DV_PORTGOUP objects
that a provider network is using are not listed, because they are considered unavailable. See “Finding Available
vCenter Resources,” on page 167.
Prerequisites
Verify that you are logged in as a system administrator.
Procedure
1 Retrieve the XML representation of a vCenter server registered to your cloud.
2 Examine the response, a VimServer element, to locate the networks link.
This link has the following form:
<vcloud:Link
rel="down"
type="application/vnd.vmware.admin.vimServerNetworks+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9/networks" />
3 Retrieve the list of network resources.
See “Example: Retrieve a List of Network Resources from a vCenter Server,” on page 170. If the list is
empty, all network resources on the server are already in use.
Example: Retrieve a List of Network Resources from a vCenter Server
Request:
GET https://vcloud.example.com/api/admin/extension/vimServer/9/networks
vCloud API Programming Guide
170 VMware, Inc.