Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Network service type resource

Exposed Resources Hierarchy
Network service type resource

Contents:

Network Service type is a logical entity for mapping physical machine NICs with VLANs. All the VLANs must be defined with a Network Service Type ('Service Network' is the default one). Physical machine NICs are assigned to a Network Service Type as well. The scheduler process will allocate the IPs for the virtual machine with the target physical machine NIC where the virtual machine NICs will be attached.

Main URI of the Resource

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

Exposed Methods

Get a single network service type details

Return a single Network Service Type.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Get a single network service type details example
$ curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
     -H 'Accept: application/vnd.abiquo.networkservicetype+xml; version=2.4'    \
     -u user:password --verbose
 
GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.networkservicetype+xml;version=2.4
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:59 GMT
Set-Cookie: JSESSIONID=A255D5DBB12C0D07937971D271BB8A7A; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwMDQyODozNWQ5ODA5Yzk2NGIzMjM1NzUxZGFlNmMyYmJlZDBjMzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:00 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Length: 310
<?xml version="1.0" encoding="UTF-8"?>
<networkservicetype>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2"
    rel="edit" type="application/vnd.abiquo.networkservicetype+xml"/>
  <defaultNST>false</defaultNST>
  <id>2</id>
  <name>Storage Service</name>
</networkservicetype>


Get the list of network service types

Return the list of Network Service Types created for a given Datacenter

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Get the list of network service types example
$ curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes\
     -H 'Accept: application/vnd.abiquo.networkservicetypes+xml; version=2.4'   \
     -u user:password --verbose
 
GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.networkservicetypes+xml;version=2.4
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:10:13 GMT
Set-Cookie: JSESSIONID=0211B697244890BF7E2DEF5EF8418CDC; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIxNDE4OTozOTNhNWNjYWVkNWM5YTk4OTU1Y2JjOWU4NjcwYzRlMDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:14 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.networkservicetypes+xml;version=2.4
Content-Length: 354
<?xml version="1.0" encoding="UTF-8"?>
<networkservicestypes>
  <networkservicetype>
    <link
      href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/1"
      rel="edit" type="application/vnd.abiquo.networkservicetype+xml"/>
    <defaultNST>true</defaultNST>
    <id>1</id>
    <name>Service Network</name>
  </networkservicetype>
</networkservicestypes>


Create a new network service type

Create a new Network Service Type. The only required field is the 'name' attribute. It cannot be duplicated.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create a new network service type example
$ curl -X POST http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes\
     -H 'Accept: application/vnd.abiquo.networkservicetype+xml; version=2.4'    \
     -H 'Content-Type: application/vnd.abiquo.networkservicetype+xml; version=2.4'  \
     -d @entity.xml \
     -u user:password --verbose
 
POST http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Type: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Length: 167
 
HTTP/1.1 201 Created
Date: Wed, 16 Jan 2013 14:09:59 GMT
Location: http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2
Set-Cookie: JSESSIONID=DA0566E9A270D106D14C76A30F8E4475; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwMDMwMjo0ODBjZTBjYjg4MDkyYTU4MjIzMjFlNTA1ZDExZTZlODpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:00 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Length: 310
<?xml version="1.0" encoding="UTF-8"?>
<networkservicetype>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2"
    rel="edit" type="application/vnd.abiquo.networkservicetype+xml"/>
  <defaultNST>false</defaultNST>
  <id>2</id>
  <name>Storage Service</name>
</networkservicetype>


Download a template

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

Update network service type

Update a Network Service Type. Only the Name attribute can be modified.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Update network service type example
$ curl -X PUT http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
     -H 'Accept: application/vnd.abiquo.networkservicetype+xml; version=2.4'    \
     -H 'Content-Type: application/vnd.abiquo.networkservicetype+xml; version=2.4'  \
     -d @entity.xml \
     -u user:password --verbose
 
PUT http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Type: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Length: 341
 
HTTP/1.1 200 OK
Date: Wed, 16 Jan 2013 14:09:59 GMT
Set-Cookie: JSESSIONID=CDA08D53CB2495C4CEA91C809E0315B0; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwMDQ1MjpiYjdhZGRkZmU1ZDdjMzQwNTlmYjU1OGFlOGNjOWRmMDpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:00 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.networkservicetype+xml;version=2.4
Content-Length: 318
<?xml version="1.0" encoding="UTF-8"?>
<networkservicetype>
  <link
    href="http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2"
    rel="edit" type="application/vnd.abiquo.networkservicetype+xml"/>
  <defaultNST>false</defaultNST>
  <id>2</id>
  <name>Storage Service Updated</name>
</networkservicetype>

Download a template

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

Delete a network service type

Delete a Network Service Type. The default Network Service Type of each datacenter cannot be deleted.

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}/networkservicetypes/{networkservicetype}
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 network service type example
$ curl -X DELETE http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
     -u user:password --verbose
 
DELETE http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
 
HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:59 GMT
Set-Cookie: JSESSIONID=F37949D4E57F592945AEF2E7CBACD53C; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzIwMDUxODo0Yzk2M2FkNWE3ZDIwNmRjYzBjNDBhNzVmOWNhMGI3ZjpBQklRVU8; Expires=Wed, 16-Jan-2013 14:40:00 GMT; Path=/api
Server: Apache-Coyote/1.1