1.5
Table Of Contents
- vCloud API Programming Guide
- Contents
- vCloud API Programming Guide
- About the VMware vCloud API
- Hello vCloud: A Simplified RESTful Workflow
- Exploring a Cloud
- Provisioning an Organization with vApps, Templates, and Media
- Deploying and Operating vApps
- Summary of vCloud API vApp and Virtual Machine Operations Requests
- Create a vApp From a Template
- Compose a vApp From Existing Virtual Machines
- Recompose a vApp to Add or Remove Virtual Machines
- Operate a vApp
- Configuring vApps and Virtual Machines
- Retrieve the Configuration Links for a vApp
- Retrieve the Configuration Links for a Virtual Machine
- Retrieve or Update a Modifiable Section
- Update a vApp Network Configuration
- Update the NetworkConnectionSection of a Virtual Machine
- Retrieve or Modify the CPU Configuration of a Virtual Machine
- Retrieve or Modify the GuestCustomizationSection of a Virtual Machine
- Retrieve or Modify ProductSection Elements
- Retrieve or Modify Groups of Related Sections in a Virtual Machine
- Retrieve or Modify the Hard Disk Configuration of a Virtual Machine
- Creating, Provisioning, and Managing Organizations
- Summary of Administrative Requests
- Administrator Credentials and Privileges
- Organization Administration
- Network Administration
- vDC Administration
- Catalog Administration
- User and Group Administration
- Working With Roles and Rights
- Controlling Access to vApps and Catalogs
- Using vCloud API Extensions to Provision and Manage a Cloud
- Working With Object Metadata
- Using the Query Service
- Configuring and Using Blocking Tasks and Notifications
- XML Representations in the vCloud API
- Index
The server creates the network pool and returns a VMWNetworkPool element that includes the contents you
POSTed, along with a set of Link elements that you can use to access, remove, disable, or modify it. A reference
to the new network pool is added to the VMWNetworkPoolReferences element of the VCloud. Network resources
you specified in the VMWNetworkPool element are removed from the VimObjectRefList of the vCenter server.
Create a VLAN-Backed Network Pool
To create a VLAN-backed network pool, create a VMWNetworkPool element whose type attribute has the value
VlanPoolType, and POST the element to your cloud's add link for networkPools.
A VLAN-backed network pool is backed by a range of VLAN IDs.
Prerequisites
n
Verify that you are logged in as a system administrator.
n
Verify that you know your cloud's add URL for networkPools. See “Create a Network Pool,” on
page 183.
n
Verify that at least one vCenter server attached to your cloud has network resources available. See
“Retrieve a List of Network Resources from a vCenter Server,” on page 170
Procedure
1 Choose a vCenter server to provide a switch for the network pool.
2 Create a VMWNetworkPool element that specifies the properties of the network pool.
See the request potion of “Example: Create a VLAN-Backed Network Pool,” on page 184.
3 POST the VMWNetworkPool element you created in Step 2 to your cloud's add URL for networkPools.
See the request portion of “Example: Create a VLAN-Backed Network Pool,” on page 184.
Example: Create a VLAN-Backed Network Pool
Request:
POST https://vcloud.example.com/api/admin/extension/networkPools
Content-Type: application/vnd.vmware.admin.networkPool+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<vmext:VMWNetworkPool
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="vmext:VlanPoolType"
name="example-Vlan-pool">
<vcloud:Description>Example VLAN-backed network pool</vcloud:Description>
<vmext:VlanRange>
<vmext:Start>1</vmext:Start>
<vmext:End>4</vmext:End>
</vmext:VlanRange>
<vmext:VimSwitchRef>
<vmext:VimServerRef
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:MoRef>dvs-33</vmext:MoRef>
<vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>
</vmext:VimSwitchRef>
</vmext:VMWNetworkPool>
vCloud API Programming Guide
184 VMware, Inc.