api-ref: parameter verification for os-aggregates

checked parameters

Part of bp:api-ref-in-rst

Change-Id: I8fe3825243f8b94d5c3f382ebc30c342bffafcac
This commit is contained in:
Kevin_Zheng 2016-05-12 20:23:17 +08:00 committed by Zhenyu Zheng
parent 279f1a9bf6
commit 2057ed76d2
2 changed files with 217 additions and 6 deletions

View File

@ -1,5 +1,4 @@
.. -*- rst -*-
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
@ -25,6 +24,19 @@ Error response codes: unauthorized(401), forbidden(403)
Response
--------
.. 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
**Example List Aggregates: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-list-get-resp.json
@ -46,8 +58,9 @@ Request
.. rest_parameters:: parameters.yaml
- aggregate: aggregate
- name: aggregate_name
- availability_zone: availability_zone
- availability_zone: aggregate_az_optional
**Example Create Aggregate: JSON request**
@ -57,6 +70,17 @@ Request
Response
--------
.. 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
**Example Create Aggregate: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-post-resp.json
@ -83,6 +107,19 @@ Request
Response
--------
.. 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
**Example Show Aggregate Details: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-get-resp.json
@ -106,6 +143,9 @@ Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- aggregate: aggregate
- name: aggregate_name_optional
- availability_zone: aggregate_az_optional
**Example Update Aggregate: JSON request**
@ -115,6 +155,19 @@ Request
Response
--------
.. 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
**Example Update Aggregate: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregate-update-post-resp.json
@ -148,7 +201,7 @@ Add Host
Adds a host to an aggregate.
Specify the ``add_host`` action in the request body.
Specify the ``add_host`` action and host name in the request body.
Normal response codes: 200
@ -161,6 +214,8 @@ Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- add_host: aggregate_add_host
- host: host_name_body
**Example Add Host: JSON request**
@ -170,6 +225,19 @@ Request
Response
--------
.. 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
**Example Add Host: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-add-host-post-resp.json
@ -182,7 +250,7 @@ Remove Host
Removes a host from an aggregate.
Specify the ``remove_host`` action in the request body.
Specify the ``remove_host`` action and host name in the request body.
Normal response codes: 200
@ -195,6 +263,8 @@ Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- remove_host: aggregate_remove_host
- host: host_name_body
**Example Remove Host: JSON request**
@ -204,6 +274,19 @@ Request
Response
--------
.. 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
**Example Remove Host: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-remove-host-post-resp.json
@ -229,6 +312,8 @@ Request
.. rest_parameters:: parameters.yaml
- aggregate_id: aggregate_id
- set_metadata: set_metadata
- metadata: metadata_set_required
**Example Create Or Update Aggregate Metadata: JSON request**
@ -238,6 +323,19 @@ Request
Response
--------
.. 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
**Example Create Or Update Aggregate Metadata: JSON response**
.. literalinclude:: ../../doc/api_samples/os-aggregates/aggregates-metadata-post-resp.json

View File

@ -732,12 +732,72 @@ agent_id_str:
in: body
required: true
type: string
aggregate_name:
aggregate:
description: |
The name of the aggregate.
The host aggregate object.
in: body
required: true
type: object
aggregate_add_host:
description: |
The add_host object used to add host to aggregate.
in: body
required: true
type: object
aggregate_az:
description: |
The availability zone of the host aggregate.
in: body
required: true
type: string
aggregate_az_optional:
description: |
The availability zone of the host aggregate.
in: body
required: false
type: string
aggregate_host_list:
description: |
A list of host ids in this aggregate.
in: body
required: true
type: array
aggregate_id_body:
description: |
The ID of the host aggregate.
in: body
required: true
type: string
aggregate_metadata:
description: |
Metadata key and value pairs associate with the aggregate.
in: body
required: true
type: object
aggregate_name:
description: |
The name of the host aggregate.
in: body
required: true
type: string
aggregate_name_optional:
description: |
The name of the host aggregate.
in: body
required: false
type: string
aggregate_remove_host:
description: |
The add_host object used to remove host from aggregate.
in: body
required: true
type: object
aggregates:
description: |
The list of existing aggregates.
in: body
required: true
type: array
alias:
description: |
A short name by which this extension is also known.
@ -1067,6 +1127,29 @@ delete_on_termination:
in: body
required: true
type: string
deleted:
description: |
A boolean indicate whether this aggregate is deleted or not, if it has
not been deleted, ``false`` will appear.
in: body
required: true
type: boolean
deleted_at:
description: |
The date and time when the resource was deleted. If the resource has
not been deleted yet, this field will be ``null``, The date and time
stamp format is `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
::
CCYY-MM-DDThh:mm:ss±hh:mm
For example, ``2015-08-27T09:49:58-05:00``. The ``±hh:mm``
value, if included, is the time zone as an offset from UTC. In
the previous example, the offset value is ``-05:00``.
in: body
required: true
type: string
description:
description: |
Security group description.
@ -2186,6 +2269,14 @@ metadata_required:
description: |
Metadata key and value pairs. The maximum size of the metadata key and value is
255 bytes each. This field is never used, always kept empty.
The associated metadata key and value pairs.
in: body
required: true
type: object
metadata_set_required:
description: |
Metadata key and value pairs. The maximum size of the metadata key and value is
255 bytes each.
in: body
required: true
type: object
@ -2999,6 +3090,12 @@ services:
type: array
description: |
An array of service objects
set_metadata:
description: |
The set_metadata object used to set metadata for host aggregate.
in: body
required: true
type: object
shelve:
description: |
The action.
@ -3117,6 +3214,22 @@ updated:
in: body
required: true
type: string
updated_consider_null:
description: |
The date and time when the resource was updated, if the resource has
not been updated, this field will show as ``null``. The date and time
stamp format is `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_
::
CCYY-MM-DDThh:mm:ss±hh:mm
For example, ``2015-08-27T09:49:58-05:00``. The ``±hh:mm``
value, if included, is the time zone as an offset from UTC. In
the previous example, the offset value is ``-05:00``.
in: body
required: true
type: string
uptime:
description: |
The total uptime of the hypervisor and information about average