Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Public networks resource

Exposed Resources Hierarchy
Public networks resource

Contents:

Although the name of the resource is 'PublicNetworkResource' (for historical reasons), this resource can be used to create Public Networks, External Networks and Unmanaged Networks. This means any network managed at the datacenter level by the Cloud Administrator, with IPs offered to customers.

  • Public Networks are networks with IPs that are usually offered one by one to customers, to allow them to comunicate outside the datacenter.

Behind the scenes, Public and External VLANs will both be treated as Abiquo VLAN networks. The difference between them is the way we organize them and administer them in the API. Once an IP has been chosen to belong to a virtual machine, both networks are the same. No operations are performed on IPs of Unmanaged networks.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/datacenters/{datacenter}/network

Exposed Methods

Check VLAN tag availability

VLANs created using this resource are created with a predefined VLAN tag. Use this method to check if the tag is already used by a VLAN in the datacenter.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network/action/checkavailability
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.vlantagavailability+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

tag

true

 

Identifier of the tag.

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VlanTagAvailability Media Type
Request Example:

 Click here to show or hide the request example
Check VLAN tag availability example
curl -X GET "http://localhost/api/admin/datacenters/2/network/action/checkavailability?tag=4" -u user:password \
     -H "Accept:application/vnd.abiquo.vlantagavailability+xml" --verbose | xmlindent -nbe -f
  
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Server auth using Basic with user 'admin'
> GET /api/admin/datacenters/2/network/action/checkavailability?tag=4 HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept:application/vnd.abiquo.vlantagavailability+xml
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM0NDM1MzY3NjI1Njo1YTZmMDc3NGNmZjE4NDcyZjE0YjRkMjliZjFiYWE4MTpBQklRVU8; Expires=Tue, 07-Aug-2012 15:34:36 GMT; Path=/api
< Set-Cookie: JSESSIONID=8DE4CC57B88AD46B8AF72E1DFAC21558; Path=/api
< Content-Type: application/vnd.abiquo.vlantagavailability+xml
< Content-Length: 171
< Date: Tue, 07 Aug 2012 15:04:36 GMT
<
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vlanTagAvailability>
    <available>AVAILABLE</available>
    <message>This tag is available.</message>
</vlanTagAvailability>


Create public, external and unmanaged network

This method creates these three kinds of VLANs. The difference between them is in the VLANNetworkDto object: - If the entity has a link to an enterprise, then you are creating an External Network. - If the entity has a link to an enterprise and unmanaged flag is set to TRUE, then you are creating an Unmanaged network. - If you don't have either of the above, you are creating a Public network.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/network
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK
Request Headers: Accept: application/vnd.abiquo.vlan+xml; version=2.4; Content-type: application/vnd.abiquo.vlan+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VLANNetwork Media Type
Response Message Body Entity: VLANNetwork Media Type
Request Example:

 Click here to show or hide the request example
Create public, external and unmanaged network example
curl -X POST http://10.60.20.60:80/api/admin/datacenters/1/network\
     -H 'Accept: application/vnd.abiquo.vlan+xml; version=2.4'  \
     -H 'Content-Type: application/vnd.abiquo.vlan+xml; version=2.4'    \
     -d @entity.xml \
     -u user:password --verbose
 
POST http://10.60.20.60:80/api/admin/datacenters/1/network HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.vlan+xml;version=2.4
Content-Type: application/vnd.abiquo.vlan+xml;version=2.4
Content-Length: 391
 
HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:10:15 GMT
Location: http://10.60.20.60:80/api/admin/datacenters/1/network/15
Set-Cookie: JSESSIONID=0B4CAC6F66B5A82976A8684FF22251D8; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIxNjEyNzplYTIxNDI5Y2ViMGFhYmYzMGQzOGE3MzBjOTFmYzc2MzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:16 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlan+xml;version=2.4
Content-Length: 914
<?xml version="1.0" encoding="UTF-8"?>
<network>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1"
    rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/15"
    rel="edit" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
    rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
    rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/15/ips"
    rel="ips" type="application/vnd.abiquo.publicips+xml; version=2.4"/>
  <address>80.80.80.0</address>
  <dhcpOptions/>
  <gateway>80.80.80.1</gateway>
  <id>15</id>
  <mask>24</mask>
  <name>JC--publicnetwork-test</name>
  <tag>5</tag>
  <type>PUBLIC</type>
</network>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Get external IPs by datacenter

Returns the list of external IPs registered in the datacenter.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network/action/externalips
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.externalips+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve.

by

false

ip

How to order the search. Available values are: {IP, QUARANTINE, MAC, LEASE, VLAN,
VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME}

has

false

 

a way 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

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascendant-> true, descendant -> false). Ascendant by
default.

all

false

false

set if we should return all the IPs or only the available ones (by default).

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: ExternalIps Media Type
Request Example:

 Click here to show or hide the request example
Get external IPs by datacenter example
curl -X GET "http://example.com/api/admin/datacenters/2/network/action/externalips?limit=5&startwith=10" -u user:password -H "Accept:application/vnd.abiquo.externalips+xml" --verbose | xmlindent -nbe -f
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Server auth using Basic with user 'admin'
> GET /api/admin/datacenters/2/network/action/externalips?limit=5&startwith=10 HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept:application/vnd.abiquo.externalips+xml
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM0NDM1NDQwNDAwOTphNDA5NGQ5ZTMyMDg3MGZiNDFjNWU5NTkyYmI0NWQ4ZDpBQklRVU8; Expires=Tue, 07-Aug-2012 15:46:44 GMT; Path=/api
< Set-Cookie: JSESSIONID=96B26F0763F34160C5EF0E6DE8A33814; Path=/api
< Content-Type: application/vnd.abiquo.externalips+xml
< Content-Length: 3446
< Date: Tue, 07 Aug 2012 15:16:44 GMT
<
{ [data not shown]
100  3446  100  3446    0     0  44343      0 --:--:-- --:--:-- --:--:-- 45342
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<externalips>
    <link rel="first" href="http://example.com:80/api/admin/datacenters/2/network/action/externalips"/>
    <link rel="previous" href="http://example.com:80/api/admin/datacenters/2/network/action/externalips?startwith=5"/>
    <link rel="next" href="http://example.com:80/api/admin/datacenters/2/network/action/externalips?startwith=15"/>
    <link rel="last" href="http://example.com:80/api/admin/datacenters/2/network/action/externalips?startwith=249"/>
    <totalSize>254</totalSize>
    <externalip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
        <link title="ext" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="http://example.com:80/api/admin/datacenters/2/network/1"/>
        <link title="externalip" rel="self" type="application/vnd.abiquo.externalip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/1/ips/11"/>
        <id>11</id>
        <ip>34.34.34.11</ip>
        <networkName>ext</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </externalip>
    <externalip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="ext" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/1"/>
        <link title="externalip" rel="self" type="application/vnd.abiquo.externalip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/1/ips/12"/>
        <id>12</id>
        <ip>34.34.34.12</ip>
        <networkName>ext</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </externalip>
    <externalip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="ext" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/1"/>
        <link title="externalip" rel="self" type="application/vnd.abiquo.externalip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/1/ips/13"/>
        <id>13</id>
        <ip>34.34.34.13</ip>
        <networkName>ext</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </externalip>
    <externalip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="ext" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/1"/>
        <link title="externalip" rel="self" type="application/vnd.abiquo.externalip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/1/ips/14"/>
        <id>14</id>
        <ip>34.34.34.14</ip>
        <networkName>ext</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </externalip>
    <externalip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="ext" rel="externalnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/1"/>
        <link title="externalip" rel="self" type="application/vnd.abiquo.externalip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/1/ips/15"/>
        <id>15</id>
        <ip>34.34.34.15</ip>
        <networkName>ext</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </externalip>
</externalips>


Get public IPs by datacenter

Return the list of public IPs for a given datacenter.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network/action/publicips
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.publicips+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve.

by

false

ip

How to order the search. Available values are: {IP, QUARANTINE, MAC, LEASE, VLAN,
VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME}

has

false

 

a way 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

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascendant-> true, descendant -> false). Ascendant by
default.

all

false

false

set if we should return all the IPs or only the available ones (by default).

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: PublicIps Media Type
Request Example:

 Click here to show or hide the request example
Get public IPs by datacenter example
curl -X GET "http://localhost/api/admin/datacenters/2/network/action/publicips?limit=5&startwith=10" -u user:password -H "Accept:application/vnd.abiquo.publicips+xml" --verbose | xmlindent -nbe -f
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Server auth using Basic with user 'admin'
> GET /api/admin/datacenters/2/network/action/publicips?limit=5&startwith=10 HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept:application/vnd.abiquo.publicips+xml
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM0NDM1NDk3ODIxODo3N2ZmYTkxZTA0YTAwNzFjYjRiNzIzNDg3Y2U0YmJkMzpBQklRVU8; Expires=Tue, 07-Aug-2012 15:56:18 GMT; Path=/api
< Set-Cookie: JSESSIONID=52E6622C2F5D0B0E9ADF0F29D83CAC6E; Path=/api
< Content-Type: application/vnd.abiquo.publicips+xml
< Content-Length: 2719
< Date: Tue, 07 Aug 2012 15:26:18 GMT
<
{ [data not shown]
100  2719  100  2719    0     0  32599      0 --:--:-- --:--:-- --:--:-- 33158
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publicips>
    <link rel="first" href="http://localhost:80/api/admin/datacenters/2/network/action/publicips"/>
    <link rel="previous" href="http://localhost:80/api/admin/datacenters/2/network/action/publicips?startwith=5"/>
    <link rel="next" href="http://localhost:80/api/admin/datacenters/2/network/action/publicips?startwith=15"/>
    <link rel="last" href="http://localhost:80/api/admin/datacenters/2/network/action/publicips?startwith=249"/>
    <totalSize>254</totalSize>
    <publicip>
        <link title="pub" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/3"/>
        <link title="publicip" rel="self" type="application/vnd.abiquo.publicip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/3/ips/265"/>
        <id>265</id>
        <ip>67.67.67.11</ip>
        <networkName>pub</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </publicip>
    <publicip>
        <link title="pub" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/3"/>
        <link title="publicip" rel="self" type="application/vnd.abiquo.publicip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/3/ips/266"/>
        <id>266</id>
        <ip>67.67.67.12</ip>
        <networkName>pub</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </publicip>
    <publicip>
        <link title="pub" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/3"/>
        <link title="publicip" rel="self" type="application/vnd.abiquo.publicip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/3/ips/267"/>
        <id>267</id>
        <ip>67.67.67.13</ip>
        <networkName>pub</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </publicip>
    <publicip>
        <link title="pub" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/3"/>
        <link title="publicip" rel="self" type="application/vnd.abiquo.publicip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/3/ips/268"/>
        <id>268</id>
        <ip>67.67.67.14</ip>
        <networkName>pub</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </publicip>
    <publicip>
        <link title="pub" rel="publicnetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/3"/>
        <link title="publicip" rel="self" type="application/vnd.abiquo.publicip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/3/ips/269"/>
        <id>269</id>
        <ip>67.67.67.15</ip>
        <networkName>pub</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </publicip>
</publicips>


Get the list of public/external/unmanaged VLANs

Return the list of Public, External or Unmanaged VLANs. You can filter to return only one of these network types. By default this method will return all of them.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_ENUMERATE
Request Headers: Accept: application/vnd.abiquo.vlans+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

type

false

 

Type of VLANs to return, otherwise will return all of them. Available values are
PUBLIC, EXTERNAL, UNMANAGED and EXTERNAL_UNMANAGED (for return both)

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VLANNetworks Media Type
Request Example:

 Click here to show or hide the request example
Get the list of public/external/unmanaged VLANs example
curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/network\
     -H 'Accept: application/vnd.abiquo.vlans+xml; version=2.4' \
     -u user:password --verbose
 
GET http://10.60.20.60:80/api/admin/datacenters/1/network HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.vlans+xml;version=2.4
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:10 GMT
Set-Cookie: JSESSIONID=A9A9BC4D50B495F42E26790B0793B267; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIxMTE0NjpiMjFmYTg0MGZkYzE0MTQyODRlZTY1ZjY2MmY2MTA2MjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:11 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlans+xml;version=2.4
Content-Length: 3310
<?xml version="1.0" encoding="UTF-8"?>
<networks>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/action/checkavailability"
    rel="checkavailability" type="application/vnd.abiquo.vlantagavailability+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/action/publicips"
    rel="publicips" type="application/vnd.abiquo.publicips+xml; version=2.4"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/action/externalips"
    rel="externalips" type="application/vnd.abiquo.externalips+xml; version=2.4"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/action/unmanagedips"
    rel="unmanagedips" type="application/vnd.abiquo.unmanagedips+xml; version=2.4"/>
  <totalSize>3</totalSize>
  <network>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1"
      rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/1"
      rel="edit" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/network/1/ips"
      rel="ips" type="application/vnd.abiquo.publicips+xml; version=2.4"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
      rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
      rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
    <address>80.80.80.0</address>
    <dhcpOptions/>
    <gateway>80.80.80.1</gateway>
    <id>1</id>
    <mask>24</mask>
    <name>PublicNetwork</name>
    <tag>5</tag>
    <type>PUBLIC</type>
  </network>
  <network>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1"
      rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/2"
      rel="edit" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/network/2/ips"
      rel="infrastructureips" type="application/vnd.abiquo.externalips+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
      rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
      rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
    <address>10.0.0.0</address>
    <dhcpOptions/>
    <gateway>10.0.0.1</gateway>
    <id>2</id>
    <mask>24</mask>
    <name>ExternalNetwork</name>
    <tag>7</tag>
    <type>EXTERNAL</type>
  </network>
  <network>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1"
      rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
    <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/3"
      rel="edit" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/network/3/ips"
      rel="infrastructureips" type="application/vnd.abiquo.unmanagedips+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
      rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
      rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
    <address>10.0.1.0</address>
    <dhcpOptions/>
    <gateway>10.0.1.1</gateway>
    <id>3</id>
    <mask>24</mask>
    <name>UnmanagedNetwork</name>
    <tag>8</tag>
    <type>UNMANAGED</type>
  </network>
</networks>

Get unmanaged IPs by datacenter

Return the list of unmanaged IPs for a given datacenter.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network/action/unmanagedips
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.unmanagedips+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve.

by

false

ip

How to order the search. Available values are: {IP, QUARANTINE, MAC, LEASE, VLAN,
VIRTUALDATACENTER, VIRTUALMACHINE, VIRTUALAPPLIANCE, ENTERPRISENAME}

has

false

 

a way 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

false

25

number of elements to retrieve.

asc

false

true

the way to order the search (ascendant-> true, descendant -> false). Ascendant by
default.

all

false

false

set if we should return all the IPs or only the available ones (by default).

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: UnmanagedIps Media Type
Request Example:

 Click here to show or hide the request example
Get unmanaged IPs by datacenter example
curl -X GET "http://localhost/api/admin/datacenters/2/network/action/unmanagedips?limit=5&startwith=10" -u user:password -H "Accept:application/vnd.abiquo.unmanagedips+xml" --verbose | xmlindent -nbe -f
* About to connect() to localhost port 80 (#0)
*   Trying 127.0.0.1...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0connected
* Server auth using Basic with user 'admin'
> GET /api/admin/datacenters/2/network/action/unmanagedips?limit=5&startwith=10 HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: localhost
> Accept:application/vnd.abiquo.unmanagedips+xml
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM0NDM1NTI4Mzk2OTo0ZWJmZDljY2JkZWRlOTcxM2I5MDJkYTZlOTJhNTczNjpBQklRVU8; Expires=Tue, 07-Aug-2012 16:01:23 GMT; Path=/api
< Set-Cookie: JSESSIONID=60EA812971BAA64625F104A94FD38C37; Path=/api
< Content-Type: application/vnd.abiquo.unmanagedips+xml
< Content-Length: 1745
< Date: Tue, 07 Aug 2012 15:31:24 GMT
<
{ [data not shown]
100  1745  100  1745    0     0  18533      0 --:--:-- --:--:-- --:--:-- 18763
* Connection #0 to host localhost left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<unmanagedips>
    <link rel="first" href="http://localhost:80/api/admin/datacenters/2/network/action/unmanagedips"/>
    <link rel="previous" href="http://localhost:80/api/admin/datacenters/2/network/action/unmanagedips?startwith=0"/>
    <link rel="last" href="http://localhost:80/api/admin/datacenters/2/network/action/unmanagedips?startwith=0"/>
    <totalSize>1</totalSize>
    <unmanagedip>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://localhost:80/api/admin/enterprises/1"/>
        <link title="unmanagedip" rel="self" type="application/vnd.abiquo.unmanagedip+xml; version=2.2" href="http://localhost:80/api/admin/datacenters/2/network/2/ips/763"/>
        <link title="unm" rel="unmanagednetwork" type="application/vnd.abiquo.vlan+xml" href="http://localhost:80/api/admin/datacenters/2/network/2"/>
        <link title="va" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://localhost:80/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
        <link title="vdc" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://localhost:80/api/cloud/virtualdatacenters/1"/>
        <link title="ABQ_ad4291b9-652b-4f47-a8b5-86d26f273567" rel="virtualmachine" type="application/vnd.abiquo.virtualmachine+xml" href="http://localhost:80/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/>
        <id>763</id>
        <ip>?</ip>
        <mac>00:50:56:2e:cf:31</mac>
        <name>0050562ecf31_host</name>
        <networkName>unm</networkName>
        <available>true</available>
        <quarantine>false</quarantine>
    </unmanagedip>
</unmanagedips>


Update a public, external, or unmanaged network

Update a public, external or unmanaged network. If no IPs are being used by virtual machines, then some of the network values can be modified.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK
Request Headers: Accept: application/vnd.abiquo.vlan+xml; version=2.4; Content-type: application/vnd.abiquo.vlan+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: VLANNetwork Media Type
Response Message Body Entity: VLANNetwork Media Type
Request Example:

 Click here to show or hide the request example
Update a public, external, or unmanaged network example
curl -X PUT http://10.60.20.60:80/api/admin/datacenters/1/network/12\
     -H 'Accept: application/vnd.abiquo.vlan+xml; version=2.4'  \
     -H 'Content-Type: application/vnd.abiquo.vlan+xml; version=2.4'    \
     -d @entity.xml \
     -u user:password --verbose
 
PUT http://10.60.20.60:80/api/admin/datacenters/1/network/12 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.vlan+xml;version=2.4
Content-Type: application/vnd.abiquo.vlan+xml;version=2.4
Content-Length: 1368
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:13 GMT
Set-Cookie: JSESSIONID=F1AF6B96A2B280CFF64A06F4617BFAD1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIxMzY1MTpiZDdlZjVlZWE4MjczODZmYzhlYTQ4OWVjMDFmNGRjNjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:13 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlan+xml;version=2.4
Content-Length: 1280
<?xml version="1.0" encoding="UTF-8"?>
<network>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1"
    rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/12"
    rel="edit" type="application/vnd.abiquo.vlan+xml"/>
  <link href="http://10.60.20.60:80/api/admin/enterprises/2"
    rel="enterprise" title="JC-b8e62569-389" type="application/vnd.abiquo.enterprise+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/12/ips"
    rel="infrastructureips" type="application/vnd.abiquo.externalips+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/enterprises/2/limits/2/externalnetworks/12/ips"
    rel="ips" type="application/vnd.abiquo.externalips+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
    rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
    rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
  <address>10.0.0.0</address>
  <dhcpOptions/>
  <gateway>10.0.0.1</gateway>
  <id>12</id>
  <mask>24</mask>
  <name>External network Updated</name>
  <primaryDNS>8.8.8.8</primaryDNS>
  <secondaryDNS>8.8.8.8</secondaryDNS>
  <tag>7</tag>
  <type>EXTERNAL</type>
</network>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Retrieve a single network

Returns a single public, external or unmanaged network given its identifier.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_MANAGE_VAPP, ROLE_VDC_ENUMERATE
Request Headers: Accept: application/vnd.abiquo.vlan+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: VLANNetwork Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a single network example
curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/network/1\
     -H 'Accept: application/vnd.abiquo.vlan+xml; version=2.4'  \
     -u user:password --verbose
 
GET http://10.60.20.60:80/api/admin/datacenters/1/network/1 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.vlan+xml;version=2.4
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:34 GMT
Set-Cookie: JSESSIONID=0BCF412C966037F6809354AEA703691F; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE3NDM4MDplNWZjNDhiM2UxZWI5NGE1ZmY2ZWIxYTgzZjAwM2YzYTpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:34 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.vlan+xml;version=2.4
Content-Length: 902
<?xml version="1.0" encoding="UTF-8"?>
<network>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1"
    rel="datacenter" type="application/vnd.abiquo.datacenter+xml"/>
  <link href="http://10.60.20.60:80/api/admin/datacenters/1/network/1"
    rel="edit" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/network/1/ips"
    rel="ips" type="application/vnd.abiquo.publicips+xml; version=2.4"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
    rel="networkservicetype" type="application/vnd.abiquo.vlan+xml"/>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes"
    rel="networkservicetypes" type="application/vnd.abiquo.vlan+xml"/>
  <address>80.80.80.0</address>
  <dhcpOptions/>
  <gateway>80.80.80.1</gateway>
  <id>1</id>
  <mask>24</mask>
  <name>PublicNetwork</name>
  <tag>5</tag>
  <type>PUBLIC</type>
</network>


Delete a public, external, or unamanged network

Delete a Public, external or unmanaged network. You can only delete a network if no IPs in the network are being used by a virtual machine. In addition, you can only delete public networks if no IPs are associated with a virtual datacenter.

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}/network/{publicnetwork}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_NETWORK
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Delete a public, external, or unamanged network example
curl -X DELETE http://10.60.20.60:80/api/admin/datacenters/1/network/9\
     -u user:password --verbose
 
DELETE http://10.60.20.60:80/api/admin/datacenters/1/network/9 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
 
HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:10:10 GMT
Set-Cookie: JSESSIONID=AD95D2CEAB12BE15F8F2EE2DC616B810; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIxMDMwODpmZTkyZmU5ZTJhZWM2OTNkODM0NDM4ODA1MTlmNjk0NzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:10 GMT; Path=/api
Server: Apache-Coyote/1.1