From 9c836e501120c2a481741206b85ace2cdea1f476 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 4 Feb 2013 09:48:45 -0500 Subject: [PATCH] Fix formatting issue with v1 API parameters Properly format the parameter declarations for metadata query arguments. Change-Id: Iaf2b02c69879b12f9eeee3272865146962eecfc9 Signed-off-by: Doug Hellmann --- ceilometer/api/v1/blueprint.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ceilometer/api/v1/blueprint.py b/ceilometer/api/v1/blueprint.py index b87cc7d4e..2d424b4ee 100644 --- a/ceilometer/api/v1/blueprint.py +++ b/ceilometer/api/v1/blueprint.py @@ -122,7 +122,8 @@ def check_authorized_project(project): @blueprint.route('/meters') def list_meters_all(): """Return a list of meters. - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ rq = flask.request meters = rq.storage_conn.get_meters( @@ -136,7 +137,8 @@ def list_meters_by_resource(resource): """Return a list of meters by resource. :param resource: The ID of the resource. - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ rq = flask.request meters = rq.storage_conn.get_meters( @@ -151,7 +153,8 @@ def list_meters_by_user(user): """Return a list of meters by user. :param user: The ID of the owning user. - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ rq = flask.request meters = rq.storage_conn.get_meters( @@ -166,7 +169,8 @@ def list_meters_by_project(project): """Return a list of meters by project. :param project: The ID of the owning project. - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ check_authorized_project(project) @@ -182,7 +186,8 @@ def list_meters_by_source(source): """Return a list of meters by source. :param source: The ID of the owning source. - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ rq = flask.request meters = rq.storage_conn.get_meters( @@ -221,7 +226,8 @@ def list_resources_by_project(project): :param end_timestamp: Limits resources by last update time < this value. (optional) :type end_timestamp: ISO date in UTC - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ check_authorized_project(project) return _list_resources(project=project) @@ -237,7 +243,8 @@ def list_all_resources(): :param end_timestamp: Limits resources by last update time < this value. (optional) :type end_timestamp: ISO date in UTC - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ return _list_resources( project=acl.get_limited_to_project(flask.request.headers)) @@ -264,7 +271,8 @@ def list_resources_by_source(source): :param end_timestamp: Limits resources by last update time < this value. (optional) :type end_timestamp: ISO date in UTC - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ return _list_resources( source=source, @@ -283,7 +291,8 @@ def list_resources_by_user(user): :param end_timestamp: Limits resources by last update time < this value. (optional) :type end_timestamp: ISO date in UTC - :param metadata. match on the metadata within the resource. (optional) + :param metadata.: match on the metadata within the resource. + (optional) """ return _list_resources( user=user,