From 871450abcd89f9bb5ee9f75cdef3b812695eae93 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 26 Apr 2017 17:02:12 -0500 Subject: Fix quota functional tests for nova-net We need to skip some functional tests when testing against a nova-net cloud so add the bits to detect that. Also JSON-ify the quota functional tests and add the skips for nova-net. Change-Id: Ibfeeb3f967f34c98e80271a8214cf95dc50407f1 --- openstackclient/common/quota.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openstackclient/common') diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index ec4c8b51..73dfd909 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -299,7 +299,6 @@ class SetQuota(command.Command): identity_client = self.app.client_manager.identity compute_client = self.app.client_manager.compute volume_client = self.app.client_manager.volume - network_client = self.app.client_manager.network compute_kwargs = {} for k, v in COMPUTE_QUOTAS.items(): value = getattr(parsed_args, k, None) @@ -352,7 +351,11 @@ class SetQuota(command.Command): volume_client.quotas.update( project, **volume_kwargs) - if network_kwargs: + if ( + network_kwargs and + self.app.client_manager.is_network_endpoint_enabled() + ): + network_client = self.app.client_manager.network network_client.update_quota( project, **network_kwargs) -- cgit v1.2.1