diff options
author | boucherv <valentin.boucher@orange.com> | 2016-07-27 14:57:58 +0200 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-07-28 08:40:29 +0000 |
commit | 932e23880ad613098ba518dc1fbf84e65db434a9 (patch) | |
tree | 58f5c2a998a2044da4496dacd0bcc15a5081c7b0 /testcases/OpenStack | |
parent | 1a45b9e69357bfd6228cd862d48d709101fd40da (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-x | testcases/OpenStack/tempest/run_tempest.py | 11 |
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) |