summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Manuel Olle <juan.m.olle@intel.com>2014-05-14 11:11:08 -0300
committerJuan Manuel Olle <juan.m.olle@intel.com>2014-07-29 17:56:07 +0000
commit02b32c8aedb37b72cd5ece2ea2609df8aafb3eff (patch)
tree286b586a0fdcb617de6157f741652a77a4dfc217
parentb4acbd2586a2b6f43ac51779e4f958862753d2ed (diff)
downloadpython-cinderclient-02b32c8aedb37b72cd5ece2ea2609df8aafb3eff.tar.gz
Quotaset update does not return result
This patch adds the updated quota values to the output shell Closes-Bug: #1316474 Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
-rw-r--r--cinderclient/v1/quotas.py5
-rw-r--r--cinderclient/v1/shell.py2
-rw-r--r--cinderclient/v2/quotas.py5
-rw-r--r--cinderclient/v2/shell.py2
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 47e0a57..0e96a88 100644
--- a/cinderclient/v1/shell.py
+++ b/cinderclient/v1/shell.py
@@ -696,7 +696,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 10b7631..76a0803 100644
--- a/cinderclient/v2/shell.py
+++ b/cinderclient/v2/shell.py
@@ -754,7 +754,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',