diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2017-04-26 17:02:12 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2017-04-26 23:52:34 +0000 |
| commit | 871450abcd89f9bb5ee9f75cdef3b812695eae93 (patch) | |
| tree | 3a5b436e301e16f6e99037d6ee7da1ef3eb5bfc0 /openstackclient/common | |
| parent | 0a0bcbbda2c7384f6308bb8041119d6c38915e2f (diff) | |
| download | python-openstackclient-871450abcd89f9bb5ee9f75cdef3b812695eae93.tar.gz | |
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
Diffstat (limited to 'openstackclient/common')
| -rw-r--r-- | openstackclient/common/quota.py | 7 |
1 files changed, 5 insertions, 2 deletions
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) |
