PublicNetworksResource


Create a public network in a datacenter


To create a public, external, or unmanaged network, supply a VLAN data entity as follows:
  • For an external network, supply the link to an enterprise.
  • For an unmanaged network, supply a link to an enterprise and set the unmanaged attribute to "true"
  • For a public network, do not supply a link to an enterprise or set the unmanaged attribute

Note that this method will NOT create the network in a device. It will be only a logical representation of the network. If you want to create a network in a device, use the network resource for that device.

POST https://example.com/api/admin/datacenters/{datacenter}/network

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : vlan Accept : vlan

Error Codes

  • CONSTR-IP - The property 'address' must be an IP address.
  • CONSTR-MIN - Parameter 'datacenter' must be greater than or equal to 1 but value '-3' was found
  • DC-0 - The requested datacenter does not exist
  • EN-0 - The requested enterprise does not exist
  • GEN-4 - Not enough permissions to perform this action
  • NST-10 - Invalid datacenter identifier in the network service type link
  • NST-2 - The requested network service type does not exist
  • VLAN-41 - IP format is invalid
  • VLAN-5 - This network can have a netmask of between 30 and 22. Use a value below 30
  • VLAN-75 - IPv6 networks can have a netmask of 64, 56 or 48
  • VLAN-80 - IPv4 VLANs cannot be strict
  • VLAN-93 - The device does not support this networking operation

Example

List public and external and unmanaged networks in a datacenter


GET https://example.com/api/admin/datacenters/{datacenter}/network

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
limit Integer 25 The number of entities to retrieve
has String If present filter to apply in the search.
by String Order by
asc boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
type String Type of VLANs to retrieve. Available values are PUBLIC, EXTERNAL, UNMANAGED, and EXTERNAL_UNMANAGED (to return both). If not supplied, return all types

Accept : vlans

Example

Get vlan tag availability in a datacenter


Check if other networks in the datacenter are already using the tag.

GET https://example.com/api/admin/datacenters/{datacenter}/network/action/checkavailability

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
tag Integer Identifier of the tag.

Example

List external ips in a datacenter


Returns the list of all External IPs registered in the datacenter.

GET https://example.com/api/admin/datacenters/{datacenter}/network/action/externalips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search results. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}. The default is IP
has String Filter the search by the presence of an attribute. It can be filtered by: IP address, MAC address, network name, Virtual Machine name, Virtual appliance name, or Enterprise Name
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
all Boolean false If true, return all IPs. Otherwise, only return the available ones. The default is false

Accept : externalips

Example

List public ips in a datacenter


Return the list of public IPs for a given datacenter.

GET https://example.com/api/admin/datacenters/{datacenter}/network/action/publicips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String How to filter the search. It can be filtered by: IP address, MAC address, network name, Virtual Machine name, Virtual Appliance name or Enterprise Name
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
all Boolean false If true, return all IPs. Otherwise, only return the available ones. Default is false

Accept : publicips

Example

List unmanaged ips in a datacenter


Return the list of unmanaged IPs for a given datacenter.

GET https://example.com/api/admin/datacenters/{datacenter}/network/action/unmanagedips

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String ip How to order the search. Available values are: \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String How to filter the search. It can be filtered by: IP address, MAC address, network name, Virtual Machine name, Virtual Appliance name or Enterprise Name
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)
all Boolean false If true, retrieve all IPs. Otherwise, retrieve only the available ones.

Accept : unmanagedips

Example

Delete a public external or unmanaged network in a datacenter


You can only delete a network if no IPs are in use. In addition, you can only delete public networks if no IPs are assigned to a virtual datacenter.

DELETE https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Example

Get a public external or unmanaged network in a datacenter


GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_MANAGE_VAPP, ROLE_VDC_ENUMERATE]

Accept : vlan

Error Codes

  • VLAN-8 - The requested virtual network does not exist

Example

Update a public external or unmanaged network in a datacenter


If no IPs are being used by VMs, you can modify some of the network values

PUT https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK]

Content-Type : vlan Accept : vlan

Error Codes

  • CONSTR-MIN - Parameter 'datacenter' must be greater than or equal to 1 but value '-1' was found
  • NST-7 - The network service type and the excluded from firewalls flag cannot be changed because there are virtual machines using IPs in this VLAN
  • VLAN-19 - Attributes 'address' and 'mask' cannot be changed when editing a public, external or unmanaged network
  • VLAN-47 - Cannot change enterprise because this network is used as the default by a virtual datacenter
  • VLAN-74 - Cannot change the IP version of a VLAN
  • VLAN-79 - Attributes 'gateway' and 'strict' cannot be changed when editing an IPv6 VLAN
  • VLAN-80 - IPv4 VLANs cannot be strict

Example

Get the public external or unmanaged network configuration


Returns the public, external, or unmanaged network configuration

GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/configuration

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_MANAGE_VAPP, ROLE_VDC_ENUMERATE]

Get a public external or unmanaged network configuration


Returns a public, external, or unmanaged network configuration

GET https://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}/configuration/{configuration}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_MANAGE_VAPP, ROLE_VDC_ENUMERATE]