summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2016-07-27 14:57:58 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-07-28 08:40:29 +0000
commit932e23880ad613098ba518dc1fbf84e65db434a9 (patch)
tree58f5c2a998a2044da4496dacd0bcc15a5081c7b0 /testcases/OpenStack
parent1a45b9e69357bfd6228cd862d48d709101fd40da (diff)
Add endpoint type support on functest
By default public endpoint was used but now you can use internal or admin JIRA: FUNCTEST-387 Change-Id: If1adaa88248d379ad6d74b20f2dffd76278b67b9 Signed-off-by: boucherv <valentin.boucher@orange.com>
Diffstat (limited to 'testcases/OpenStack')
-rwxr-xr-xtestcases/OpenStack/tempest/run_tempest.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py
index 8ca3bdb3f..f99678df4 100755
--- a/testcases/OpenStack/tempest/run_tempest.py
+++ b/testcases/OpenStack/tempest/run_tempest.py
@@ -193,6 +193,17 @@ def configure_tempest(deployment_dir):
config.set('identity', 'tenant_name', TENANT_NAME)
config.set('identity', 'username', USER_NAME)
config.set('identity', 'password', USER_PASSWORD)
+
+ if os.getenv('OS_ENDPOINT_TYPE') is not None:
+ services_list = ['compute', 'volume', 'image', 'network',
+ 'data-processing', 'object-storage', 'orchestration']
+ sections = config.sections()
+ for service in services_list:
+ if service not in sections:
+ config.add_section(service)
+ config.set(service, 'endpoint_type',
+ os.environ.get("OS_ENDPOINT_TYPE"))
+
with open(tempest_conf_file, 'wb') as config_file:
config.write(config_file)