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
Procedure
1 Choose an external network on which to base the new network.
2 Create an OrgNetwork element.
Specify the href of the external network you chose in Step 1 in the ParentNetwork element. The type and
name attributes are optional here. See the request portion of “Example: Create an Organization Network
With a Direct Connection,” on page 126.
3 POST the OrgNetwork element you created in Step 2 to the URL for adding networks to the organization.
See the request portion of “Example: Create an Organization Network With a Direct Connection,” on
page 126
The server creates the new organization network, and returns an OrgNetwork element that includes the contents
you POSTed, along with a set of Link elements that you can use to access, remove, or modify it. Users can
reference this network using the URL specified in the href attribute of the Link where rel="alternate". The
new network is added to the list of Networks shown in the AdminOrg element that represents the organization.
See the response portion of “Example: Create an Organization Network With a Direct Connection,” on
page 126.
Example: Create an Organization Network With a Direct Connection
This example adds a directly-connected network with a DHCP service to the organization created in
“Example: Create an Organization,” on page 113. Because the network has a Configuration whose
ParentNetwork element specifies an ExternalNetwork to connect to and sets the FenceMode to bridged, it provides
a direct connection to the parent network.
Request:
POST https://vcloud.example.com/api/admin/org/26/networks
Content-Type: application/vnd.vmware.admin.orgNetwork+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<OrgNetwork
name="Internet"
xmlns="http://www.vmware.com/vcloud/v1.5">
<Description>Bridged to the public Internet</Description>
<Configuration>
<ParentNetwork
href="https://vcloud.example.com/api/admin/extension/externalnet/network/7" />
<FenceMode>bridged</FenceMode>
<Features>
<DhcpService>
<IsEnabled>false</IsEnabled>
<DefaultLeaseTime>3600</DefaultLeaseTime>
<MaxLeaseTime>7200</MaxLeaseTime>
<IpRange>
<StartAddress>192.168.0.2</StartAddress>
<EndAddress>192.168.0.99</EndAddress>
</IpRange>
</DhcpService>
</Features>
</Configuration>
</OrgNetwork>
vCloud API Programming Guide
126 VMware, Inc.