5.5

Table Of Contents
3 Create an OrgVdcNetwork element.
a Specify a value of natRouted in the FenceMode element of the network Configuration.
You can specify additional Configuration parameters, as noted in the schema reference.
b Specify the href of the Edge Gateway you chose in Step 1 in the EdgeGateway element.
See the request portion of “Example: Create an Organization VDC Network With a Routed
Connection,” on page 192.
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 192
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 192.
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 161. The network connects through the Edge Gateway created in “Create an Edge Gateway,” on
page 172. 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>
vCloud API Programming Guide
192 VMware, Inc.