Update set of region identity attribut 77/50677/1
authorSamuel Bartel <samuel.bartel@orange.com>
Tue, 16 Jan 2018 09:12:16 +0000 (10:12 +0100)
committerSamuel Bartel <samuel.bartel@orange.com>
Tue, 16 Jan 2018 09:27:25 +0000 (10:27 +0100)
Use OS_REGION_NAME environment variable if defined

Change-Id: Ifcdfc468fa4931ab62ac0f3ead103e15af7c0de6
Signed-off-by: Samuel Bartel <samuel.bartel@orange.com>
functest/opnfv_tests/openstack/tempest/conf_utils.py
functest/utils/env.py

index 03e9631..e61ab81 100644 (file)
@@ -272,7 +272,8 @@ def configure_tempest_update_params(tempest_conf_file, image_id=None,
         config.set('compute', 'min_compute_nodes', compute_cnt)
         config.set('compute-feature-enabled', 'live_migration', True)
 
-    config.set('identity', 'region', 'RegionOne')
+    config.set('identity', 'region',
+               CONST.__getattribute__('OS_REGION_NAME'))
     identity_api_version = os.getenv(
         "OS_IDENTITY_API_VERSION", os.getenv("IDENTITY_API_VERSION"))
     if (identity_api_version == '3'):
index d7b396e..f095250 100644 (file)
@@ -19,7 +19,8 @@ default_envs = {
     'OS_AUTH_URL': None,
     'CONFIG_FUNCTEST_YAML': pkg_resources.resource_filename(
         'functest', 'ci/config_functest.yaml'),
-    'OS_INSECURE': ''
+    'OS_INSECURE': '',
+    'OS_REGION_NAME': 'RegionOne'
 }