Skip to content

Commit 780d9b4

Browse files
Alex KatzAlex Katz
authored andcommitted
Show correct name for resource with quota set to zero
In case quota for the resource is set to zero "openstack quota show" command will not map the resource name according to one of the following dicts: - COMPUTE_QUOTAS - NOVA_NETWORK_QUOTAS - VOLUME_QUOTAS - NETWORK_QUOTAS For example: $ openstack quota set --secgroups 10 admin $ openstack quota show admin -f json|egrep "(secgroups|security_groups)" "secgroups": 10, $ openstack quota set --secgroups 0 admin $ openstack quota show admin -f json|egrep "(secgroups|security_groups)" "security_groups": 0, Change-Id: I94ed9e6b41b1cc692297c01e6c7582998dcacfda
1 parent 5b3a827 commit 780d9b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openstackclient/common/quota.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def take_action(self, parsed_args):
650650
for k, v in itertools.chain(
651651
COMPUTE_QUOTAS.items(), NOVA_NETWORK_QUOTAS.items(),
652652
VOLUME_QUOTAS.items(), NETWORK_QUOTAS.items()):
653-
if not k == v and info.get(k):
653+
if not k == v and info.get(k) is not None:
654654
info[v] = info[k]
655655
info.pop(k)
656656

0 commit comments

Comments
 (0)