summaryrefslogtreecommitdiff
path: root/openstackclient/common
diff options
context:
space:
mode:
authorReedip <reedip14@gmail.com>2017-01-11 12:34:48 -0500
committerDean Troyer <dtroyer@gmail.com>2017-01-12 22:10:32 +0000
commit024bd3bd660490e458456c28674dcd0ad4ee13c8 (patch)
treed3d37b5486db4839aa9ac151def3c9b118569ebd /openstackclient/common
parentc8c29e8c2e4644b066cc2cb7e86b36664c4e094c (diff)
downloadpython-openstackclient-024bd3bd660490e458456c28674dcd0ad4ee13c8.tar.gz
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
Diffstat (limited to 'openstackclient/common')
-rw-r--r--openstackclient/common/quota.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py
index 58368c56..afc6195f 100644
--- a/openstackclient/common/quota.py
+++ b/openstackclient/common/quota.py
@@ -273,6 +273,10 @@ class ShowQuota(command.ShowOne):
volume_quota_info = self.get_compute_volume_quota(volume_client,
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.update(compute_quota_info)