1.5

Table Of Contents
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.