diff --git a/cinderclient/v1/quotas.py b/cinderclient/v1/quotas.py index 800a70aac..7453cb7fe 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 4526a4e78..bdad700da 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='', diff --git a/cinderclient/v2/quotas.py b/cinderclient/v2/quotas.py index fcb87dd06..fbc691450 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 2405dd5b1..cf7e1238d 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',