aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/epc/juju_epc.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/vnf/epc/juju_epc.py')
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py8
1 files changed, 5 insertions, 3 deletions
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)