diff options
author | gordon chung <gord@live.ca> | 2015-09-08 15:00:42 -0400 |
---|---|---|
committer | gordon chung <gord@live.ca> | 2015-09-09 07:36:31 -0400 |
commit | daed7e59c383f1ca74d75160cbc99fbd89675648 (patch) | |
tree | d7a0cf89cefe0a7f0c7b4e45fce97e78c2310067 /ceilometerclient/v2/resources.py | |
parent | d40487643e2a069788e6f3218d946d86395a279e (diff) | |
download | python-ceilometerclient-1.5.0.tar.gz |
add limit support1.5.0
limit is now a mandatory condition when querying. this patch
allows users to control this value.
Change-Id: Ied5f80dc8cfe8b5f85e60fb8ca1d4a8f26663456
Closes-Bug: #1493511
Diffstat (limited to 'ceilometerclient/v2/resources.py')
-rw-r--r-- | ceilometerclient/v2/resources.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ceilometerclient/v2/resources.py b/ceilometerclient/v2/resources.py index aa80664..d516ee1 100644 --- a/ceilometerclient/v2/resources.py +++ b/ceilometerclient/v2/resources.py @@ -30,9 +30,11 @@ class Resource(base.Resource): class ResourceManager(base.Manager): resource_class = Resource - def list(self, q=None, links=None): + def list(self, q=None, links=None, limit=None): path = '/v2/resources' params = ['meter_links=%d' % (1 if links else 0)] + if limit: + params.append('limit=%s' % limit) return self._list(options.build_url(path, q, params)) def get(self, resource_id): |