Remove A Network Pool; Import A Virtual Machine From Vcenter; Discover The Virtual Machines In A Vcenter - VMware VCLOUD API 1.0 - API Programming Manual

Table of Contents

Advertisement

vCloud API Programming Guide
Response:
200 OK
...
<vmext:VMWNetworkPool xmlns:vmext="http://www.vmware.com/vcloud/extension/v1"
...
<vmext:VMWNetworkPool>
The response, most of which is not shown here, echoes the request.

Remove a Network Pool

To remove a network pool, a system administrator can make a DELETE request to its href attribute value. The 
response contains a Task that tracks the delete operation.
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

A system administrator can import virtual machines from any vCenter registered to a vCloud. The virtual 
machines can be imported to any vDC in the vCloud, and can be imported in vApp or vApp template form.

Discover the Virtual Machines in a vCenter

A GET request to the vmsList URL in a VimServer response body returns a list of virtual machines registered 
to that vCenter server. Example
Example 7‐3 on page
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"
<vmext:VmObjectRef name="Win2K8">
<vcloud:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
<vcloud:MoRef>vm-642</vcloud:MoRef>
<vcloud:VimObjectType>VIRTUAL_MACHINE</vcloud:VimObjectType>
</vmext:VmObjectRef>
<vmext:VmObjectRef ...>
...
</vmext:VmObjectRef>
</vmext:VmObjectRefsList>
138
xmlns:vcloud="http://www.vmware.com/vcloud/v1" xsi:type="vmext:VlanPoolType"
name="NewVlanPool">
7‐30 retrieves the list of virtual machines from the vmsList URL shown in 
121. 
xmlns:vcloud="http://www.vmware.com/vcloud/v1" ...>
name="vCenter-PA-001"
href="http://vcloud.example.com/api/v1.0/admin/extension/vimServer/100"/>
VMware, Inc.

Advertisement

Table of Contents
loading

Table of Contents