aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py4
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py8
-rw-r--r--functest/opnfv_tests/vnf/ims/cloudify_ims.py3
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py3
4 files changed, 11 insertions, 7 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index d62f3daa0..88ad3b2d9 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -207,8 +207,8 @@ def configure_tempest_update_params(
# enable multinode tests
rconfig.set('compute', 'min_compute_nodes', compute_cnt)
rconfig.set('compute-feature-enabled', 'live_migration', True)
-
- rconfig.set('identity', 'region', os.environ.get('OS_REGION_NAME'))
+ if os.environ.get('OS_REGION_NAME'):
+ rconfig.set('identity', 'region', os.environ.get('OS_REGION_NAME'))
identity_api_version = os.environ.get("OS_IDENTITY_API_VERSION", '3')
if identity_api_version == '3':
auth_version = 'v3'
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index 12c6d2398..3f2a9ff93 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -149,7 +149,8 @@ class JujuEpc(vnf.VnfOnBoarding):
clouds_yaml = os.path.join(self.res_dir, "clouds.yaml")
cloud_data = {
'url': self.public_auth_url,
- 'region': self.snaps_creds.region_name}
+ 'region': self.snaps_creds.region_name if (
+ self.snaps_creds.region_name) else 'RegionOne'}
with open(clouds_yaml, 'w') as yfile:
yfile.write(CLOUD_TEMPLATE.format(**cloud_data))
cmd = ['juju', 'add-cloud', 'abot-epc', '-f', clouds_yaml, '--replace']
@@ -303,8 +304,9 @@ class JujuEpc(vnf.VnfOnBoarding):
image_file=image_file))
image_id = image_creator.create().id
cmd = ['juju', 'metadata', 'generate-image', '-d', '/root',
- '-i', image_id, '-s', image_name,
- '-r', self.snaps_creds.region_name,
+ '-i', image_id, '-s', image_name, '-r',
+ self.snaps_creds.region_name if (
+ self.snaps_creds.region_name) else 'RegionOne',
'-u', self.public_auth_url]
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
self.__logger.info("%s\n%s", " ".join(cmd), output)
diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
index 4ac79b55d..786c535ed 100644
--- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py
+++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py
@@ -250,7 +250,8 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase):
keystone_password=snaps_creds.password,
keystone_tenant_name=snaps_creds.project_name,
keystone_url=public_auth_url,
- region=snaps_creds.region_name,
+ region=snaps_creds.region_name if snaps_creds.region_name else (
+ 'RegionOne'),
user_domain_name=snaps_creds.user_domain_name,
project_domain_name=snaps_creds.project_domain_name)
self.__logger.info("Set creds for cloudify manager %s", cfy_creds)
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index a88200339..e56f23cfc 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -335,7 +335,8 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
self.vnf['inputs'].update(dict(
keystone_project_domain_name=snaps_creds.project_domain_name))
self.vnf['inputs'].update(dict(
- region=snaps_creds.region_name))
+ region=snaps_creds.region_name if snaps_creds.region_name else (
+ 'RegionOne')))
self.vnf['inputs'].update(dict(
keystone_url=keystone_utils.get_endpoint(
snaps_creds, 'identity')))