Refactor Ceilometer resource API

This patch refactors Ceilometer resource API to make it be readable
and maintainable.

Change-Id: I93d9520ab2a3247c1877e568416efacecb49d888
This commit is contained in:
Ha Van Tu 2016-09-19 09:19:48 +07:00
parent 976d8b4931
commit 37c45c03c1
2 changed files with 17 additions and 6 deletions

View File

@ -20,7 +20,7 @@ meter_name:
in: path in: path
required: false required: false
type: string type: string
resource_id_2: resource_id_path:
description: | description: |
The UUID of the resource. The UUID of the resource.
in: path in: path
@ -484,19 +484,30 @@ recorded_at:
in: body in: body
required: true required: true
type: string type: string
resource_id: measurement_resource_id:
description: | description: |
The UUID of the resource for which the The UUID of the resource for which the
measurements are taken. measurements are taken.
in: body in: body
required: true required: true
type: string type: string
resource_id_1: resource:
description: |
in: body
required: true
type: object
resource_id:
description: | description: |
The UUID of the resource. The UUID of the resource.
in: body in: body
required: true required: true
type: string type: string
resouces:
description: |
List of the resources.
in: body
required: true
type: array
resources:query:complex: resources:query:complex:
description: | description: |
If ``true``, the complex query capability for If ``true``, the complex query capability for

View File

@ -33,6 +33,7 @@ Response Parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- resources: resources
- user_id: user_id - user_id: user_id
- links: links - links: links
- resource_id: resource_id - resource_id: resource_id
@ -68,7 +69,7 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- resource_id: resource_id - resource_id: resource_id_path
Response Parameters Response Parameters
@ -76,6 +77,7 @@ Response Parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- resource: resource
- user_id: user_id - user_id: user_id
- links: links - links: links
- resource_id: resource_id - resource_id: resource_id
@ -91,5 +93,3 @@ Response Example
.. literalinclude:: ../samples/resource-show-response.json .. literalinclude:: ../samples/resource-show-response.json
:language: javascript :language: javascript