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
<vcloud:DnsSuffix>eng.vmware.com</vcloud:DnsSuffix>
</vcloud:IpScope>
<vcloud:FenceMode>isolated</vcloud:FenceMode>
</vcloud:Configuration>
<vmext:VimPortGroupRef>
<vmext:VimServerRef
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:MoRef>network-175</vmext:MoRef>
<vmext:VimObjectType>NETWORK</vmext:VimObjectType>
</vmext:VimPortGroupRef>
</vmext:VMWExternalNetwork>
Create a Network Pool
Network pools provide support for isolated and NAT-routed networks in a cloud. To create a network pool,
a system administrator must specify backing network resources on a vCenter server attached to the cloud.
A network pool is a collection of vSphere network resources that are available to be consumed as needed to
create isolated or NAT-routed vApp networks and organization networks. Traffic on each network in a pool
is isolated at layer 2 from all other networks.
A network pool can be backed by a vCenter port group or dvSwitch. Pools backed by a dvSwitch can define
one or more VLANs or fences. All network pools are defined by a VMWNetworkPool element. This element can
have one of three types, specified by its xsi:type attribute. The contents of the element depend on its type. See
“Create a VLAN-Backed Network Pool,” on page 184, “Create an Isolation-Backed Network Pool,” on
page 185, and “Create a Portgroup-Backed Network Pool,” on page 187.
Only a system administrator can create a network pool. A system administrator can modify a network pool to
change properties such as its description, but cannot change the network resources, such as virtual switches
or portgroups, that provide backing for it.
Prerequisites
Verify that you are logged in as a system administrator.
Procedure
1 Retrieve the XML representation of the vSphere platform extensions.
Use a request like this one.
GET https://vcloud.example.com/api/admin/extension
2 Examine the response to locate the Link element that contains the URL for adding network pools to your
cloud.
This element has a rel attribute value of add and a type attribute value of
application/vnd.vmware.admin.networkPool+xml, as shown here:
<Link
type="application/vnd.vmware.admin.networkPool+xml"
rel="add"
href="https://vcloud.example.com/api/admin/extension/networkPools"/>
3 Create a VMWNetworkPool element that specifies the pool type and backing vCenter resources.
Details of this element's contents depend on the type of pool you are creating.
4 POST the VMWNetworkPool element you created in Step 3 to the URL described in Step 2.
Chapter 7 Using vCloud API Extensions to Provision and Manage a Cloud
VMware, Inc. 183