Add Organization Network operation
The Add Organization Network operation enables you to create an organization network. The top level of your virtual infrastructure is called the organization. Only the vCloud system administrator can perform this operation.
The following figure shows a sample <items> XML element for the Add Organization Network operation:
Sample <items> XML element for the Add Organization Network operation
<item>
<parameters>
<organization-id></organization-id>
<add-organization-network-params>
<network-name></network-name>
<description></description>
<configuration>
<ip-scope>
<is-inherited></is-inherited>
<gateway></gateway>
<netmask></netmask>
<dns1></dns1>
<dns-suffix></dns-suffix>
<ip-ranges>
<ip-range>
<start-address></start-address>
<end-address></end-address>
</ip-range>
</ip-ranges>
</ip-scope>
<fence-mode></fence-mode>
<parent-network-id></parent-network-id>
</configuration>
<network-pool-id></network-pool-id>
</add-organization-network-params>
</parameters>
</item>
</items>
The following table describes the elements for this adapter request:
Adapter request elements for the Add Organization Network operation
Element | Definition | Required |
|---|---|---|
<operation-name> | Defines the type of operation: Add_Organization_Network | Yes |
<vcloud-organization> | Specifies the name of the vCloud organization | Conditional:
|
<user-name> | Specifies the user name required for basic HTTP authentication on vCloud | Conditional:
|
<password> | Contains the password corresponding to the specified user name | Conditional:
|
<parameters> | Contains the elements for the operation | Yes |
<organization-id> | Specifies the ID of the organization where the network is added | Yes |
<network-name> | Specifies the name of the network | Yes |
<description> | Specifies the description for the network | No |
<configuration> | Specifies the properties of the network | Yes |
<ip-scope> | Specifies the address range, gateway, netmask, DNS, and other properties of the network | Conditional; required when creating a NAT-routed or isolated network |
<is-inherited> | Specifies whether the values in the <ip-scope> element are inherited from the parent network | Conditional; required when creating a NAT-routed or isolated network |
<gateway> | Specifies the IP address of the network gateway | Conditional; required when creating a NAT-routed or isolated network |
<netmask> | Specifies the network mask that you must apply to addresses on the network | Conditional; required when creating a NAT-routed or isolated network |
<dns1> | Specifies the IP address of the primary DNS server for the network | Conditional; required when creating a NAT-routed or isolated network |
<dns2> | Specifies the IP address of the secondary DNS server for the network | No |
<dns-suffix> | Specifies the suffix that you must use when resolving host names that are not fully qualified | No |
<ip-ranges> | Contains the <ip-range> elements | No |
<ip-range> | Defines the address range of the network | No |
<start-address> | Specifies the start IP address for the IP range | Conditional; required if <ip-range> is specified |
<end-address> | Specifies the end IP address for the IP range | No |
<parent-network-id> | Specifies the ID of the network to which this network connects | Conditional; required when creating a NAT-routed or bridged network |
<fence-mode> | Specifies how this network is connected to its parent network | Yes |
<network-pool-id> | Specifies the ID of the network pool from which this network is provisioned | Conditional; required when creating a NAT-routed or isolated network |
The following figure shows the sample adapter request for the Add Organization Network operation when the <fence-mode> element is set to isolated:
Sample adapter request for the Add Organization Network operation (fence-mode=isolated)
<operation-name>Add_Organization_Network</operation-name>
<vcloud-organization>TestOrg</vcloud-organization>
<user-name>TestUser</user-name>
<password>Password</password>
<parameters>
<organization-id>2001447251</organization-id>
<add-organization-network-params>
<network-name>test network7</network-name>
<description>network description</description>
<configuration>
<ip-scope>
<is-inherited>false</is-inherited>
<gateway>10.128.138.1</gateway>
<netmask>255.255.255.0</netmask>
<dns1>10.128.138.1</dns1>
<dns-suffix>abc</dns-suffix>
<ip-ranges>
<ip-range>
<start-address>10.128.138.2</start-address>
<end-address>10.128.138.100</end-address>
</ip-range>
</ip-ranges>
</ip-scope>
<fence-mode>isolated</fence-mode>
</configuration>
<network-pool-id>344943813</network-pool-id>
</add-organization-network-params>
</parameters>
</vmware-vcloud-request>
The following figure shows the sample adapter request for the Add Organization Network operation when the <fence-mode> element is set to bridged:
Sample adapter request for the Add Organization Network operation (fence-mode=bridged)
<operation-name>Add_Organization_Network</operation-name>
<vcloud-organization>TestOrg</vcloud-organization>
<user-name>TestUser</user-name>
<password>Password</password>
<parameters>
<organization-id>2001447251</organization-id>
<add-organization-network-params>
<network-name>test network direct</network-name>
<description>network description</description>
<configuration>
<parent-network-id>897478769</parent-network-id>
<fence-mode>bridged</fence-mode>
</configuration>
</add-organization-network-params>
</parameters>
</vmware-vcloud-request>
The following figure shows the sample adapter request for the Add Organization Network operation when the <fence-mode> element is set to natRouted:
Sample adapter request for the Add Organization Network operation (fence-mode=natRouted)
<operation-name>Add_Organization_Network</operation-name>
<vcloud-organization>TestOrg</vcloud-organization>
<user-name>TestUser</user-name>
<password>Password</password>
<parameters>
<organization-id>2001447251</organization-id>
<add-organization-network-params>
<network-name>test network natrouted</network-name>
<description>network description</description>
<configuration>
<ip-scope>
<is-inherited>false</is-inherited>
<gateway>110.128.128.1</gateway>
<netmask>255.255.255.0</netmask>
<dns1>10.128.120.1</dns1>
<dns-suffix>abc</dns-suffix>
<ip-ranges>
<ip-range>
<start-address>10.128.128.2</start-address>
<end-address>10.128.128.100</end-address>
</ip-range>
</ip-ranges>
</ip-scope>
<fence-mode>natRouted</fence-mode>
<parent-network-id>897478769</parent-network-id>
</configuration>
<network-pool-id>344943813</network-pool-id>
</add-organization-network-params>
</parameters>
</vmware-vcloud-request>
The following figure shows the response for the sample request when the <fence-mode> element is set to isolated:
Sample adapter response for the Add Organization Network operation (fence-mode=isolated)
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>Created</reason>
</status-line>
<message-body>
<OrgNetwork name="test network7" type="application/vnd.vmware.admin
.network+xml" href="https://10.128.248.112/api/v1.0/admin/network/1581390567">
<Link rel="alternate" type="application/vnd.vmware.vcloud.network+xml"
href="https://10.128.248.112/api/v1.0/network/1581390567" />
<Link rel="edit" type="application/vnd.vmware.admin.network+xml"
href="https://10.128.248.112/api/v1.0/admin/network/1581390567" />
<Link rel="remove" href="https://10.128.248.112/api/v1.0/admin/network
/1581390567" />
<Link rel="up" type="application/vnd.vmware.admin.organization+xml"
href="https://10.128.248.112/api/v1.0/admin/org/2001447251" />
<Description>network description</Description>
<Tasks>
<Task status="running" startTime="2011-01-27T16:32:34.655+05:30"
operation="Creating Network test network7(1581390567)"
expiryTime="2011-04-27T16:32:34.655+05:30" endTime="9999-12-31T23:59:59.999+05:30"
type="application/vnd.vmware.vcloud.task+xml"
href="https://10.128.248.112/api/v1.0/task/r31d5h6tyv1nlyicv3">
<Owner type="application/vnd.vmware.admin.network+xml"
name="test network7" href="https://10.128.248.112/api/v1.0/admin/network/
1581390567" />
</Task>
</Tasks>
<Configuration>
<IpScope>
<IsInherited>false</IsInherited>
<Gateway>10.128.138.1</Gateway>
<Netmask>255.255.255.0</Netmask>
<Dns1>10.128.138.1</Dns1>
<DnsSuffix>abc</DnsSuffix>
<IpRanges>
<IpRange>
<StartAddress>10.128.138.2</StartAddress>
<EndAddress>10.128.138.100</EndAddress>
</IpRange>
</IpRanges>
</IpScope>
<FenceMode>isolated</FenceMode>
</Configuration>
<NetworkPool href="https://10.128.248.112/api/v1.0/admin/extension/
networkPool/344943813" />
</OrgNetwork>
</message-body>
</vmware-vcloud-response>
The following figure shows the response for the sample request when the <fence-mode> element is set to bridged:
Sample adapter response for the Add Organization Network operation (fence-mode=bridged)
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>Created</reason>
</status-line>
<message-body>
<OrgNetwork name="test network direct" type="application/vnd.vmware.
admin.network+xml" href="https://10.128.248.112/api/v1.0/admin/network/
2143471333">
<Link rel="alternate" type="application/vnd.vmware.vcloud.network+xml"
href="https://10.128.248.112/api/v1.0/network/2143471333" />
<Link rel="edit" type="application/vnd.vmware.admin.network+xml"
href="https://10.128.248.112/api/v1.0/admin/network/2143471333" />
<Link rel="remove" href="https://10.128.248.112/api/v1.0/admin/network/
2143471333" />
<Link rel="up" type="application/vnd.vmware.admin.organization+xml"
href="https://10.128.248.112/api/v1.0/admin/org/2001447251" />
<Description>network description</Description>
<Tasks>
<Task status="running" startTime="2011-01-27T10:53:44.287+05:30"
operation="Creating Network test network direct(2143471333)"
expiryTime="2011-04-27T10:53:44.287+05:30" endTime="9999-12-31T23:59:59.
999+05:30" type="application/vnd.vmware.vcloud.task+xml"
href="https://10.128.248.112/api/v1.0/task/37ztmkenstfvc6aghsv">
<Owner type="application/vnd.vmware.admin.network+xml" name="test
network direct" href="https://10.128.248.112/api/v1.0/admin/network/
2143471333" />
</Task>
</Tasks>
<Configuration>
<IpScope>
<IsInherited>true</IsInherited>
<Gateway>10.128.248.1</Gateway>
<Netmask>255.255.254.0</Netmask>
<Dns1>137.72.225.1</Dns1>
<IpRanges>
<IpRange>
<StartAddress>10.128.249.120</StartAddress>
<EndAddress>10.128.249.122</EndAddress>
</IpRange>
</IpRanges>
</IpScope>
<ParentNetwork type="application/vnd.vmware.admin.network+xml"
name="vCSDExternalNetwork" href="https://10.128.248.112/api/v1.0/admin
/network/
897478769" />
<FenceMode>bridged</FenceMode>
</Configuration>
</OrgNetwork>
</message-body>
</vmware-vcloud-response>
The following figure shows the response for the sample request when the <fence-mode> element is set to natRouted:
Sample adapter response for the Add Organization Network operation (fence-mode=natRouted)
<metadata>
<status>success</status>
</metadata>
<status-line>
<code>201</code>
<reason>Created</reason>
</status-line>
<message-body>
<OrgNetwork name="test network natrouted" type="application/
vnd.vmware.admin.network+xml" href="https://10.128.248.112/api/v1.0/
admin/network/787225180">
<Link rel="alternate" type="application/vnd.vmware.vcloud.
network+xml" href="https://10.128.248.112/api/v1.0/network/787225180" />
<Link rel="edit" type="application/vnd.vmware.admin.network+xml"
href="https://10.128.248.112/api/v1.0/admin/network/787225180" />
<Link rel="remove" href="https://10.128.248.112/api/v1.0/admin/
network/787225180" />
<Link rel="up" type="application/vnd.vmware.admin.organization+xml"
href="https://10.128.248.112/api/v1.0/admin/org/2001447251" />
<Description>network description</Description>
<Tasks>
<Task status="running" startTime="2011-01-25T14:46:49.685+05:30"
operation="Creating Network test network natrouted(787225180)"
expiryTime="2011-04-25T14:46:49.685+05:30" endTime="9999-12-31T23:59:59
.999+05:30" type="application/vnd.vmware.vcloud.task+xml" href="https://
10.128.248.112/api/v1.0/task/mlgmyppzw2oom9rted">
<Owner type="application/vnd.vmware.admin.network+xml"
name="test network natrouted" href="https://10.128.248.112/api/v1.0/
admin/network/787225180" />
</Task>
</Tasks>
<Configuration>
<IpScope>
<IsInherited>false</IsInherited>
<Gateway>10.128.128.1</Gateway>
<Netmask>255.255.255.0</Netmask>
<Dns1>10.128.120.1</Dns1>
<IpRanges>
<IpRange>
<StartAddress>10.128.128.2</StartAddress>
<EndAddress>10.128.128.100</EndAddress>
</IpRange>
</IpRanges>
</IpScope>
<ParentNetwork type="application/vnd.vmware.admin.network+xml"
name="vCSDExternalNetwork" href="https://10.128.248.112/api/v1.0/admin/
network/897478769" />
<FenceMode>natRouted</FenceMode>
</Configuration>
<NetworkPool href="https://10.128.248.112/api/v1.0/admin/
extension/networkPool/
344943813" />
</OrgNetwork>
</message-body>
</vmware-vcloud-response>