Edit vCloud Organization Network

To edit an organization network, use the following request:

1
2
PUT /org_networks/:id.xml
PUT /org_networks/:id.json

You can edit the following types of organization networks:

Edit Direct Network

XML Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<org_network><label>direct</label><shared>0</shared><primary_dns></primary_dns><secondary_dns></secondary_dns><dns_suffix></dns_suffix></org_network>'

JSON Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"org_network": {"label": "direct", "shared": "0", "primary_dns": "", "secondary_dns": "", "dns_suffix": ""}}'

Where:

  • label - the name of the network
  • shared - set 1 to make the direct organization network shared; otherwise, set 0
  • primary_dns - the IP address of the primary domain name system (DNS) server
  • secondary_dns - the IP address of the secondary domain name system (DNS) server
  • dns_suffix - the DNS suffix

The HTTP 201 response is returned upon successfully editing a direct NSX-T network with the shared parameter set to 0. The HTTP 422 response is returned upon failure to edit a direct NSX-T network by setting the shared parameter to 1.

Edit Routed Network

XML Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<org_network><label>routed</label><shared>0</shared><primary_dns></primary_dns><secondary_dns></secondary_dns><dns_suffix></dns_suffix><ip_ranges_attributes><ip_ranges_attribute><start_address></start_address><end_address></end_address></ip_ranges_attribute></ip_ranges_attributes><ip_ranges_attributes><start_address></start_address><end_address></end_address></ip_ranges_attributes></org_network>'

JSON Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"org_network": {"label": "routed", "shared": "0", "primary_dns": "", "secondary_dns": "", "dns_suffix": "", "ip_ranges_attributes": [{"start_address": "", "end_address": ""}]}}'

Where:

  • label - the name of the network
  • shared - set 1 to make the routed organization network shared; otherwise, set 0
  • primary_dns - the IP address of the primary domain name system (DNS) server
  • secondary_dns - the IP address of the secondary domain name system (DNS) server
  • dns_suffix - the DNS suffix
  • ip_ranges_attributes - an array of static IP pools (applicable to isolated and routed org networks)
  • ip_ranges_attribute - а static IP pool (applicable to isolated and routed org networks)
    • start_address - specify the start IP address
    • end_address - specify the end IP address

The HTTP 201 response is returned upon successfully editing a routed NSX-T network with the shared parameter set to 0. The HTTP 422 response is returned upon failure to edit a routed NSX-T network by setting the shared parameter to 1.

Edit Isolated Network

XML Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d '<org_network><label>isolated</label><shared>0</shared><primary_dns></primary_dns><secondary_dns></secondary_dns><dns_suffix></dns_suffix><ip_ranges_attributes><ip_ranges_attribute><start_address></start_address><end_address></end_address></ip_ranges_attribute></ip_ranges_attributes><ip_ranges_attributes><start_address></start_address><end_address></end_address></ip_ranges_attributes></org_network>'

JSON Request Example

1
curl -i -X PUT -u user:userpass --url http://onapp.test/org_networks/12.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"org_network": {"label": "isolated", "shared": "0", "primary_dns": "", "secondary_dns": "", "dns_suffix": "", "ip_ranges_attributes": [{"start_address": "", "end_address": ""}]}}'

Where:

  • label - the name of the network
  • shared - set 1 to make the isolated organization network shared; otherwise, set 0
  • primary_dns - the IP address of the primary domain name system (DNS) server
  • secondary_dns - the IP address of the secondary domain name system (DNS) server
  • dns_suffix - the DNS suffix
  • ip_ranges_attributes - an array of static IP pools (applicable to isolated and routed org networks)
  • ip_ranges_attribute - а static IP pool (applicable to isolated and routed org networks)
    • end_address - specify the end IP address
    • start_address - specify the start IP address

The HTTP 201 response is returned upon successfully editing an isolated NSX-T network with the shared parameter set to 0. The HTTP 422 response is returned upon failure to edit an isolated NSX-T network by setting the shared parameter to 1.