Fix formatting issue with v1 API parameters

Properly format the parameter declarations
for metadata query arguments.

Change-Id: Iaf2b02c69879b12f9eeee3272865146962eecfc9
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
Doug Hellmann 2013-02-04 09:48:45 -05:00
parent f85bbcedfa
commit 9c836e5011

View File

@ -122,7 +122,8 @@ def check_authorized_project(project):
@blueprint.route('/meters')
def list_meters_all():
"""Return a list of meters.
:param metadata.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: 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.<key> match on the metadata within the resource. (optional)
:param metadata.<key>: match on the metadata within the resource.
(optional)
"""
return _list_resources(
user=user,