From 77214c56e78dff60cdaf8fa2a446fd9658261cbf Mon Sep 17 00:00:00 2001 From: jiaxi Date: Fri, 17 Jul 2015 23:29:50 -0400 Subject: Fix quota set failed problem When using the command: openstack quota set, the compute quota below can't be set successfully,the value of compute quota stay unchanged, 'fixed-ips', 'floating-ips', 'injected-files', 'key-pairs'. What's more,I add a TODO comment in the code for two reason. 1. volume quota set works fine for the moment. 2. To indicate that this issue about volume needs discuss and report another bug, if it's confirmed. This bug is only about compute quota. Change-Id: Ic1028d561f5a0030cf65ac18fc117bf01e945478 Partial-Bug: #1420104 --- openstackclient/common/quota.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'openstackclient/common') diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index a40f6e4d..be6c36eb 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -97,12 +97,13 @@ class SetQuota(command.Command): compute_kwargs = {} for k, v in COMPUTE_QUOTAS.items(): - value = getattr(parsed_args, v, None) + value = getattr(parsed_args, k, None) if value is not None: compute_kwargs[k] = value volume_kwargs = {} for k, v in VOLUME_QUOTAS.items(): + # TODO(jiaxi): Should use k or v needs discuss value = getattr(parsed_args, v, None) if value is not None: if parsed_args.volume_type: -- cgit v1.2.1