PrivateNetworksResource


Create a private network


Create a private network in a virtual datacenter.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks

Roles : [ROLE_VDC_MANAGE_NETWORK]

Content-Type : vlan Accept : vlan

Error Codes

  • CONSTR-MIN - Parameter 'virtualdatacenter' must be greater than or equal to 1 but value '-1' was found
  • CONSTR-REQUIRED - The property 'name' must have a value.
  • VDC-0 - The requested virtual datacenter does not exist
  • VLAN-1 - Cannot create two VLANs with the same name in a virtual datacenter
  • 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-6 - The network does not match the mask. Check your request
  • VLAN-67 - Private VLAN tags are automatically allocated and cannot be changed
  • VLAN-7 - Gateway address out of range
  • VLAN-75 - IPv6 networks can have a netmask of 64, 56 or 48
  • VLAN-80 - IPv4 VLANs cannot be strict
  • VLAN-81 - Address attribute is required
  • VLAN-82 - Mask attribute is required and must be equal or greater than 0
  • VLAN-90 - The assigned VLAN tag is already in use by another existing network
  • VLAN-98 - Cannot assign this range to the VLAN because part or all of the range has been excluded by the administrator

Example

List private networks


List the private networks created in a virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
source String LOCAL Use ''REMOTE'' to force synchronization with the provider

Accept : vlans

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist

Example

Delete a private network


A successful delete returns a 204 No Content status. Abiquo will not allow you to delete a private network if: VMs are using any of its IPs; or it is the last private network in the virtual datacenter (returns a 409 Conflict: Virtual datacenter must always have a private VLAN); or if it is the Default VLAN, in which case you should update another VLAN to make it the default and then delete this VLAN.

DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}

Roles : [ROLE_VDC_MANAGE_NETWORK]

Parameter Type Default Value Description
force boolean false If true, logical delete is performed

Example

Get a private network


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Accept : vlan

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist
  • VLAN-8 - The requested virtual network does not exist

Example

Update a private network


Update details of a private network. You cannot change the basic network definition (network address, gateway, netmask). Some of the attributes can be modified if no VMs are using IPs in the network. To make a network the default for a virtual datacenter, see the separate request for this purpose.
Editable attributes are: gateway, primaryDNS, secondaryDNS, sufixDNS, name.

PUT https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}

Roles : [ROLE_VDC_MANAGE_NETWORK]

Content-Type : vlan Accept : vlan

Error Codes

  • CONSTR-MIN - Parameter 'virtualdatacenter' must be greater than or equal to 1 but value '0' was found
  • VLAN-10 - Attributes 'address', 'mask' and 'tag' cannot be changed when editing a private VLAN.
  • 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 private network configuration


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/configuration

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Example

Get a private network configuration


GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/configuration/{configuration}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Example

List load balancers attached to a private network


List the load balancers attached to a private network created in a virtual datacenter.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/loadbalancers

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_MANAGE_LOADBALANCERS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
has String If present filter to apply in the search.
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)

Accept : loadbalancers

Error Codes

  • VDC-0 - The requested virtual datacenter does not exist
  • VLAN-8 - The requested virtual network does not exist

Example

Create a private ip address


Creates an IP address for a private network.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips

Roles : [ROLE_VDC_MANAGE_NETWORK]

Content-Type : privateip Accept : privateip

Error Codes

  • VLAN-41 - IP format is invalid
  • VLAN-69 - Cannot create an IP in networks other than IPv6 networks
  • VLAN-70 - The IP does not belong to the network
  • VLAN-71 - All IPs in the network are already created
  • VLAN-72 - The requested IP is already created in the network
  • VLAN-78 - Cannot create IPs manually in strict networks
  • VLAN-88 - The IP does not belong to the allowed range of the VLAN

Example

Create multiple private ip adresses


Creates some IP addresses for a private network given a first ip and the amount of how many will be created.

POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips

Roles : [ROLE_VDC_MANAGE_NETWORK]

Content-Type : ipsbulkcreation Accept : privateips

Error Codes

  • VLAN-70 - The IP does not belong to the network
  • VLAN-72 - The requested IP is already created in the network
  • VLAN-78 - Cannot create IPs manually in strict networks
  • VLAN-85 - The requested number of IPs to create is out of range
  • VLAN-86 - Cannot create IPs because too many IPs were requested
  • VLAN-87 - Invalid IPv6 format Caused by: can not parse [::ffff:0.0.10]
  • VLAN-88 - The IP does not belong to the allowed range of the VLAN
  • VLAN-89 - The literal of the first IP is required

Example

List private ip addresses


Return a list of IP addresses from a private network.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips

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
by String ip ordering the request. Valid values are \{IP, QUARANTINE, MAC, LEASE, VLAN, VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME\}
has String filter the request by: ip value, mac value, vlan name, virtual machine name or virtual appliance name
ip String filter by ip
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)
free Boolean false if true, return only the available IPs not used by any virtual machine or reserved; if false, return all IPs
source String LOCAL use ''REMOTE'' to force the synchronization in the provider

Accept : privateips

Example

Release a private ip address


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips/action/release

Roles : [ROLE_MANAGE_PRIVATEIP_RESERVATION]

Content-Type : ipliterals

Example

Reserve multiple private ip address


POST https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips/action/reserve

Roles : [ROLE_MANAGE_PRIVATEIP_RESERVATION]

Parameter Type Default Value Description
updatevirtualmachines boolean true if true the IPs reserved virtual machines are updated with the new values.

Content-Type : ipliterals

Example

Delete a private ip address


Deletes a private IP address for supported hypervisortypes and networking systems (e.g. ESXi with NSX, OpenStack with Neutron). Successful delete returns 204 No Content. The platform will not allow you to delete a private IP if a VM is using it.

DELETE https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips/{ip}

Roles : [ROLE_VDC_MANAGE_NETWORK]

Example

Get a private ip address


Return a IP address from a private network.

GET https://example.com/api/cloud/virtualdatacenters/{virtualdatacenter}/privatenetworks/{privatenetwork}/ips/{ip}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE]

Accept : privateip

Example