VMware, Inc.
121
Chapter 7 VMware vSphere Platform Operations
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.vmwvirtuaxml
...
<vmext:VimServer xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" name="VC-02" ... >
<vcloud:Link rel="down" type="application/vnd.vmware.admin.vmsObjectRxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
vmsList"/>
<vcloud:Link rel="down" type="application/vnd.vmware.admin.resourcePxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
resourcePoolList"/>
<vcloud:Link rel="add" type="application/vnd.vmware.admin.importVmAsVApxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
importVmAsVApp"/>
<vcloud:Link rel="add" type="application/vnd.vmware.admin.importVmAsVAppTemplatxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/
importVmAsVAppTemplate"/>
<vcloud:Link rel="unregister"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/action/
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 7
‐
4
makes
such
a
request
using
the
resourcePoolList
URL
from
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.resourcepxml
...
<vmext:ResourcePoolList xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" ...>
<vcloud:Link rel="up" type="application/vnd.vmware.admin.vmwvirtuaxml"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
<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>
Содержание VCLOUD API 1.0 - TECHNICAL NOTE
Страница 10: ...vCloud API Programming Guide 10 VMware Inc...
Страница 20: ...vCloud API Programming Guide 20 VMware Inc...
Страница 32: ...vCloud API Programming Guide 32 VMware Inc...
Страница 90: ...vCloud API Programming Guide 90 VMware Inc...
Страница 150: ...vCloud API Programming Guide 150 VMware Inc...
Страница 170: ...vCloud API Programming Guide 170 VMware Inc...
Страница 202: ...vCloud API Programming Guide 202 VMware Inc...
Страница 212: ...vCloud API Programming Guide 212 VMware Inc...