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
This commit is contained in:
Reedip 2017-01-11 12:34:48 -05:00 committed by Dean Troyer
parent c8c29e8c2e
commit 024bd3bd66
2 changed files with 10 additions and 0 deletions

View File

@ -273,6 +273,10 @@ class ShowQuota(command.ShowOne):
volume_quota_info = self.get_compute_volume_quota(volume_client, volume_quota_info = self.get_compute_volume_quota(volume_client,
parsed_args) parsed_args)
network_quota_info = self.get_network_quota(parsed_args) network_quota_info = self.get_network_quota(parsed_args)
# NOTE(reedip): Remove the below check once requirement for
# Openstack SDK is fixed to version 0.9.12 and above
if type(network_quota_info) is not dict:
network_quota_info = network_quota_info.to_dict()
info = {} info = {}
info.update(compute_quota_info) info.update(compute_quota_info)

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a ``'Quota' object is not iterable`` error in the ``quota show`` command
that appeared with the initial release of openstacksdk v0.9.11 and v0.9.12.
[Bug `1655537 <https://bugs.launchpad.net/bugs/1655537>`_]