From c23721080476809736e12f4064c636c1ed9482e1 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 31 Aug 2012 12:05:55 -0400 Subject: [PATCH] Add timestamp parameters to the API docs List the optional timestamp parameters to the API endpoints so they show up in the documentation. Change-Id: I6717dc91d1257ef6c738d8a407b88e31f5b78a2a Signed-off-by: Doug Hellmann --- ceilometer/api/v1.py | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/ceilometer/api/v1.py b/ceilometer/api/v1.py index 5393687c..e8a3e3f0 100644 --- a/ceilometer/api/v1.py +++ b/ceilometer/api/v1.py @@ -107,6 +107,12 @@ def list_resources_by_project(project): """Return a list of resources owned by the project. :param project: The ID of the owning project. + :param start_timestamp: Limits resources by last update time >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits resources by last update time < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_resources( project=project, @@ -118,6 +124,13 @@ def list_resources_by_project(project): @blueprint.route('/resources') def list_all_resources(): """Return a list of all known resources. + + :param start_timestamp: Limits resources by last update time >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits resources by last update time < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_resources() @@ -128,6 +141,12 @@ def list_resources_by_source(source): data. :param source: The ID of the reporting source. + :param start_timestamp: Limits resources by last update time >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits resources by last update time < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_resources(source=source) @@ -137,6 +156,12 @@ def list_resources_by_user(user): """Return a list of resources owned by the user. :param user: The ID of the owning user. + :param start_timestamp: Limits resources by last update time >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits resources by last update time < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_resources(user=user) @@ -222,6 +247,12 @@ def list_events_by_project(project, meter): :param project: The ID of the project. :param meter: The name of the meter. + :param start_timestamp: Limits events by timestamp >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits events by timestamp < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_events(project=project, meter=meter, @@ -234,6 +265,12 @@ def list_events_by_resource(resource, meter): :param resource: The ID of the resource. :param meter: The name of the meter. + :param start_timestamp: Limits events by timestamp >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits events by timestamp < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_events(resource=resource, meter=meter, @@ -246,6 +283,12 @@ def list_events_by_source(source, meter): :param source: The ID of the reporting source. :param meter: The name of the meter. + :param start_timestamp: Limits events by timestamp >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits events by timestamp < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_events(source=source, meter=meter, @@ -258,6 +301,12 @@ def list_events_by_user(user, meter): :param user: The ID of the user. :param meter: The name of the meter. + :param start_timestamp: Limits events by timestamp >= this value. + (optional) + :type start_timestamp: ISO date in UTC + :param end_timestamp: Limits events by timestamp < this value. + (optional) + :type end_timestamp: ISO date in UTC """ return _list_events(user=user, meter=meter,