Skip to content

Commit 024bd3b

Browse files
reedipDean Troyer
authored andcommitted
Fix quota show output
Currently Quota Show expects dictionary to be returned for Network client, similar to Volume and Compute clients, but Network Object is being returned, causing the "openstack quota show" to fail. This patch takes care of this issue. Depends-On: Ie0e045ff4888615d68804fd739d5b995ca11e9a1 Change-Id: Ic507997cba09fcfa84dd1151d6922f56a7c5187b Closes-Bug:#1655537
1 parent c8c29e8 commit 024bd3b

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

openstackclient/common/quota.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ def take_action(self, parsed_args):
273273
volume_quota_info = self.get_compute_volume_quota(volume_client,
274274
parsed_args)
275275
network_quota_info = self.get_network_quota(parsed_args)
276+
# NOTE(reedip): Remove the below check once requirement for
277+
# Openstack SDK is fixed to version 0.9.12 and above
278+
if type(network_quota_info) is not dict:
279+
network_quota_info = network_quota_info.to_dict()
276280

277281
info = {}
278282
info.update(compute_quota_info)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed a ``'Quota' object is not iterable`` error in the ``quota show`` command
5+
that appeared with the initial release of openstacksdk v0.9.11 and v0.9.12.
6+
[Bug `1655537 <https://bugs.launchpad.net/bugs/1655537>`_]

0 commit comments

Comments
 (0)