diff options
author | Mikhail Lelyakin <mlelyakin@mirantis.com> | 2016-07-08 16:48:06 +0300 |
---|---|---|
committer | Mikhail Lelyakin <mlelyakin@mirantis.com> | 2016-07-28 13:03:23 +0300 |
commit | 75c8db6d23f383f40b7b4ac3df28f683bcaaf68c (patch) | |
tree | 8ad9ea28e4fdbd73271566781686f086356114fd /saharaclient/api/cluster_templates.py | |
parent | 5cf912636b3e55facb924f8ecb8ec871d1be557a (diff) | |
download | python-saharaclient-75c8db6d23f383f40b7b4ac3df28f683bcaaf68c.tar.gz |
Add pagination ability to Python-saharaclient
Now we are working on pagination ability in Sahara API.
This changes support work with new abilities.
Change-Id: Idf96a82b0f49bd288eb3fd9bfa82f92074ea4e7c
bp: pagination
Depends-on: I50fa225361617e835c314e873035704b9fe811d0
Diffstat (limited to 'saharaclient/api/cluster_templates.py')
-rw-r--r-- | saharaclient/api/cluster_templates.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/saharaclient/api/cluster_templates.py b/saharaclient/api/cluster_templates.py index 04c2585..395b3e0 100644 --- a/saharaclient/api/cluster_templates.py +++ b/saharaclient/api/cluster_templates.py @@ -77,10 +77,11 @@ class ClusterTemplateManager(base.ResourceManager): return self._update('/cluster-templates/%s' % cluster_template_id, data, 'cluster_template') - def list(self, search_opts=None): + def list(self, search_opts=None, marker=None, limit=None): """Get list of Cluster Templates.""" - query = base.get_query_string(search_opts) - return self._list('/cluster-templates%s' % query, 'cluster_templates') + query = base.get_query_string(search_opts, marker=marker, limit=limit) + url = "/cluster-templates%s" % query + return self._page(url, 'cluster_templates', limit) def get(self, cluster_template_id): """Get information about a Cluster Template.""" |