Clusters¶
A Cluster is a representation of a collection of message broker nodes with respective endpoints (e.g. RabbitMQ Cluster).
Create Cluster¶
- POST /clusters¶
Create a new Cluster.
Example request:
POST /clusters HTTP/1.1 Host: example.com Accept: application/json Content-Type: application/json { "name": "Example Cluster", "size": 3, "flavor": "101", "volume_size": "1048576" "network_id": [ "ea540512-4d4a-4c46-9ebd-4fafe4a54a2d" ] "auth_credential": { "type": "PLAIN", "token": { "username": "rabbit_user" "password": "super_secret_password" } } }
Example response:
HTTP/1.1 201 Created Location: http://127.0.0.1:8795/v1/clusters/2c3c66ba-721b-4443-bc81-55d986848c68 Content-Type: application/json; charset=UTF-8 { "status": "BUILDING", "name": "Example Cluster", "network_id": [ "ea540512-4d4a-4c46-9ebd-4fafe4a54a2d" ], "created_at": "2015-06-03T21:49:49+00:00", "volume_size": 1048576, "endpoints": [], "flavor": "101", "id": "2c3c66ba-721b-4443-bc81-55d986848c68", "size": 3 }
Form Parameters: - status – status of the cluster
- name – name of the cluster
- network_id – a list of UUID of network id’s
- created_at – create cluster request received timestamp
- volume_size – volume size used for each node
- endpoints – list of endpoints for each node
- flavor – node flavor
- id – the UUID of the cluster
- size – size of the cluster
- auth_credential – Authentication credentials
Status Codes: - 201 Created – Created
- 400 Bad Request – Bad Request
- 401 Unauthorized – Access Denied
Get Cluster¶
- GET /clusters/(uuid: id)¶
Get a specific Cluster using the Cluster’s uuid id.
Example request:
GET /clusters/2c3c66ba-721b-4443-bc81-55d986848c68 HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8 { "status": "ACTIVE", "name": "Example Cluster", "network_id": [ "c6958944-7ef0-4929-9625-7f924bb2610c" ], "created_at": "2015-06-03T22:44:17+00:00", "updated_at": "2015-06-03T22:47:15+00:00", "volume_size": 1048576, "endpoints": [ { "type": "AMQP", "uri": "10.0.0.9:5672" }, { "type": "AMQP", "uri": "10.0.0.11:5672" }, { "type": "AMQP", "uri": "10.0.0.10:5672" } ], "flavor": "8795", "id": "2c3c66ba-721b-4443-bc81-55d986848c68", "size": 3 }
Form Parameters: - updated_at – cluster last updated at timestamp
Status Codes: - 200 OK – OK
- 400 Bad Request – Bad Request
List Clusters¶
- GET /clusters¶
Lists all clusters
Example request:
GET /servers HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json { "status": "ACTIVE", "name": "Example Cluster", "network_id": [ "c6958944-7ef0-4929-9625-7f924bb2610c" ], "created_at": "2015-06-03T22:44:17+00:00", "updated_at": "2015-06-04T00:31:16+00:00", "volume_size": 1048576, "endpoints": [ { "type": "AMQP", "uri": "10.0.0.9:5672" }, { "type": "AMQP", "uri": "10.0.0.11:5672" }, { "type": "AMQP", "uri": "10.0.0.10:5672" } ], "flavor": "8795", "id": "2c3c66ba-721b-4443-bc81-55d986848c68", "size": 3 }, { "status": "DELETED", "name": "cluster_01", "network_id": [ "ba013641-8b54-40a5-801d-a7839690e272" ], "created_at": "2015-05-13T21:23:15+00:00", "updated_at": "2015-05-13T21:30:15+00:00", "endpoints": [ { "type": "AMQP", "uri": "10.0.0.7:5672" } ], "flavor": "8795", "id": "85a63cac-9bf7-4ef7-962d-dd51bde0b29b", "size": 1 },
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
Delete Cluster¶
- DELETE /clusters/(uuid: id)¶
Delete a cluster.
Example request:
DELETE /clusters HTTP/1.1 Accept: application/json
Example response:
HTTP/1.1 202 Accepted
Status Codes: - 400 Bad Request – Bad Request
- 204 No Content – Successfully Deleted