Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:

Network service type resource

A 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 (the default is 'Service Network'). Physical machine NICs are assigned to a network service type as well. The scheduler process will allocate the IPs for the VM with the target physical machine NIC where the VM 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 network service type

Return a single Network Service Type.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/networkservicetypes/{networkservicetype}
Roles Required: PHYS_DC_ALLOW_MODIFY_NETWORK, PHYS_DC_RETRIEVE_DETAILS, PHYS_DC_MANAGE
Request Headers: Accept: application/vnd.abiquo.networkservicetype+json; version=4.4; application/vnd.abiquo.networkservicetype+xml; version=4.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_adm_dcs_X_nwsts_X_AC_nwst_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/datacenters/3874/networkservicetypes/1240 \ 
	 -H 'Accept:application/vnd.abiquo.networkservicetype+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "defaultNST": true, 
  "id": 1240, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/3874/networkservicetypes/1240", 
      "type": "application/vnd.abiquo.networkservicetype+json", 
      "rel": "edit", 
      "title": "Network Service"
    }
  ], 
  "name": "Network Service"
}

List 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: PHYS_DC_ALLOW_MODIFY_NETWORK, PHYS_DC_RETRIEVE_DETAILS, PHYS_DC_MANAGE
Request Headers: Accept: application/vnd.abiquo.networkservicetypes+json; version=4.4; application/vnd.abiquo.networkservicetypes+xml; version=4.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_adm_dcs_X_nwsts_AC_nwsts_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/datacenters/3878/networkservicetypes \ 
	 -H 'Accept:application/vnd.abiquo.networkservicetypes+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "defaultNST": true, 
      "id": 1244, 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/datacenters/3878/networkservicetypes/1244", 
          "type": "application/vnd.abiquo.networkservicetype+json", 
          "rel": "edit", 
          "title": "Network Service"
        }
      ], 
      "name": "Network Service"
    }
  ]
}

Create a 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: PHYS_DC_ALLOW_MODIFY_NETWORK
Request Headers: Accept: application/vnd.abiquo.networkservicetype+json; version=4.4; application/vnd.abiquo.networkservicetype+xml; version=4.4;  Content-type:  application/vnd.abiquo.networkservicetype+json; version=4.4; application/vnd.abiquo.networkservicetype+xml; version=4.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

POST_adm_dcs_X_nwsts_CT_nwst_j_AC_nwst_j.0001.txt

cURL:

curl -X POST http://localhost:9000/api/admin/datacenters/3865/networkservicetypes \ 
	 -H 'Accept:application/vnd.abiquo.networkservicetype+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.networkservicetype+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 201

Request payload:

{
  "defaultNST": false, 
  "name": "Storage Network", 
  "links": []
}

Response payload:

{
  "defaultNST": false, 
  "id": 1230, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/3865/networkservicetypes/1230", 
      "type": "application/vnd.abiquo.networkservicetype+json", 
      "rel": "edit", 
      "title": "Storage Network"
    }
  ], 
  "name": "Storage Network"
}

 

 

Update a 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: PHYS_DC_ALLOW_MODIFY_NETWORK
Request Headers: Accept: application/vnd.abiquo.networkservicetype+json; version=4.4; application/vnd.abiquo.networkservicetype+xml; version=4.4;  Content-type:  application/vnd.abiquo.networkservicetype+json; version=4.4; application/vnd.abiquo.networkservicetype+xml; version=4.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

PUT_adm_dcs_X_nwsts_X_CT_nwst_j_AC_nwst_j.0001.txt

cURL:

curl -X PUT http://localhost:9000/api/admin/datacenters/3879/networkservicetypes/1246 \ 
	 -H 'Accept:application/vnd.abiquo.networkservicetype+json; version=4.2' \ 
	 -H 'Content-Type:application/vnd.abiquo.networkservicetype+json; version=4.2' \ 
	 -d @requestpayload.json \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

{
  "defaultNST": false, 
  "name": "New ServiceType", 
  "links": []
}

Response payload:

{
  "defaultNST": true, 
  "id": 1246, 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/3879/networkservicetypes/1246", 
      "type": "application/vnd.abiquo.networkservicetype+json", 
      "rel": "edit", 
      "title": "New ServiceType"
    }
  ], 
  "name": "New ServiceType"
}

 

 

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: 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_adm_dcs_X_nwsts_X.0001.txt

cURL:

curl -X DELETE http://localhost:9000/api/admin/datacenters/3872/networkservicetypes/1238 \ 
	 -H 'Accept:text/json,application/json' \ 
	 -u user:password --verbose 

Success status code: 204

Request payload:

--none--

Response payload:

--none--