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:

Racks Resource

The Rack Resource represents logical racks in private cloud datacenters. When scheduling VMs, the platform uses the rack network configuration and the platform's high availability feature also works at the rack level.

Main URI of the Resource

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

Exposed Methods

List racks

Retrieve a list of all racks in a datacenter

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks
Roles Required: PHYS_DC_RETRIEVE_DETAILS,USERS_MANAGE_RESERVED_MACHINES
Request Headers: Accept: application/vnd.abiquo.racks+json; version=4.4; application/vnd.abiquo.racks+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

filter

false

 

Name based filter

 

 

 

 

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

 Click here to show or hide the request example

GET_adm_dcs_X_rks_AC_rks_j.0001.txt

cURL:

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

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "vlansIdAvoided": "", 
      "nrsq": 0, 
      "name": "8", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/datacenters/838", 
          "type": "application/vnd.abiquo.datacenter+json", 
          "rel": "datacenter", 
          "title": "6"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/838/racks/247/machines", 
          "type": "application/vnd.abiquo.machines+json", 
          "rel": "machines", 
          "title": "machines"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/838/racks/247", 
          "type": "application/vnd.abiquo.rack+json", 
          "rel": "edit", 
          "title": "8"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/838/racks/247/metrics/collectd", 
          "type": "application/json", 
          "rel": "collectd", 
          "title": "collectd"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/838/racks/247/metrics", 
          "type": "application/vnd.abiquo.metricsmetadata+json", 
          "rel": "metricsmetadata", 
          "title": "metricsmetadata"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/838/racks/247/clusters", 
          "type": "application/vnd.abiquo.clusters+json", 
          "rel": "clusters", 
          "title": "clusters"
        }
      ], 
      "vlanPerVdcReserved": 2, 
      "haEnabled": false, 
      "vlanIdMax": 16777215, 
      "longDescription": "9", 
      "shortDescription": "9", 
      "id": 247, 
      "vlanIdMin": 2
    }
  ]
}

Create a rack

Create a rack in a datacenter

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks
Roles Required: PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.rack+json; version=4.4; application/vnd.abiquo.rack+xml; version=4.4;  Content-type:  application/vnd.abiquo.rack+json; version=4.4; application/vnd.abiquo.rack+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

POST_adm_dcs_X_rks_CT_rk_j_AC_rk_j.0001.txt

cURL:

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

Success status code: 201

Request payload:

{
  "haEnabled": false, 
  "shortDescription": "rack_description", 
  "name": "rack_test", 
  "links": [], 
  "longDescription": "large_rack_description"
}

Response payload:

{
  "nrsq": 0, 
  "name": "rack_test", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "6"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562/racks/1281/machines", 
      "type": "application/vnd.abiquo.machines+json", 
      "rel": "machines", 
      "title": "machines"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562/racks/1281", 
      "type": "application/vnd.abiquo.rack+json", 
      "rel": "edit", 
      "title": "rack_test"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562/racks/1281/metrics/collectd", 
      "type": "application/json", 
      "rel": "collectd", 
      "title": "collectd"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562/racks/1281/metrics", 
      "type": "application/vnd.abiquo.metricsmetadata+json", 
      "rel": "metricsmetadata", 
      "title": "metricsmetadata"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4562/racks/1281/clusters", 
      "type": "application/vnd.abiquo.clusters+json", 
      "rel": "clusters", 
      "title": "clusters"
    }
  ], 
  "vlanPerVdcReserved": 2, 
  "haEnabled": false, 
  "vlanIdMax": 16777215, 
  "longDescription": "large_rack_description", 
  "shortDescription": "rack_description", 
  "id": 1281, 
  "vlanIdMin": 2
}

 

Get a rack

Retrieves a rack in a datacenter

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}
Roles Required: PHYS_DC_RETRIEVE_DETAILS, USERS_MANAGE_RESERVED_MACHINES
Request Headers: Accept: application/vnd.abiquo.rack+json; version=4.4; application/vnd.abiquo.rack+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

GET_adm_dcs_X_rks_X_AC_rk_j.0001.txt

cURL:

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

Success status code: 200

Request payload:

--none--

Response payload:

{
  "vlansIdAvoided": "", 
  "nrsq": 0, 
  "name": "442", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/150", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "438"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/150/racks/105/machines", 
      "type": "application/vnd.abiquo.machines+json", 
      "rel": "machines", 
      "title": "machines"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/150/racks/105", 
      "type": "application/vnd.abiquo.rack+json", 
      "rel": "edit", 
      "title": "442"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/150/racks/105/metrics/collectd", 
      "type": "application/json", 
      "rel": "collectd", 
      "title": "collectd"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/150/racks/105/metrics", 
      "type": "application/vnd.abiquo.metricsmetadata+json", 
      "rel": "metricsmetadata", 
      "title": "metricsmetadata"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/150/racks/105/clusters", 
      "type": "application/vnd.abiquo.clusters+json", 
      "rel": "clusters", 
      "title": "clusters"
    }
  ], 
  "vlanPerVdcReserved": 2, 
  "haEnabled": false, 
  "vlanIdMax": 16777215, 
  "longDescription": "443", 
  "shortDescription": "443", 
  "id": 105, 
  "vlanIdMin": 2
}

Update a rack

Updates a rack in datacenter.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}
Roles Required: PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.rack+json; version=4.4; application/vnd.abiquo.rack+xml; version=4.4;  Content-type:  application/vnd.abiquo.rack+json; version=4.4; application/vnd.abiquo.rack+xml; version=4.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

PUT_adm_dcs_X_rks_X_CT_rk_j_AC_rk_j.0001.txt

cURL:

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

Success status code: 200

Request payload:

{
  "vlansIdAvoided": "", 
  "nrsq": 0, 
  "name": "63", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "61"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/machines", 
      "type": "application/vnd.abiquo.machines+json", 
      "rel": "machines", 
      "title": "machines"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286", 
      "type": "application/vnd.abiquo.rack+json", 
      "rel": "edit", 
      "title": "63"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/metrics/collectd", 
      "type": "application/json", 
      "rel": "collectd", 
      "title": "collectd"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/metrics", 
      "type": "application/vnd.abiquo.metricsmetadata+json", 
      "rel": "metricsmetadata", 
      "title": "metricsmetadata"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/clusters", 
      "type": "application/vnd.abiquo.clusters+json", 
      "rel": "clusters", 
      "title": "clusters"
    }
  ], 
  "vlanPerVdcReserved": 2, 
  "haEnabled": false, 
  "vlanIdMax": 16777215, 
  "longDescription": "64", 
  "shortDescription": "dummy_description", 
  "id": 1286, 
  "vlanIdMin": 2
}

Response payload:

{
  "vlansIdAvoided": "", 
  "nrsq": 0, 
  "name": "63", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "61"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/machines", 
      "type": "application/vnd.abiquo.machines+json", 
      "rel": "machines", 
      "title": "machines"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286", 
      "type": "application/vnd.abiquo.rack+json", 
      "rel": "edit", 
      "title": "63"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/metrics/collectd", 
      "type": "application/json", 
      "rel": "collectd", 
      "title": "collectd"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/metrics", 
      "type": "application/vnd.abiquo.metricsmetadata+json", 
      "rel": "metricsmetadata", 
      "title": "metricsmetadata"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/4567/racks/1286/clusters", 
      "type": "application/vnd.abiquo.clusters+json", 
      "rel": "clusters", 
      "title": "clusters"
    }
  ], 
  "vlanPerVdcReserved": 2, 
  "haEnabled": false, 
  "vlanIdMax": 16777215, 
  "longDescription": "64", 
  "shortDescription": "dummy_description", 
  "id": 1286, 
  "vlanIdMin": 2
}

 

Delete a rack

Deletes a rack and hierarchy if "force" parameter is "true. The rack cannot be deleted if HA is in progress.

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

Parameter

Required

Default Value

Description

force

false

 

boolean to force cascade deletion

 

 

 

 

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

 Click here to show or hide the request example

DELETE_adm_dcs_X_rks_X.0001.txt

cURL:

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

Success status code: 204

Request payload:

--none--

Response payload:

--none--

List virtual machines deployed on machines on a rack

Retrieve all virtual machines within machines on this rack.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/deployedvms
Roles Required: PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.virtualmachines+json; version=4.4; application/vnd.abiquo.virtualmachines+xml; version=4.4; ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to expand...

GET_adm_dcs_X_rks_deployed_vms_X_AC_vms_j.txt

cURL:

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

Success status code: 200

Request payload:

--none--

Response payload:

{
    "links": [],
    "collection": [
        {
            "id": 26,
            "uuid": "422f20c1-103b-5c7c-7751-146ca56e207a",
            "name": "Abiquo monolithic 4.2",
            "label": "Abiquo monolithic 4.2",
            "fqdn": "mono42ova.bcn.abiquo.com",
            "description": "",
            "cpu": 2,
            "coresPerSocket": 1,
            "ram": 2048,
            "vdrpEnabled": false,
            "vdrpPort": 0,
            "idState": 4,
            "state": "ON",
            "idType": 0,
            "type": "NOT_MANAGED",
            "highDisponibility": 0,
            "metadata": null,
            "monitored": false,
            "monitoringLevel": "DEFAULT",
            "protected": false,
            "variables": {},
            "creationTimestamp": 1512041666000,
            "backuppolicies": [],
            "lastSynchronize": 1512041843000,
            "generateGuestInitialPassword": false,
            "links": [
                {
                    "title": "VMX_04",
                    "rel": "machine",
                    "type": "application/vnd.abiquo.machine+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/1/racks/2/machines/2"
                },
                {
                    "title": "BCDC",
                    "rel": "location",
                    "type": "application/vnd.abiquo.datacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/1"
                },
                {
                    "title": "VMware vCenter",
                    "rel": "hypervisortype",
                    "type": "application/vnd.abiquo.hypervisortype+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
                }
            ]
        },
        {
            "id": 1,
            "uuid": "141925a5-7ff0-44bd-98ea-e991c7509222",
            "name": "ABQ_141925a5-7ff0-44bd-98ea-e991c7509222",
            "label": "ABQ_141925a5-7ff0-44bd-98ea-e991c7509222",
            "description": "",
            "cpu": 1,
            "coresPerSocket": 1,
            "ram": 48,
            "vdrpEnabled": false,
            "vdrpPort": 0,
            "idState": 4,
            "state": "ON",
            "idType": 0,
            "type": "NOT_MANAGED",
            "highDisponibility": 0,
            "metadata": null,
            "monitored": false,
            "monitoringLevel": "DEFAULT",
            "protected": false,
            "variables": {},
            "creationTimestamp": 1512041666000,
            "backuppolicies": [],
            "lastSynchronize": 1512041851000,
            "generateGuestInitialPassword": false,
            "links": [
                {
                    "title": "VMX_04",
                    "rel": "machine",
                    "type": "application/vnd.abiquo.machine+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/admin/datacenters/1/racks/2/machines/2"
                },
                {
                    "title": "BCDC",
                    "rel": "location",
                    "type": "application/vnd.abiquo.datacenter+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/cloud/locations/1"
                },
                {
                    "title": "VMware vCenter",
                    "rel": "hypervisortype",
                    "type": "application/vnd.abiquo.hypervisortype+json",
                    "href": "https://mjsabiquo.bcn.abiquo.com:443/api/config/hypervisortypes/VMX_04"
                }
            ]
        }
    ]
}

 

List clusters on a rack

Retrieve clusters that the machines on this rack belong to

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/clusters 
Roles Required: PHYS_DC_RETRIEVE_DETAILS,USERS_MANAGE_RESERVED_MACHINES
Request Headers: Accept:  application/vnd.abiquo.clusters+json; version=4.4; application/vnd.abiquo.clusters+xml; version=4.4; ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to expand...
GET_adm_dcs_X_rks_X_clusters_AC_clusters_j.0001.txt

cURL:

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

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "providerId": "8", 
      "providerType": "9", 
      "name": "10", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619", 
          "type": "application/vnd.abiquo.datacenter+json", 
          "rel": "datacenter", 
          "title": "6"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619/racks/1728/clusters/41", 
          "type": "application/vnd.abiquo.cluster+json", 
          "rel": "self", 
          "title": "10"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619/racks/1728/machines/1860", 
          "type": "application/vnd.abiquo.machine+json", 
          "rel": "machine", 
          "title": "18"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619/racks/1728/machines/1861", 
          "type": "application/vnd.abiquo.machine+json", 
          "rel": "machine", 
          "title": "20"
        }
      ]
    }, 
    {
      "providerId": "11", 
      "providerType": "12", 
      "name": "13", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619", 
          "type": "application/vnd.abiquo.datacenter+json", 
          "rel": "datacenter", 
          "title": "6"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619/racks/1728/clusters/42", 
          "type": "application/vnd.abiquo.cluster+json", 
          "rel": "self", 
          "title": "13"
        }, 
        {
          "href": "http://localhost:9009/api/admin/datacenters/5619/racks/1728/machines/1862", 
          "type": "application/vnd.abiquo.machine+json", 
          "rel": "machine", 
          "title": "22"
        }
      ]
    }
  ]
}

 

Get a cluster on a rack

Retrieves a cluster that the machines on a rack belong to

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/clusters/{cluster} 
Roles Required: PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept:  application/vnd.abiquo.cluster+json; version=4.4; application/vnd.abiquo.cluster+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

GET_adm_dcs_X_rks_X_clusters_X_AC_cluster_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/datacenters/101/racks/95/clusters/1 \ 
	 -H 'Accept:application/vnd.abiquo.cluster+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "providerId": "8", 
  "providerType": "9", 
  "name": "10", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/datacenters/101", 
      "type": "application/vnd.abiquo.datacenter+json", 
      "rel": "datacenter", 
      "title": "6"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/101/racks/95/clusters/1", 
      "type": "application/vnd.abiquo.cluster+json", 
      "rel": "self", 
      "title": "10"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/101/racks/95/machines/95", 
      "type": "application/vnd.abiquo.machine+json", 
      "rel": "machine", 
      "title": "13"
    }, 
    {
      "href": "http://localhost:9009/api/admin/datacenters/101/racks/95/machines/96", 
      "type": "application/vnd.abiquo.machine+json", 
      "rel": "machine", 
      "title": "15"
    }
  ]
}