ExternalNetworksByDatacenterResource


Create an external network for an enterprise in a datacenter


Create an external network for the given enterprise in the given datacenter (limit). In the external network data object, you must include a link to the network service type (rel ''networkservicetype'').

POST https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK, ROLE_VDC_MANAGE_NETWORK]

Content-Type : vlan Accept : vlan

Error Codes

  • GEN-18 - The requested operation is not supported by the hypervisor plugin
  • GEN-4 - Not enough permissions to perform this action

Example

List external networks for an enterprise in a datacenter


Get the external networks available for the given limit (datacenter-enterprise relation)

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Parameter Type Default Value Description
source String LOCAL Use ''REMOTE'' to force synchronization in the provider
usage String Filter external networks that are not allowed for a given usage. Values: VM, LB

Accept : vlans

Example

Get the default external network for an enterprise in a datacenter


Return the default external network to use when assigning arbitrary IPs to Virtual Machines in the current enterprise-datacenter limit. It will return an empty entity if the enterprise default behavior is to use VirtualDatacenter's private networks.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/action/default

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Accept : vlan

Example

Set private networks as default for an enterprise in a datacenter


Set private VLANs as the default in the enterprise. This method will remove the default external network and accordingly the default network in every virtual datacenter will be the "default private network".

PUT https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/action/default

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Delete an external or unmanaged network for an enterprise in a datacenter


Delete a external or unmanaged network for an enterprise in a datacenter. You can only delete a network if no IPs in the network are in use, by a VM or other entity.

DELETE https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK, ROLE_VDC_MANAGE_NETWORK]

Example

Get an external network for an enterprise in a datacenter


GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Accept : vlan

Error Codes

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

Example

Modify an external network for an enterprise in a datacenter


Modifies an external network for the given enterprise in the given datacenter (limit).

If a new enterprise link is received, the vlan will be changed if is possible (limits, vms using it).

In private datacenters, if {@code networkservicetype} link is received, that will be changed.

PUT https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK, ROLE_VDC_MANAGE_NETWORK]

Content-Type : vlan Accept : vlan

Example

Set an external network as the default for an enterprise in a datacenter


When you create a virtual datacenter, by default Abiquo uses the default private network of the virtual datacenter when assigning an arbitrary IP to its VMs. Setting an external network as the default for the virtual datacenter will override this behavior. Abiquo will use this external network instead of each virtual datacenter's private one.

PUT https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/action/default

Roles : [ROLE_USERS_MANAGE_ENTERPRISE]

Get the configuration of an external network for an enterprise in a datacenter


Retrieves the configuration of an external network in a datacenter.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/configuration

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Example

Get a configuration of an external network for an enterprise in a datacenter


Retrieves an specific configuration for the external network.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/configuration/{configuration}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Example

Create multiple ips in an external network for an enterprise in a datacenter


Creates multiple IP addresses for an external network given a first IP and the number of IPs to create.

POST https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Content-Type : ipsbulkcreation Accept : externalips

List external ips for an enterprise in a datacenter


Retrieves external IPs from a datacenter.
By default it only returns the available IPs, and there is a filter to return all of them.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

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 It can be filtered by: IP address, MAC address, network name, Virtual Machine name, Virtual Appliance name or Enterprise Name
ip String if present filter to lookup by IP literal
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 present and true filter only not assigned to vm. Otherwise used ones.
available Boolean true If true true filter only available IPs.

Accept : externalips

Example

List unmanaged ips for an enterprise in a datacenter


Retrieves unmanaged IPs from a datacenter.
By default it only returns the available IPs, and there is a filter to return all of them.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

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 It can be filtered by: IP address, MAC address, network name, Virtual Machine name, Virtual Appliance name or Enterprise Name
ip String if present filter to lookup by IP literal
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 present and true filter only not assigned to vm. Otherwise used ones.
available Boolean true If true true filter only available IPs.

Accept : unmanagedips

Example

Get an external ip for an enterprise in a datacenter


Retrieve a single IP from the given external network.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips/{ip}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Accept : externalip

Example

Get an unmanaged ip for an enterprise in a datacenter


Retrieve a single IP from the given unmanaged network.

GET https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips/{ip}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Accept : unmanagedip

Example

Modify an ip in an unmanaged network for an enterprise in a datacenter


Update the Ip value of an unmanaged ip.
Since Unamanged Ips always have the value '?' as ip, with this method we let the user to establish manually the ip address for a better presentation.

PUT https://example.com/api/admin/enterprises/{enterprise}/limits/{limit}/externalnetworks/{externalnetwork}/ips/{ip}

Roles : [ROLE_USERS_MANAGE_ENTERPRISE, ROLE_VDC_ENUMERATE]

Content-Type : unmanagedip Accept : unmanagedip

Error Codes

  • VLAN-41 - IP format is invalid
  • VLAN-59 - The IP supplied does not belong to an unmanaged network
  • VLAN-60 - When editing an UnmanagedIp, you may only change the attribute 'ip'

Example