Files
bed227c33a59d0407905056e01c923129c3d324c
nova /api-ref /source /os-aggregates.inc

390 lines
9.2 KiB
PHP
Raw Normal View History

Host aggregates (os-aggregates)
================================
Creates and manages host aggregates. An aggregate assigns metadata to
Policy defaults enable only users with the administrative role to perform
operations with aggregates. Cloud providers can change these permissions
through `policy file configuration
<https://docs.openstack.org/nova/latest/configuration/policy.html>`__.
===============
Normal response codes: 200
Response
- aggregates: aggregates
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: aggregate_host_list
- id: aggregate_id_body
- updated_at: updated_consider_null
================
created as an availability zone and the availability zone is visible to normal users.
Normal response codes: 200
Request
.. rest_parameters:: parameters.yaml
**Example Create Aggregate: JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-post-req.json
:language: javascript
Response
- 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
Show Aggregate Details
======================
Shows details for an aggregate. Details include hosts and metadata.
Normal response codes: 200
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
Response
- aggregate: aggregate
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: hosts
- id: aggregate_id_body
- updated_at: updated_consider_null
availability zone, the request will fail with 400 error.
Normal response codes: 200
itemNotFound(404), conflict(409)
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- name: aggregate_name_optional
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-update-post-req.json
:language: javascript
- aggregate: aggregate
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: hosts
- id: aggregate_id_body
- updated_at: updated_consider_null
Delete Aggregate
Normal response codes: 200
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
Response
========
Adds a host to an aggregate.
Specify the ``add_host`` action and host name in the request body.
Normal response codes: 200
itemNotFound(404), conflict(409)
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- host: host_name_body
**Example Add Host: JSON request**
Response
- aggregate: aggregate
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: hosts
- id: aggregate_id_body
- updated_at: updated_consider_null
===========
Specify the ``remove_host`` action and host name in the request body.
Normal response codes: 200
itemNotFound(404), conflict(409)
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- host: host_name_body
Response
- aggregate: aggregate
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: hosts
- id: aggregate_id_body
- updated_at: updated_consider_null
===================================
Normal response codes: 200
itemNotFound(404)
Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
Response
- aggregate: aggregate
- availability_zone: aggregate_az
- created_at: created
- deleted_at: deleted_at
- deleted: deleted
- hosts: hosts
- id: aggregate_id_body
- updated_at: updated_consider_null
Request Image Pre-caching for Aggregate
=======================================
.. rest_method:: POST /os-aggregates/{aggregate_id}/images
Requests that a set of images be pre-cached on compute nodes within the referenced aggregate.
This API is available starting with microversion 2.81.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- cache: cache
- cache.id: image_id_body
**Example Request Image pre-caching for Aggregate (v2.81): JSON request**
.. literalinclude:: ../../doc/api_samples/os-aggregates/v2.81/aggregate-images-post-req.json
:language: javascript
Response
--------
The response body is always empty.