Quotaset update does not return result
This patch adds the updated quota values to the output shell Closes-Bug: #1316474 Change-Id: I95bbefa5fdee316a3a3ba77a5b3067345da3344f
This commit is contained in:
parent
b4acbd2586
commit
02b32c8aed
@ -26,7 +26,7 @@ class QuotaSet(base.Resource):
|
|||||||
return self.tenant_id
|
return self.tenant_id
|
||||||
|
|
||||||
def update(self, *args, **kwargs):
|
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):
|
class QuotaSetManager(base.Manager):
|
||||||
@ -44,7 +44,8 @@ class QuotaSetManager(base.Manager):
|
|||||||
for update in updates:
|
for update in updates:
|
||||||
body['quota_set'][update] = updates[update]
|
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):
|
def defaults(self, tenant_id):
|
||||||
return self._get('/os-quota-sets/%s/defaults' % tenant_id,
|
return self._get('/os-quota-sets/%s/defaults' % tenant_id,
|
||||||
|
@ -696,7 +696,7 @@ def _quota_update(manager, identifier, args):
|
|||||||
updates[resource] = val
|
updates[resource] = val
|
||||||
|
|
||||||
if updates:
|
if updates:
|
||||||
manager.update(identifier, **updates)
|
_quota_show(manager.update(identifier, **updates))
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('tenant', metavar='<tenant_id>',
|
@utils.arg('tenant', metavar='<tenant_id>',
|
||||||
|
@ -24,7 +24,7 @@ class QuotaSet(base.Resource):
|
|||||||
return self.tenant_id
|
return self.tenant_id
|
||||||
|
|
||||||
def update(self, *args, **kwargs):
|
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):
|
class QuotaSetManager(base.Manager):
|
||||||
@ -42,7 +42,8 @@ class QuotaSetManager(base.Manager):
|
|||||||
for update in updates:
|
for update in updates:
|
||||||
body['quota_set'][update] = updates[update]
|
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):
|
def defaults(self, tenant_id):
|
||||||
return self._get('/os-quota-sets/%s/defaults' % tenant_id,
|
return self._get('/os-quota-sets/%s/defaults' % tenant_id,
|
||||||
|
@ -754,7 +754,7 @@ def _quota_update(manager, identifier, args):
|
|||||||
updates[resource] = val
|
updates[resource] = val
|
||||||
|
|
||||||
if updates:
|
if updates:
|
||||||
manager.update(identifier, **updates)
|
_quota_show(manager.update(identifier, **updates))
|
||||||
|
|
||||||
|
|
||||||
@utils.arg('tenant',
|
@utils.arg('tenant',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user