List Available Resource Pools On A Vcenter Server - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

Example 7-3. Get Information About a vCenter Server
Request:
GET http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100
Response:
200 OK
Content-Type: application/vnd.vmware.admin.vmwvirtualcenter+xml
...
<vmext:VimServer xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
<vcloud:Link rel="down" type="application/vnd.vmware.admin.vmsObjectRefsList+xml"
<vcloud:Link rel="down" type="application/vnd.vmware.admin.resourcePoolList+xml"
<vcloud:Link rel="add" type="application/vnd.vmware.admin.importVmAsVAppParams+xml"
<vcloud:Link rel="add" type="application/vnd.vmware.admin.importVmAsVAppTemplateParams+xml"
<vcloud:Link rel="unregister"
<vcloud:Description>vCenter created by the Configuration Wizard</vcloud:Description>
<vmext:Username>administrator</vmext:Username>
<vmext:Url>http://10.147.40.234:443</vmext:Url>
<vmext:IsEnabled>true</vmext:IsEnabled>
<vmext:ShieldManagerIP>10.147.44.59</vmext:ShieldManagerIP>
<vmext:ShieldManagerUserName>admin</vmext:ShieldManagerUserName>
</vmext:VimServer>

List Available Resource Pools on a vCenter Server

The VimServer element returned in response to a GET request to a vimServer URL contains a rel="down" 
link whose href value is a URL that returns a list of available resource pools hosted on that server. A pool is 
considered available if it is not in use in a vDC. A system administrator can make a GET request to that URL 
to list the available pools. Example
Example
7‐3.
Example 7-4. List Available Resource Pools on a vCenter Server
Request:
GET http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/resourcePoolList
Response:
200 OK
Content-Type: application/vnd.vmware.admin.resourcepoollist+xml
...
<vmext:ResourcePoolList xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
<vcloud:Link rel="up" type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
<vmext:ResourcePool name="Cluster-1">
<vmext:MoRef>resgroup-1159</vmext:MoRef>
<vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
<vmext:DataStoreRefs/>
</vmext:ResourcePool>
<vmext:ResourcePool name="Cluster-2">
<vmext:MoRef>resgroup-1064</vmext:MoRef>
VMware, Inc.
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="VC-02" ... >
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
vmsList"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
resourcePoolList"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
importVmAsVApp"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
importVmAsVAppTemplate"/>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/action/
unregister"/>
7‐4 makes such a request using the resourcePoolList URL from 
xmlns:vcloud="http://www.vmware.com/vcloud/v1" ...>
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
Chapter 7 VMware vSphere Platform Operations
121

Advertisement

Table of Contents
loading

Table of Contents