diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-08 20:26:05 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-08 20:26:05 +0000 |
commit | 42d13be346b3ce5ca6f49b0de602af78c624dba9 (patch) | |
tree | 007998a3ef712014517db3e1d72ecc5b66214943 | |
parent | 4162c9ff5c68ff3078137f47cceb070e66f8ebf6 (diff) | |
parent | 02b32c8aedb37b72cd5ece2ea2609df8aafb3eff (diff) | |
download | python-cinderclient-42d13be346b3ce5ca6f49b0de602af78c624dba9.tar.gz |
Merge "Quotaset update does not return result"
-rw-r--r-- | cinderclient/v1/quotas.py | 5 | ||||
-rw-r--r-- | cinderclient/v1/shell.py | 2 | ||||
-rw-r--r-- | cinderclient/v2/quotas.py | 5 | ||||
-rw-r--r-- | cinderclient/v2/shell.py | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/cinderclient/v1/quotas.py b/cinderclient/v1/quotas.py index 800a70a..7453cb7 100644 --- a/cinderclient/v1/quotas.py +++ b/cinderclient/v1/quotas.py @@ -26,7 +26,7 @@ class QuotaSet(base.Resource): return self.tenant_id def update(self, *args, **kwargs): - self.manager.update(self.tenant_id, *args, **kwargs) + return self.manager.update(self.tenant_id, *args, **kwargs) class QuotaSetManager(base.Manager): @@ -44,7 +44,8 @@ class QuotaSetManager(base.Manager): for update in updates: body['quota_set'][update] = updates[update] - self._update('/os-quota-sets/%s' % (tenant_id), body) + result = self._update('/os-quota-sets/%s' % (tenant_id), body) + return self.resource_class(self, result['quota_set'], loaded=True) def defaults(self, tenant_id): return self._get('/os-quota-sets/%s/defaults' % tenant_id, diff --git a/cinderclient/v1/shell.py b/cinderclient/v1/shell.py index 4526a4e..bdad700 100644 --- a/cinderclient/v1/shell.py +++ b/cinderclient/v1/shell.py @@ -693,7 +693,7 @@ def _quota_update(manager, identifier, args): updates[resource] = val if updates: - manager.update(identifier, **updates) + _quota_show(manager.update(identifier, **updates)) @utils.arg('tenant', metavar='<tenant_id>', diff --git a/cinderclient/v2/quotas.py b/cinderclient/v2/quotas.py index fcb87dd..fbc6914 100644 --- a/cinderclient/v2/quotas.py +++ b/cinderclient/v2/quotas.py @@ -24,7 +24,7 @@ class QuotaSet(base.Resource): return self.tenant_id def update(self, *args, **kwargs): - self.manager.update(self.tenant_id, *args, **kwargs) + return self.manager.update(self.tenant_id, *args, **kwargs) class QuotaSetManager(base.Manager): @@ -42,7 +42,8 @@ class QuotaSetManager(base.Manager): for update in updates: body['quota_set'][update] = updates[update] - self._update('/os-quota-sets/%s' % (tenant_id), body) + result = self._update('/os-quota-sets/%s' % (tenant_id), body) + return self.resource_class(self, result['quota_set'], loaded=True) def defaults(self, tenant_id): return self._get('/os-quota-sets/%s/defaults' % tenant_id, diff --git a/cinderclient/v2/shell.py b/cinderclient/v2/shell.py index 2405dd5..cf7e123 100644 --- a/cinderclient/v2/shell.py +++ b/cinderclient/v2/shell.py @@ -780,7 +780,7 @@ def _quota_update(manager, identifier, args): updates[resource] = val if updates: - manager.update(identifier, **updates) + _quota_show(manager.update(identifier, **updates)) @utils.arg('tenant', |