5.1

Table Of Contents
4 POST the OrgVdcNetwork element you created in Step 2 to the URL for adding networks to the organization
vDC.
See the request portion of “Example: Create an Organization vDC Network With a Routed
Connection,” on page 171
The server takes the requested action and returns an XML representation of the partially-created object. This
representation includes an href attribute, properties specified in the creation request, and an embedded
Task element that tracks the creation of the object. When the task completes, the object has been created, and
you can use the value of the href attribute with a GET request to retrieve the XML representation of the object.
See the response portion of “Example: Create an Organization vDC Network With a Routed Connection,” on
page 171.
Example: Create an Organization vDC Network With a Routed Connection
This example adds a routed network to the organization vDC created in “Add a vDC to an Organization,” on
page 140. The network connects through the Edge Gateway created in “Create an Edge Gateway,” on
page 151. Because the creation request sets the value of the IsShared element to true, the new network is made
available in all vDCs in this organization.
Request:
POST https://vcloud.example.com/api/admin/vdc/44/networks
Content-Type: application/vnd.vmware.vcloud.orgVdcNetwork+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<OrgVdcNetwork
name="RoutedOvDCNet"
xmlns="http://www.vmware.com/vcloud/v1.5">
<Description>Routed through an Edge Gateway</Description>
<Configuration>
<IpScopes>
<IpScope>
<IsInherited>false</IsInherited>
<Gateway>192.168.0.1</Gateway>
<Netmask>255.255.255.0</Netmask>
<Dns1>10.147.115.1</Dns1>
<DnsSuffix>example.com</DnsSuffix>
<IpRanges>
<IpRange>
<StartAddress>192.168.0.100</StartAddress>
<EndAddress>192.168.0.199</EndAddress>
</IpRange>
</IpRanges>
</IpScope>
</IpScopes>
<FenceMode>natRouted</FenceMode>
</Configuration>
<EdgeGateway
href="https://vcloud.example.com/api/admin/gateway/2000" />
<IsShared>true</IsShared>
</OrgVdcNetwork>
Chapter 6 Creating and Managing Organizations
VMware, Inc. 171