diff options
author | Nikita Konovalov <nkonovalov@mirantis.com> | 2015-02-26 16:08:04 +0300 |
---|---|---|
committer | Nikita Konovalov <nkonovalov@mirantis.com> | 2015-03-20 12:36:06 +0300 |
commit | f7f1e22d6852e2674e4739249ddccd1a9ccfad79 (patch) | |
tree | faf996e48f26592169a6686176d287acb690f8ee /saharaclient/api/clusters.py | |
parent | 319ceb6acf55382218dcd971367613aecb3e4afc (diff) | |
download | python-saharaclient-f7f1e22d6852e2674e4739249ddccd1a9ccfad79.tar.gz |
Add support for show_events parameter
Cluster get operation now supports show_events flag to display provision
progress.
Removed events endpoint as it is going to be removed from the API.
Partially implements bp: event-log
Change-Id: I6892c8be2f8daaa215732f5e58524620cb9a1f85
Diffstat (limited to 'saharaclient/api/clusters.py')
-rw-r--r-- | saharaclient/api/clusters.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/saharaclient/api/clusters.py b/saharaclient/api/clusters.py index 4130a21..20af3e4 100644 --- a/saharaclient/api/clusters.py +++ b/saharaclient/api/clusters.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from six.moves.urllib import parse + from saharaclient.api import base @@ -55,8 +57,12 @@ class ClusterManager(base.ResourceManager): query = base.get_query_string(search_opts) return self._list('/clusters%s' % query, 'clusters') - def get(self, cluster_id): - return self._get('/clusters/%s' % cluster_id, 'cluster') + def get(self, cluster_id, show_progress=False): + url = ('/clusters/%(cluster_id)s?%(params)s' % + {"cluster_id": cluster_id, + "params": parse.urlencode({"show_progress": show_progress})}) + + return self._get(url, 'cluster') def delete(self, cluster_id): self._delete('/clusters/%s' % cluster_id) |