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 2.3


Skip to end of metadata
Go to start of metadata

Datacenters Resource

Exposed Resources Hierarchy
DatacentersResource

Contents:

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/datacenters

Exposed Methods.

Create a new Datacenter

A datacenter can be created with remote services if you send them in the dto. In this case if the remote services return configuration errors, then the datacenter will be created and the response will show the configuration errors.

Synopsis: POST http://example.com/api/admin/datacenters
Roles Needed: ROLE_PHYS_DC_MANAGE
Request Headers: Accept:application/vnd.abiquo.datacenter+xml; version=2.2;Content-type:application/vnd.abiquo.datacenter+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

Create a new Datacenter example
$ curl -X POST http://10.60.1.222/api/admin/datacenters\
	 -H 'Accept: application/vnd.abiquo.datacenter+xml;version=2.2'	\
	 -H 'Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2'	\
	 -d @entity.xml	\
	 -u user:password --verbose

POST http://10.60.1.222/api/admin/datacenters HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Length: 150

HTTP/1.1 201 Created
Date: Mon, 20 Aug 2012 10:10:51 GMT
Location: http://10.60.1.222:80/api/admin/datacenters/2
Keep-Alive: timeout=15, max=99
Set-Cookie: JSESSIONID=B42C29BB6F07FC30E2475A599598FBB1; Path=/api
Set-Cookie: auth=YWRtaW46MTM0NTQ1OTI1MTczNDplNDNlOWZkZmZhYmZkMTMwNWJmYmE4MGU2YjY1MWM2OTpBQklRVU8; Expires=Mon, 20-Aug-2012 10:40:51 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Length: 2110
<?xml version="1.0" encoding="UTF-8"?>
<datacenter>
  <link href="http://10.60.1.222:80/api/admin/datacenters/2" rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
  <link href="http://10.60.1.222:80/api/admin/datacenters/2/racks"
    rel="racks" type="application/vnd.abiquo.racks+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/remoteservices"
    rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
  <link href="http://10.60.1.222:80/api/admin/datacenters/2/hypervisors"
    rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/enterprises"
    rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/updateusedresources" rel="updateusedresources"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/discoversingle"
    rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/discovermultiple"
    rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/hypervisor"
    rel="hypervisor" type="text/plain"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/checkmachinestate"
    rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/checkmachineipmi" rel="checkmachineipmi"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/storage/tiers"
    rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/storage/devices"
    rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
  <link href="http://10.60.1.222:80/api/admin/datacenters/2/network"
    rel="network" type="application/vnd.abiquo.vlans+xml"/>
  <link
    href="http://10.60.1.222:80/api/admin/datacenters/2/action/getlimits"
    rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
  <id>2</id>
  <location>Honolulu</location>
  <name>JC-6184848a-5a0</name>
</datacenter>

Download a template

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

Get the list of datacenters

Returns the list of all datacenters, can be filtered by enterprise or scope.

Synopsis: GET http://example.com/api/admin/datacenters
Roles Needed: ROLE_PHYS_DC_ENUMERATE,ROLE_VDC_MANAGE,ROLE_USERS_MANAGE_ENTERPRISE,ROLE_PRICING_VIEW,ROLE_APPLIB_VIEW,ROLE_USERS_VIEW
Request Headers: Accept:application/vnd.abiquo.datacenters+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

idEnterprise

false

 

identifier of an enterprise

pricing

false

 

identifier of a pricing template

idScope

false

 

identifier of a scope

 

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

Retrieve a list of Datacenters example
$ curl -X GET http://10.60.1.222/api/admin/datacenters\
	 -H 'Accept: application/vnd.abiquo.datacenters+xml;version=2.2'	\
	 -u user:password --verbose

GET http://10.60.1.222/api/admin/datacenters HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenters+xml;version=2.2

HTTP/1.1 200 OK
Date: Mon, 20 Aug 2012 10:13:42 GMT
Keep-Alive: timeout=15, max=58
Set-Cookie: JSESSIONID=7F1F27CDE58C433EE69B8A8D0C7B5657; Path=/api
Set-Cookie: auth=YWRtaW46MTM0NTQ1OTQyMjM3NDoxZDNkODk1MmFjZWRkYmY2ZTY5YzBmZGExNDgyNzI3OTpBQklRVU8; Expires=Mon, 20-Aug-2012 10:43:42 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.datacenters+xml;version=2.2
Content-Length: 2156
<?xml version="1.0" encoding="UTF-8"?>
<datacenters>
  <datacenter>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/checkmachineipmi" rel="checkmachineipmi"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/checkmachinestate"
      rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/storage/devices"
      rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/discovermultiple"
      rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/discoversingle"
      rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
    <link href="http://10.60.1.222:80/api/admin/datacenters/2"
      rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/enterprises"
      rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/getlimits"
      rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/hypervisor"
      rel="hypervisor" type="text/plain"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/hypervisors"
      rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
    <link href="http://10.60.1.222:80/api/admin/datacenters/2/network"
      rel="network" type="application/vnd.abiquo.vlans+xml"/>
    <link href="http://10.60.1.222:80/api/admin/datacenters/2/racks"
      rel="racks" type="application/vnd.abiquo.racks+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/remoteservices"
      rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/storage/tiers"
      rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
    <link
      href="http://10.60.1.222:80/api/admin/datacenters/2/action/updateusedresources" rel="updateusedresources"/>
    <id>2</id>
    <location>New York</location>
    <name>JC-0b46fbbd-c52</name>
    <uuid>Hawaii</uuid>
  </datacenter>
</datacenters>

Get the list of datacenters

Returns the list of all datacenters, can be filtered by enterprise or scope.

Synopsis: GET http://example.com/api/admin/datacenters
Roles Needed: ROLE_PHYS_DC_ENUMERATE,ROLE_VDC_MANAGE,ROLE_USERS_MANAGE_ENTERPRISE, ROLE_PRICING_VIEW, ROLE_APPLIB_VIEW,ROLE_USERS_VIEW
Request Headers: Accept:application/vnd.abiquo.datacenterslight+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

 

limit

false

25

 

idScope

false

 

identifier of a scope

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

Retrieve a list of Datacenters example
$ curl -X GET http://10.60.21.181/api/admin/datacenters\
	 -H 'Accept: application/vnd.abiquo.datacenters+xml;version=2.2'	\
	 -u user:password --verbose


GET http://10.60.21.181/api/admin/datacenters HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenters+xml;version=2.2


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:09:41 GMT
Set-Cookie: JSESSIONID=D3D86302E4960018B1035561BB1BC337; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDM4MTI0MjpjN2NiNTdiZDU2OWU1ZGIwMGFkZWNkZTkyYWJjMDJlMzpBQklRVU8; Expires=Mon, 23-Jul-2012 14:39:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenters+xml;version=2.2
Content-Length: 2174

<?xml version="1.0" encoding="UTF-8"?>
<datacenters>
  <datacenter>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachineipmi" rel="checkmachineipmi"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate"
      rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/storage/devices"
      rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/discovermultiple"
      rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/discoversingle"
      rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1"
      rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/enterprises"
      rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits"
      rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor"
      rel="hypervisor" type="text/plain"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/hypervisors"
      rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1/network"
      rel="network" type="application/vnd.abiquo.vlans+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1/racks"
      rel="racks" type="application/vnd.abiquo.racks+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/remoteservices"
      rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/storage/tiers"
      rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
    <id>1</id>
    <location>New York</location>
    <name>JC-c41287a7-c6c</name>
    <uuid>agorilado</uuid>
  </datacenter>
</datacenters>

Get the list of datacenters with their Remote Services

Synopsis: GET http://example.com/api/admin/datacenters
Roles Needed: ROLE_PHYS_DC_ENUMERATE,ROLE_VDC_MANAGE,ROLE_USERS_MANAGE_ENTERPRISE, ROLE_PRICING_VIEW, ROLE_APPLIB_VIEW,ROLE_USERS_VIEW
Request Headers: Accept:application/vnd.abiquo.datacenters_rs+xml;
Request Parameters:

Parameter

Required

Default Value

Description

idEnterprise

false

 

identifier of an enterprise

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

Retrieve a list of datacenters with their Remote Services example
$ curl -X GET http://10.60.21.181/api/admin/datacenters\
	 -H 'Accept: application/vnd.abiquo.datacenters+xml;version=2.2'	\
	 -u user:password --verbose


GET http://10.60.21.181/api/admin/datacenters HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenters+xml;version=2.2


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:09:41 GMT
Set-Cookie: JSESSIONID=D3D86302E4960018B1035561BB1BC337; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDM4MTI0MjpjN2NiNTdiZDU2OWU1ZGIwMGFkZWNkZTkyYWJjMDJlMzpBQklRVU8; Expires=Mon, 23-Jul-2012 14:39:41 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenters+xml;version=2.2
Content-Length: 2174

<?xml version="1.0" encoding="UTF-8"?>
<datacenters>
  <datacenter>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachineipmi" rel="checkmachineipmi"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate"
      rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/storage/devices"
      rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/discovermultiple"
      rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/discoversingle"
      rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1"
      rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/enterprises"
      rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits"
      rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor"
      rel="hypervisor" type="text/plain"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/hypervisors"
      rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1/network"
      rel="network" type="application/vnd.abiquo.vlans+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1/racks"
      rel="racks" type="application/vnd.abiquo.racks+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/remoteservices"
      rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/storage/tiers"
      rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
    <id>1</id>
    <location>New York</location>
    <name>JC-c41287a7-c6c</name>
    <uuid>agorilado</uuid>
  </datacenter>
</datacenters>

Datacenter Resource

Exposed Resources Hierarchy
DatacenterResource

Contents:

Main URI of the Resource

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

Exposed Methods.

Retrieve the hypervisor type from remote machine

Return the Hypervisor type of a remote machine using the given IP

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/hypervisor
Roles Needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept:text/plain;
Request Parameters:

Parameter

Required

Default Value

Description

ip

true

 

The IP of the target cloud node.

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

Retrieve the hypervisor type from remote machine example
$ curl -X GET http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor?ip=10.60.20.62\
	 -H 'Accept: text/plain'	\
	 -u user:password --verbose


GET http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor?ip=10.60.20.62 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: text/plain


HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Mon, 23 Jul 2012 14:07:28 GMT
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI0NjIxMjo5YTEwZDgyMTZmMTM4YjY4YTFiMzI4N2EyNGNmNjgxYjpBQklRVU8; Expires=Mon, 23-Jul-2012 14:37:26 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: text/plain

Retrieve a single datacenter

Returns a single Datacenter given its identifier

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}
Roles Needed: ROLE_PHYS_DC_ENUMERATE,ROLE_USERS_MANAGE_ENTERPRISE
Request Headers: Accept:application/vnd.abiquo.datacenter+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

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

Retrieve a datacenter example
$ curl -X GET http://10.60.21.181:80/api/admin/datacenters/1\
	 -H 'Accept: application/vnd.abiquo.datacenter+xml;version=2.2'	\
	 -u user:password --verbose


GET http://10.60.21.181:80/api/admin/datacenters/1 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenter+xml;version=2.2


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:09:38 GMT
Set-Cookie: JSESSIONID=C64AB8687E75CEA947FF2F899F8882A8; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDM3ODQyNjo1NWQxMjg1YmFkN2E1ZDQwNzcxMDczODMwOTk4ZWM4MzpBQklRVU8; Expires=Mon, 23-Jul-2012 14:39:38 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Length: 2147

<?xml version="1.0" encoding="UTF-8"?>
<datacenter>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachineipmi" rel="checkmachineipmi"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate"
    rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/storage/devices"
    rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/discovermultiple"
    rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/discoversingle"
    rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1" rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/enterprises"
    rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits"
    rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor"
    rel="hypervisor" type="text/plain"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/hypervisors"
    rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1/network"
    rel="network" type="application/vnd.abiquo.vlans+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1/racks"
    rel="racks" type="application/vnd.abiquo.racks+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/remoteservices"
    rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/storage/tiers"
    rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
  <id>1</id>
  <location>New York</location>
  <name>JC-c41287a7-c6c</name>
  <uuid>Hawaii</uuid>
</datacenter>

Retrieve enterprises using a Datacenter

Returns all Enterprises that are using the Datacenter

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/enterprises
Roles Needed: ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE,ROLE_PHYS_DC_ENUMERATE
Request Headers: Accept:application/vnd.abiquo.enterprises+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

 

first element to retrieve

network

false

 

true if must return enterprises with network

has

false

 

 

limit

false

25

 number of elements to return

 

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

Retrive a list of Enterprises example
curl -X GET http://example.com/api/admin/datacenters/1/action/enterprises -H 'Accept:application/vnd.abiquo.enterprises+xml; version=2.2' -u user:password --verbose
 
GET /api/admin/datacenters/1/action/enterprises HTTP/1.1
Authorization: Basic ZXJ1aXpfYWRtaW46ZXJ1aXo=
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: example.com
Accept:application/vnd.abiquo.enterprises+xml; version=2.2
  
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: auth=ZXJ1aXpfYWRtaW46MTM1MjExMzgxOTQ2NjoyMTkwMjNjZDM4MmYxY2FlZTFhZGQwM2FhMjVjNmI2ZDpBQklRVU8; Expires=Mon, 05-Nov-2012 11:10:19 GMT; Path=/api
Content-Type: application/vnd.abiquo.enterprises+xml;version=2.2
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterprises>
    <link rel="first" href="http://example.com:80/api/admin/datacenters/1/action/enterprises"/>
    <link rel="last" href="http://example.com:80/api/admin/datacenters/1/action/enterprises?network=false&amp;startwith=0&amp;limit=25"/>
    <totalSize>1</totalSize>
    <enterprise>
        <link rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml" href="http://example.com:80/api/admin/enterprises/1/appslib/templateDefinitionLists"/>
        <link rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml" href="http://example.com:80/api/admin/enterprises/1/appslib/templateDefinitions"/>
        <link rel="chefelements" type="application/vnd.abiquo.extended-runlists+xml" href="http://example.com:80/api/admin/enterprises/1/action/chefelements"/>
        <link rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml" href="http://example.com:80/api/admin/enterprises/1/action/virtualdatacenters"/>
        <link rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml" href="http://example.com:80/api/admin/enterprises/1/datacenterrepositories"/>
        <link rel="edit" type="application/vnd.abiquo.enterprise+xml" href="http://example.com:80/api/admin/enterprises/1"/>
        <link rel="externalnetworks" type="application/vnd.abiquo.vlans+xml" href="http://example.com:80/api/admin/enterprises/1/action/externalnetworks"/>
        <link title="ips" rel="ips" href="http://example.com:80/api/admin/enterprises/1/action/ips"/>
        <link rel="limits" type="application/vnd.abiquo.limits+xml" href="http://example.com:80/api/admin/enterprises/1/limits"/>
        <link rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml" href="http://example.com:80/api/admin/enterprises/1/properties"/>
        <link rel="reservedmachines" type="application/vnd.abiquo.machines+xml" href="http://example.com:80/api/admin/enterprises/1/reservedmachines"/>
        <link rel="users" type="application/vnd.abiquo.users+xml" href="http://example.com:80/api/admin/enterprises/1/users"/>
        <link rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="http://example.com:80/api/admin/enterprises/1/action/virtualappliances"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com:80/api/admin/enterprises/1/action/virtualmachines"/>
        <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com:80/api/admin/enterprises/1/action/volumes"/>
        <cpuHard>0</cpuHard>
        <cpuSoft>0</cpuSoft>
        <hdHard>0</hdHard>
        <hdSoft>0</hdSoft>
        <publicIpsHard>0</publicIpsHard>
        <publicIpsSoft>0</publicIpsSoft>
        <ramHard>0</ramHard>
        <ramSoft>0</ramSoft>
        <storageHard>0</storageHard>
        <storageSoft>0</storageSoft>
        <vlansHard>0</vlansHard>
        <vlansSoft>0</vlansSoft>
        <chefClient>mothership-systems-admin</chefClient>
        <chefClientCertificate>-----BEGIN RSA PRIVATE KEY-----END RSA PRIVATE KEY-----</chefClientCertificate>
        <chefURL>http://10.60.10.5:5000</chefURL>
        <chefValidator>mothership-systems-validator</chefValidator>
        <chefValidatorCertificate>-----BEGIN RSA PRIVATE KEY-----END RSA PRIVATE KEY-----</chefValidatorCertificate>
        <id>1</id>
        <isReservationRestricted>false</isReservationRestricted>
        <name>Systems</name>
        <repositoryHard>0</repositoryHard>
        <repositorySoft>0</repositorySoft>
    </enterprise>
</enterprises>

Update an existing datacenter

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}
Roles Needed: ROLE_PHYS_DC_MANAGE
Request Headers: Accept:application/vnd.abiquo.datacenter+xml; version=2.2;Content-type:application/vnd.abiquo.datacenter+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

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

Update an existing datacenter example
$ curl -X PUT http://10.60.21.181:80/api/admin/datacenters/1\
	 -H 'Accept: application/vnd.abiquo.datacenter+xml;version=2.2'	\
	 -H 'Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2'	\
	 -d @entity.xml	\
	 -u user:password --verbose


PUT http://10.60.21.181:80/api/admin/datacenters/1 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Length: 2245


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:07:28 GMT
Set-Cookie: JSESSIONID=8FE4F232680462D449F4293FAAE606CD; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI0ODE5Njo1NWU2N2RlOTllNGMxY2E5ODhlZTI2NjNjOTRiNmNhYjpBQklRVU8; Expires=Mon, 23-Jul-2012 14:37:28 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.datacenter+xml;version=2.2
Content-Length: 2147

<?xml version="1.0" encoding="UTF-8"?>
<datacenter>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachineipmi" rel="checkmachineipmi"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate"
    rel="checkmachinestate" type="application/vnd.abiquo.machinestate+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/storage/devices"
    rel="devices" type="application/vnd.abiquo.datacenters+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/discovermultiple"
    rel="discovermultiple" type="application/vnd.abiquo.machines+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/discoversingle"
    rel="discoversingle" type="application/vnd.abiquo.machine+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1" rel="edit" type="application/vnd.abiquo.datacenter+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/enterprises"
    rel="enterprises" type="application/vnd.abiquo.enterprises+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits"
    rel="getLimits" type="application/vnd.abiquo.limit+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/hypervisor"
    rel="hypervisor" type="text/plain"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/hypervisors"
    rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1/network"
    rel="network" type="application/vnd.abiquo.vlans+xml"/>
  <link href="http://10.60.21.181:80/api/admin/datacenters/1/racks"
    rel="racks" type="application/vnd.abiquo.racks+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/remoteservices"
    rel="remoteservices" type="application/vnd.abiquo.remoteservices+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/storage/tiers"
    rel="tiers" type="application/vnd.abiquo.tiers+xml"/>
  <link
    href="http://10.60.21.181:80/api/admin/datacenters/1/action/updateusedresources" rel="updateusedresources"/>
  <id>1</id>
  <location>New York</location>
  <name>JC-c41287a7-c6c</name>
  <uuid>agorilado</uuid>
</datacenter>

Download a template

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

Retrieve available hypervisor types from a Datacenter

Returns available Hypervisor types from a Datacenter

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/hypervisors
Roles Needed: ROLE_PHYS_DC_RETRIEVE_DETAILS, ROLE_VDC_MANAGE
Request Headers: Accept:application/vnd.abiquo.hypervisortypes+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

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

Retrive available hypervisor types example
curl -X GET http://example.com/api/admin/datacenters/1/hypervisors -H 'Accept:application/vnd.abiquo.hypervisortypes+xml; version=2.2' -u user:password --verbose
GET /api/admin/datacenters/1/hypervisors HTTP/1.1
Authorization: Basic ZXJ1aXpfYWRtaW46ZXJ1aXo=
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: example.com
Accept:application/vnd.abiquo.hypervisortypes+xml; version=2.2
  
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: auth=ZXJ1aXpfYWRtaW46MTM1MjExMzkwNTQ4MzpjY2Y1ZDliODc5ODE0ZDRiNWI3OTI3ZWMyOTNmYTM2MjpBQklRVU8; Expires=Mon, 05-Nov-2012 11:11:45 GMT; Path=/api
Set-Cookie: JSESSIONID=6E9DDA8874AEC02FBFF508BCB0320CDB; Path=/api
Content-Type: application/vnd.abiquo.hypervisortypes+xml;version=2.2
Content-Length: 548
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<hypervisorstype>
    <hypervisortype>
        <baseFormat>VMDK_FLAT</baseFormat>
        <compatibilityTable>RAW</compatibilityTable>
        <compatibilityTable>VMDK_SPARSE</compatibilityTable>
        <compatibilityTable>VMDK_FLAT</compatibilityTable>
        <compatibilityTable>VHD_FLAT</compatibilityTable>
        <compatibilityTable>VHD_SPARSE</compatibilityTable>
        <compatibilityTable>QCOW2_FLAT</compatibilityTable>
        <compatibilityTable>QCOW2_SPARSE</compatibilityTable>
        <defaultPort>8889</defaultPort>
        <id>2</id>
    </hypervisortype>
</hypervisorstype>

Deletes a Datacenter

Deletes a single Datacenter given its identifier

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}
Roles Needed: ROLE_PHYS_DC_MANAGE
Request Headers:
Request Parameters:

Parameter

Required

Default Value

Description

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

Delete an existing Datacenter example
$ curl -X DELETE http://10.60.21.181:80/api/admin/datacenters/1\
	 -u user:password --verbose


DELETE http://10.60.21.181:80/api/admin/datacenters/1 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==


HTTP/1.1 204 No Content
Date: Mon, 23 Jul 2012 14:09:53 GMT
Set-Cookie: JSESSIONID=BFA3154C6C336BEDCC61B484DC14656D; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDM5MzY1MTplODg2YmE2YTQ0Y2U0YTRhNmQ3NWQwODQ0M2QzZDI5ZDpBQklRVU8; Expires=Mon, 23-Jul-2012 14:39:53 GMT; Path=/api
Server: Apache-Coyote/1.1

Retrieve remote machine information

This query retrieves information about the physical machine that can be used to create this physical machine in Abiquo. This feature takes the remote machine user, password and hypervisor type. The response entity is a Machine can be copy-pasted and edited for use in physical machine creation.

See the page on the method to Create a machine in the MachineResource for more information on how to edit this file. 

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/discoversingle

Roles Needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept:application/vnd.abiquo.machine+xml; version=2.3;
Request Parameters:

Parameter

Required

Default Value

Description

ip

false

 

ip address of the hypevisor

hypervisor

false

 

kind of hypervisor

user

true

 

user to log in.

password

true

 

password to log in.

port

false

8889

port address to query the request of the hypervisor. Only useful in KVM and XEN
hypervisor types.

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

Retrieve remote machine information example
$ curl -X GET "http://10.60.13.4:80/api/admin/datacenters/1/action/discoversingle?hypervisor=VMX_04&ip=192.168.2.56&user=root&password=temporal" \
       -u admin:xabiquo --verbose -H 'Accept:application/vnd.abiquo.machine+xml;version=2.3' | xmlindent -nbe -f

> GET /api/admin/datacenters/1/action/discoversingle?hypervisor=VMX_04&ip=192.168.2.56&user=root&password=temporal 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: 10.60.13.4
> Accept:application/vnd.abiquo.machine+xml;version=2.3
> 

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM2NjE0ODAxMTU5MTpmNTFlOGY4NjI0MGZhMmIzNTYwODMxODUwMjI3NzNiODpBQklRVU8; Expires=Tue, 16-Apr-2013 21:33:31 GMT; Path=/api
< Set-Cookie: JSESSIONID=0EA2CEE9ECEFCC105CA4BD5364A3E4B4; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml;version=2.3
< Content-Length: 898
< Date: Tue, 16 Apr 2013 21:03:38 GMT
< 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <datastores>
        <datastore>
            <datastoreUUID>4f1097e7-94ca-42a9-8c13-1c8918508248</datastoreUUID>
            <directory></directory>
            <enabled>false</enabled>
            <name>datastore1</name>
            <rootPath>datastore1</rootPath>
            <size>67914170368</size>
            <usedSize>50602180608</usedSize>
        </datastore>
    </datastores>
    <description>bc2blade6.bcn.abiquo.com.</description>
    <initiatorIQN>iqn.1998-01.com.vmware:bc2blade6-0880960b</initiatorIQN>
    <ip>192.168.2.56</ip>
    <ipService>192.168.2.56</ipService>
    <name>bc2blade6.bcn.abiquo.com.</name>
    <networkInterfaces>
        <networkinterface>
            <mac>00:15:c5:ff:1b:8a</mac>
            <name>vSwitch0</name>
        </networkinterface>
        <networkinterface>
            <mac>00:15:c5:ff:1b:8c</mac>
            <name>vSwitch1</name>
        </networkinterface>
    </networkInterfaces>
    <port>8889</port>
    <state>MANAGED</state>
    <type>VMX_04</type>
    <cpu>8</cpu>
    <cpuUsed>0</cpuUsed>
    <ram>8191</ram>
    <ramUsed>0</ramUsed>
</machine>

Retrieve a list of remote machine information

Returns the list of physical machines that match the request of Hypervisor type, user and password between the values ipFrom and ipTo. This feature is used to retrieve information from a list of remote machines giving the user, password and hypervisor type of each machine. You can also filter the search by the vswitch value. The response entity is a list of Machine that can be used to create multiple physical machines.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/discovermultiple
Roles Needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept:application/vnd.abiquo.machines+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

ipFrom

false

 

first ip to look for

ipTo

false

 

last ip to look for

hypervisor

false

 

kind of hypervisor

user

true

 

user to log in

password

true

 

password to log in

port

false

8889

port address to query to request the hypervisor. Only useful for KVM and XEN
hypervisor types

vswitch

false

 

name of the vswitch that all physical machines to discover should have configured

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

 

curl -X GET "http://10.60.13.4:80/api/admin/datacenters/1/action/discovermultiple?hypervisor=VMX_04&ipFrom=192.168.2.54&ipTo=192.168.2.56&user=root&password=temporal" \
     -u admin:xabiquo --verbose -H 'Accept:application/vnd.abiquo.machines+xml;version=2.3' | xmlindent -nbe -f
 
> GET /api/admin/datacenters/1/action/discovermultiple?hypervisor=VMX_04&ipFrom=192.168.2.54&ipTo=192.168.2.56&user=root&password=temporal 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: 10.60.13.4
> Accept:application/vnd.abiquo.machines+xml;version=2.3
> 

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM2NjE0ODMxNjcyMjoyMjUwZjMwOWE0MTExZDY0YjllNDM5ODJhNTRlMDkzZDpBQklRVU8; Expires=Tue, 16-Apr-2013 21:38:36 GMT; Path=/api
< Set-Cookie: JSESSIONID=F9A359B9CE33F574DB5E0E7532CD09C6; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml;version=2.3
< Content-Length: 1134
< Date: Tue, 16 Apr 2013 21:09:04 GMT
< 


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <datastores>
            <datastore>
                <datastoreUUID>88c3d596-ac98-444d-8640-8cc52ab6e88a</datastoreUUID>
                <directory></directory>
                <enabled>false</enabled>
                <name>datastore1 (3)</name>
                <rootPath>datastore1 (3)</rootPath>
                <size>140660178944</size>
                <usedSize>1018167296</usedSize>
            </datastore>
            <datastore>
                <datastoreUUID>4d1dd629-10d7-4b1f-8b15-d943092a84c0</datastoreUUID>
                <directory></directory>
                <enabled>false</enabled>
                <name>Shared</name>
                <rootPath>Shared</rootPath>
                <size>10401144832</size>
                <usedSize>787824640</usedSize>
            </datastore>
        </datastores>
        <description>bc2blade5.</description>
        <initiatorIQN>iqn.1998-01.com.vmware:bc2blade5-5d81b8ab</initiatorIQN>
        <ip>192.168.2.55</ip>
        <ipService>192.168.2.55</ipService>
        <name>bc2blade5.</name>
        <networkInterfaces>
            <networkinterface>
                <mac>00:15:c5:ff:22:fb</mac>
                <name>vSwitch0</name>
            </networkinterface>
            <networkinterface>
                <mac>00:15:c5:ff:22:fd</mac>
                <name>vSwitch1</name>
            </networkinterface>
        </networkInterfaces>
        <port>8889</port>
        <state>MANAGED</state>
        <type>VMX_04</type>
        <cpu>8</cpu>
        <cpuUsed>0</cpuUsed>
        <ram>8191</ram>
        <ramUsed>0</ramUsed>
    </machine>
</machines>

 

Checks the machine state from remote machine

This feature is used to check the state of a machine from a remote machine given its user, password and hypervisor type. This machine does not need to be managed by Abiquo. The response entity is a MachineState. Behind the scenes, this method uses the Discovery Manager remote service. Check the state from remote machine

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/checkmachinestate
Roles Needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept:application/vnd.abiquo.machinestate+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

ip

true

 

The IP of the target cloud node.

hypervisor

true

 

The cloud node hypervisor type.

user

true

 

The hypervisor user.

password

true

 

The hypervisor password.

port

true

 

The hypervisor AIM port.

 

 

 

 

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

Check the state from remote machine example
$ curl -X GET http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate?hypervisor=VMX_04&ip=10.60.20.62&user=root&password=temporal&port=443\
	 -H 'Accept: application/vnd.abiquo.machinestate+xml;version=2.2'	\
	 -u user:password --verbose


GET http://10.60.21.181:80/api/admin/datacenters/1/action/checkmachinestate?hypervisor=VMX_04&ip=10.60.20.62&user=root&password=temporal&port=443 HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.machinestate+xml;version=2.2


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:08:16 GMT
Set-Cookie: JSESSIONID=0BECA41B8E716F70FE82D7BA3369D21A; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI4OTIxOTo0YWQxOWZhYTc3OTdlOGQ5ZWYzM2VkYzdiYTI2N2M5YzpBQklRVU8; Expires=Mon, 23-Jul-2012 14:38:09 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.machinestate+xml;version=2.2
Content-Length: 106

<?xml version="1.0" encoding="UTF-8"?>
<MachineState>
  <state>MANAGED</state>
</MachineState>

Check IPMI configuration from remote machine

This feature is used to check the configuration from a remote machine Machine giving its user, password and port. This machine does not need to be managed by abiquo. Behind the scenes, it uses the Discovery Manager remote service.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/checkmachineipmistate
Roles Needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: 
Request Parameters:

Parameter

Required

Default Value

Description

ip

true

 

The IP of the target cloud node.

user

true

 

The hypervisor user.

password

true

 

The hypervisor password.

port

false

 

The hypervisor AIM port.

Request Message Body Entity: 
Response Message Body Entity: MachineIpmiState Data Model
Request Example:

Check IPMI configuration from remote machine example
curl -X GET 'http://example.com/api/admin/datacenters/1/action/checkmachineipmistate?ip=10.60.20.13&user=a&password=b' -H 'application/vnd.abiquo.machineipmistate+xml; version=2.2' -u user:password --verbose
 
GET /api/admin/datacenters/1/action/checkmachineipmistate?ip=10.60.20.13&user=bla&password=bli HTTP/1.1
Authorization: Basic ZXJ1aXpfYWRtaW46ZXJ1aXo=
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: example.com

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: auth=ZXJ1aXpfYWRtaW46MTM1MjExNTQwMzkyNjpiMDRiZTM1ZjZjNWZhYmVjOWQxYTYzZjkxYTg0Mjk4ZDpBQklRVU8; Expires=Mon, 05-Nov-2012 11:36:43 GMT; Path=/api
Set-Cookie: JSESSIONID=63DB185ACC1D449AE263C90C09D1E795; Path=/api
Content-Type: application/vnd.abiquo.machineipmistate+xml;version=2.2
Content-Length: 121

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machineipmistate>
    <state>NOT_CONFIGURED</state>
</machineipmistate>

Datacenter Limits Action Resource

Exposed Resources Hierarchy
DatacenterLimitsActionResource

Contents:

Main URI of the Resource

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

Exposed Methods.

Retrieve limits by datacenter

Retrieve the Datacenter limits given its identifier

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/action/getlimits
Roles Needed: ROLE_PHYS_DC_RETRIEVE_RESOURCE_USAGE
Request Headers: Accept:application/vnd.abiquo.limits+xml; version=2.2;
Request Parameters:

Parameter

Required

Default Value

Description

enterprise

false

 

identifier of the enterprise

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

Retrieve limits by datacenter example
$ curl -X GET http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits\
	 -H 'Accept: application/vnd.abiquo.limits+xml;version=2.2'	\
	 -u user:password --verbose


GET http://10.60.21.181:80/api/admin/datacenters/1/action/getlimits HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.limits+xml;version=2.2


HTTP/1.1 200 OK
Date: Mon, 23 Jul 2012 14:07:28 GMT
Set-Cookie: JSESSIONID=88278B28A60198578E54DE8448665D31; Path=/api
Set-Cookie: auth=YWRtaW46MTM0MzA1NDI0ODE0NDpkYzMzYzZiOGUxNDEwY2I3MzgzMjExNDI3NmM5MTI4MTpBQklRVU8; Expires=Mon, 23-Jul-2012 14:37:28 GMT; Path=/api
Server: Apache-Coyote/1.1
Content-Type: application/vnd.abiquo.limits+xml;version=2.2
Content-Length: 2836

<?xml version="1.0" encoding="UTF-8"?>
<limits>
  <limit>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/1/limits/1/action/virtualappliances"
      rel="action" title="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1"
      rel="datacenter" title="JC-c41287a7-c6c"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/1/limits/1/datacenter"
      rel="datacenterByLimit" title="JC-c41287a7-c6c" type="application/vnd.abiquo.datacenter+xml"/>
    <link href="http://10.60.21.181:80/api/admin/enterprises/1/limits/1"
      rel="edit" type="application/vnd.abiquo.limit+xml"/>
    <link href="http://10.60.21.181:80/api/admin/enterprises/1"
      rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/1/limits/1/externalnetworks"
      rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/1/limits/1/hypervisors"
      rel="hypervisor" type="application/vnd.abiquo.hypervisortypes+xml"/>
    <cpuHard>0</cpuHard>
    <cpuSoft>0</cpuSoft>
    <hdHard>0</hdHard>
    <hdSoft>0</hdSoft>
    <publicIpsHard>0</publicIpsHard>
    <publicIpsSoft>0</publicIpsSoft>
    <ramHard>0</ramHard>
    <ramSoft>0</ramSoft>
    <storageHard>0</storageHard>
    <storageSoft>0</storageSoft>
    <vlansHard>0</vlansHard>
    <vlansSoft>0</vlansSoft>
    <id>1</id>
    <repositoryHard>0</repositoryHard>
    <repositorySoft>0</repositorySoft>
  </limit>
  <limit>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/2/limits/2/action/virtualappliances"
      rel="action" title="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml"/>
    <link href="http://10.60.21.181:80/api/admin/datacenters/1"
      rel="datacenter" title="JC-c41287a7-c6c"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/2/limits/2/datacenter"
      rel="datacenterByLimit" title="JC-c41287a7-c6c" type="application/vnd.abiquo.datacenter+xml"/>
    <link href="http://10.60.21.181:80/api/admin/enterprises/2/limits/2"
      rel="edit" type="application/vnd.abiquo.limit+xml"/>
    <link href="http://10.60.21.181:80/api/admin/enterprises/2"
      rel="enterprise" type="application/vnd.abiquo.enterprise+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/2/limits/2/externalnetworks"
      rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"/>
    <link
      href="http://10.60.21.181:80/api/admin/enterprises/2/limits/2/hypervisors"
      rel="hypervisor" type="application/vnd.abiquo.hypervisortypes+xml"/>
    <cpuHard>0</cpuHard>
    <cpuSoft>0</cpuSoft>
    <hdHard>0</hdHard>
    <hdSoft>0</hdSoft>
    <publicIpsHard>0</publicIpsHard>
    <publicIpsSoft>0</publicIpsSoft>
    <ramHard>0</ramHard>
    <ramSoft>0</ramSoft>
    <storageHard>0</storageHard>
    <storageSoft>0</storageSoft>
    <vlansHard>0</vlansHard>
    <vlansSoft>0</vlansSoft>
    <id>2</id>
    <repositoryHard>0</repositoryHard>
    <repositorySoft>0</repositorySoft>
  </limit>
</limits>
  • No labels