summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/base.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2019-07-26 16:41:04 -0500
committerDean Troyer <dtroyer@gmail.com>2019-08-01 14:53:02 -0500
commit865e182970c9ce42d5be07cd3b81fb5dd1a3e656 (patch)
tree7465ddd3b1837d8e597c20033f2be478a56d9bc4 /openstackclient/tests/functional/base.py
parentc4743199096e77bdc89423dc37f632ac24acdba1 (diff)
downloadpython-openstackclient-865e182970c9ce42d5be07cd3b81fb5dd1a3e656.tar.gz
Make configuration show not require auth
The configuration show should not require auth to just display the OSC config object. Changes to make it not require auth have knock-on effects of needing to change a bunch of tests that use it assuming it _does_ require auth so change those to use 'extension list' instead. This sets up further testing of the command line options for changes in behaviour when we switch to straight SDK usage for configuration. Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
Diffstat (limited to 'openstackclient/tests/functional/base.py')
-rw-r--r--openstackclient/tests/functional/base.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/openstackclient/tests/functional/base.py b/openstackclient/tests/functional/base.py
index 1414e6bb..c34ca393 100644
--- a/openstackclient/tests/functional/base.py
+++ b/openstackclient/tests/functional/base.py
@@ -45,9 +45,17 @@ class TestCase(testtools.TestCase):
@classmethod
def openstack(cls, cmd, cloud=ADMIN_CLOUD, fail_ok=False):
"""Executes openstackclient command for the given action."""
- return execute(
- 'openstack --os-cloud={cloud} '.format(cloud=cloud) +
- cmd, fail_ok=fail_ok)
+ if cloud is not None:
+ return execute(
+ 'openstack --os-cloud={cloud} '.format(cloud=cloud) + cmd,
+ fail_ok=fail_ok
+ )
+ else:
+ # Execute command with no auth
+ return execute(
+ 'openstack --os-auth-type none ' + cmd,
+ fail_ok=fail_ok
+ )
@classmethod
def is_service_enabled(cls, service):