From 37c45c03c18452db0ce2e0967ae96c5ce9ed5234 Mon Sep 17 00:00:00 2001 From: Ha Van Tu Date: Mon, 19 Sep 2016 09:19:48 +0700 Subject: [PATCH] Refactor Ceilometer resource API This patch refactors Ceilometer resource API to make it be readable and maintainable. Change-Id: I93d9520ab2a3247c1877e568416efacecb49d888 --- api-ref/source/parameters.yaml | 17 ++++++++++++++--- api-ref/source/resources.inc | 6 +++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 5bfed7bfd7..c8f9383bd9 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -20,7 +20,7 @@ meter_name: in: path required: false type: string -resource_id_2: +resource_id_path: description: | The UUID of the resource. in: path @@ -484,19 +484,30 @@ recorded_at: in: body required: true type: string -resource_id: +measurement_resource_id: description: | The UUID of the resource for which the measurements are taken. in: body required: true type: string -resource_id_1: +resource: + description: | + in: body + required: true + type: object +resource_id: description: | The UUID of the resource. in: body required: true type: string +resouces: + description: | + List of the resources. + in: body + required: true + type: array resources:query:complex: description: | If ``true``, the complex query capability for diff --git a/api-ref/source/resources.inc b/api-ref/source/resources.inc index 6dc981ceb2..735f16fb3c 100644 --- a/api-ref/source/resources.inc +++ b/api-ref/source/resources.inc @@ -33,6 +33,7 @@ Response Parameters .. rest_parameters:: parameters.yaml + - resources: resources - user_id: user_id - links: links - resource_id: resource_id @@ -68,7 +69,7 @@ Request .. rest_parameters:: parameters.yaml - - resource_id: resource_id + - resource_id: resource_id_path Response Parameters @@ -76,6 +77,7 @@ Response Parameters .. rest_parameters:: parameters.yaml + - resource: resource - user_id: user_id - links: links - resource_id: resource_id @@ -91,5 +93,3 @@ Response Example .. literalinclude:: ../samples/resource-show-response.json :language: javascript - -