From 932e23880ad613098ba518dc1fbf84e65db434a9 Mon Sep 17 00:00:00 2001 From: boucherv Date: Wed, 27 Jul 2016 14:57:58 +0200 Subject: 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 --- testcases/OpenStack/tempest/run_tempest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testcases/OpenStack/tempest') 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) -- cgit 1.2.3-korg