summaryrefslogtreecommitdiff
path: root/openstackclient/tests/test_shell.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-03 02:48:47 +0000
committerGerrit Code Review <review@openstack.org>2015-07-03 02:48:47 +0000
commitee64c2fa6b9eb6f8d628e8899df39a4ee01c2bb3 (patch)
tree57e047252b843c67eef60fa4a1a8358dbac9f173 /openstackclient/tests/test_shell.py
parentd80deaba41d09534a3f5a670957b4b0d035509b6 (diff)
parent5521e4c504c6a3a06f17a9e4f80444743aa293c7 (diff)
downloadpython-openstackclient-ee64c2fa6b9eb6f8d628e8899df39a4ee01c2bb3.tar.gz
Merge "Add --os-endpoint-type cli optional argument"
Diffstat (limited to 'openstackclient/tests/test_shell.py')
-rw-r--r--openstackclient/tests/test_shell.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/openstackclient/tests/test_shell.py b/openstackclient/tests/test_shell.py
index b080ae91..674d8345 100644
--- a/openstackclient/tests/test_shell.py
+++ b/openstackclient/tests/test_shell.py
@@ -38,6 +38,7 @@ DEFAULT_REGION_NAME = "ZZ9_Plural_Z_Alpha"
DEFAULT_TOKEN = "token"
DEFAULT_SERVICE_URL = "http://127.0.0.1:8771/v3.0/"
DEFAULT_AUTH_PLUGIN = "v2password"
+DEFAULT_ENDPOINT_TYPE = "internal"
DEFAULT_COMPUTE_API_VERSION = "2"
DEFAULT_IDENTITY_API_VERSION = "2"
@@ -61,6 +62,7 @@ CLOUD_1 = {
},
'region_name': 'occ-cloud',
'donut': 'glazed',
+ 'endpoint_type': 'public',
}
}
}
@@ -104,6 +106,7 @@ global_options = {
'--os-default-domain': (DEFAULT_DOMAIN_NAME, True, True),
'--os-cacert': ('/dev/null', True, True),
'--timing': (True, True, False),
+ '--os-endpoint-type': (DEFAULT_ENDPOINT_TYPE, True, True)
}
auth_options = {
@@ -123,6 +126,7 @@ auth_options = {
'--os-auth-type': ("v2password", True, True),
'--os-token': (DEFAULT_TOKEN, True, True),
'--os-url': (DEFAULT_SERVICE_URL, True, True),
+ '--os-endpoint-type': (DEFAULT_ENDPOINT_TYPE, True, True),
}
@@ -608,6 +612,10 @@ class TestShellCli(TestShell):
'glazed',
_shell.cloud.config['donut'],
)
+ self.assertEqual(
+ 'public',
+ _shell.cloud.config['endpoint_type'],
+ )
@mock.patch("os_client_config.config.OpenStackConfig._load_vendor_file")
@mock.patch("os_client_config.config.OpenStackConfig._load_config_file")