2016-04-12 13:03:46 +00:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
================================
|
|
|
|
Host aggregates (os-aggregates)
|
|
|
|
================================
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Creates and manages host aggregates. An aggregate assigns metadata to
|
|
|
|
groups of compute nodes. Aggregates are only visible to the cloud
|
|
|
|
provider.
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
List Aggregates
|
|
|
|
===============
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: GET /os-aggregates
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Lists all aggregates. Includes the ID, name, and availability zone for each aggregate.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: unauthorized(401), forbidden(403)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregates: aggregates
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: aggregate_host_list
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example List Aggregates (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregates-list-get-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Create Aggregate
|
|
|
|
================
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: POST /os-aggregates
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-07-05 08:50:19 +00:00
|
|
|
Creates an aggregate. If specifying an option availability_zone, the aggregate is
|
|
|
|
created as an availability zone and the availability zone is visible to normal users.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), conflict(409)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
- aggregate: aggregate
|
2016-04-25 04:46:22 +00:00
|
|
|
- name: aggregate_name
|
2016-05-12 12:23:17 +00:00
|
|
|
- availability_zone: aggregate_az_optional
|
2016-04-25 04:46:22 +00:00
|
|
|
|
|
|
|
**Example Create Aggregate: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-post-req.json
|
|
|
|
:language: javascript
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Create Aggregate (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregate-post-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Show Aggregate Details
|
|
|
|
======================
|
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: GET /os-aggregates/{aggregate_id}
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Shows details for an aggregate. Details include hosts and metadata.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: hosts
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Show Aggregate Details (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregates-get-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Update Aggregate
|
2016-04-12 13:03:46 +00:00
|
|
|
================
|
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: PUT /os-aggregates/{aggregate_id}
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Updates either or both the name and availability zone for an aggregate.
|
2016-07-05 08:50:19 +00:00
|
|
|
If the aggregate to be updated has host that already in the given
|
2016-09-28 05:34:23 +00:00
|
|
|
availability zone, the request will fail with 400 error.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
2016-05-12 12:23:17 +00:00
|
|
|
- aggregate: aggregate
|
|
|
|
- name: aggregate_name_optional
|
|
|
|
- availability_zone: aggregate_az_optional
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
**Example Update Aggregate: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-update-post-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-04-12 13:03:46 +00:00
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: hosts
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Update Aggregate (v2.41): JSON response**
|
2016-04-25 04:46:22 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregate-update-post-resp.json
|
2016-04-25 04:46:22 +00:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Delete Aggregate
|
2016-04-12 13:03:46 +00:00
|
|
|
================
|
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: DELETE /os-aggregates/{aggregate_id}
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Deletes an aggregate.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-09-06 09:49:27 +00:00
|
|
|
There is no body content for the response of a successful DELETE action.
|
2016-07-05 08:50:19 +00:00
|
|
|
|
2016-04-12 13:03:46 +00:00
|
|
|
Add Host
|
|
|
|
========
|
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: POST /os-aggregates/{aggregate_id}/action
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Adds a host to an aggregate.
|
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
Specify the ``add_host`` action and host name in the request body.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
2016-05-12 12:23:17 +00:00
|
|
|
- add_host: aggregate_add_host
|
|
|
|
- host: host_name_body
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
**Example Add Host: JSON request**
|
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-add-host-post-req.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: hosts
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Add Host (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregates-add-host-post-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
Remove Host
|
|
|
|
===========
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: POST /os-aggregates/{aggregate_id}/action
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
Removes a host from an aggregate.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
Specify the ``remove_host`` action and host name in the request body.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
2016-05-12 12:23:17 +00:00
|
|
|
- remove_host: aggregate_remove_host
|
|
|
|
- host: host_name_body
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
**Example Remove Host: JSON request**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-remove-host-post-req.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: hosts
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Remove Host (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregates-remove-host-post-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
Create Or Update Aggregate Metadata
|
|
|
|
===================================
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-06-02 12:50:03 +00:00
|
|
|
.. rest_method:: POST /os-aggregates/{aggregate_id}/action
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
Creates or replaces metadata for an aggregate.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-07-05 08:50:19 +00:00
|
|
|
Specify the ``set_metadata`` action and metadata info in the request body.
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-25 04:46:22 +00:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404)
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
Request
|
2016-04-14 17:10:59 +00:00
|
|
|
-------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate_id: aggregate_id
|
2016-05-12 12:23:17 +00:00
|
|
|
- set_metadata: set_metadata
|
2017-02-25 13:45:05 +00:00
|
|
|
- metadata: metadata_object
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
**Example Create Or Update Aggregate Metadata: JSON request**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-04-20 01:35:37 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-metadata-post-req.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 17:10:59 +00:00
|
|
|
--------
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2016-05-12 12:23:17 +00:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- aggregate: aggregate
|
|
|
|
- availability_zone: aggregate_az
|
|
|
|
- created_at: created
|
|
|
|
- deleted_at: deleted_at
|
|
|
|
- deleted: deleted
|
|
|
|
- hosts: hosts
|
|
|
|
- id: aggregate_id_body
|
|
|
|
- metadata: aggregate_metadata
|
|
|
|
- name: aggregate_name
|
|
|
|
- updated_at: updated_consider_null
|
2016-12-26 22:58:44 +00:00
|
|
|
- uuid: aggregate_uuid
|
2016-05-12 12:23:17 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
**Example Create Or Update Aggregate Metadata (v2.41): JSON response**
|
2016-04-12 13:03:46 +00:00
|
|
|
|
2017-01-25 14:55:43 +00:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.41/aggregates-metadata-post-resp.json
|
2016-04-12 13:03:46 +00:00
|
|
|
:language: javascript
|