vCloud API Programming Guide
138 VMware, Inc.
Response:
200 OK
...
<vmext:VMWNetworkPool xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" xsi:type="vmext:VlanPoolType"
name="NewVlanPool">
...
<vmext:VMWNetworkPool>
Theresponse,mostofwhichisnotshownhere,echoestherequest.
Remove a Network Pool
Toremoveanetworkpool,asystemadministratorcanmakeaDELETErequestto itshrefattributevalue.The
responsecontainsaTaskthattracksthedeleteoperation.
Example 7-29. Remove a Network Pool
Request:
DELETE http://vcloud.example.com/api/v1.0/admin/extension/networkPool/41
Response:
204 No Content
Import a Virtual Machine from vCenter
AsystemadministratorcanimportvirtualmachinesfromanyvCenterregisteredtoavCloud.Thevirtual
machinescanbeimportedtoanyvDCinthevCloud,andcanbeimportedinvApporvApptemplateform.
Discover the Virtual Machines in a vCenter
AGETrequesttothevmsListURLinaVimServerresponsebodyreturnsalistofvirtualmachinesregistered
tothatvCenterserver.Example 7‐30retrievesthelistofvirtualmachinesfromthevmsListURLshownin
Example 7‐3onpage 121.
Example 7-30. Discover the Virtual Machines in a vCenter
Request:
GET http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100/vmsList
Response:
200 OK
Content-Type: application/vnd.vmware.admin.vmsobjectrefslist+xml
...
<vmext:VmObjectRefsList xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1" ...>
<vmext:VmObjectRef name="Win2K8">
<vcloud:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
name="vCenter-PA-001"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
<vcloud:MoRef>vm-642</vcloud:MoRef>
<vcloud:VimObjectType>VIRTUAL_MACHINE</vcloud:VimObjectType>
</vmext:VmObjectRef>
<vmext:VmObjectRef ...>
...
</vmext:VmObjectRef>
</vmext:VmObjectRefsList>