aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-02-21 19:15:47 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-21 19:15:47 +0000
commit47c008e07f16b9a2d281707c50514f2f1237ce19 (patch)
treeabcb2d4f2a8688ddfa110f5e44f99c73bccb17ad
parent3becae261a56ead94c400db618d801e4337ce4a8 (diff)
parentb37d3c78b2b7f1822dc6784c2ee5860d6bea6a5e (diff)
Merge "Leverage of snaps creds to get the right region name"
-rw-r--r--functest/opnfv_tests/vnf/epc/juju_epc.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py
index dc92bc920..7d7194cdb 100644
--- a/functest/opnfv_tests/vnf/epc/juju_epc.py
+++ b/functest/opnfv_tests/vnf/epc/juju_epc.py
@@ -79,8 +79,6 @@ class JujuEpc(vnf.VnfOnBoarding):
__logger = logging.getLogger(__name__)
- default_region_name = "RegionOne"
-
def __init__(self, **kwargs):
if "case_name" not in kwargs:
kwargs["case_name"] = "juju_epc"
@@ -142,8 +140,7 @@ class JujuEpc(vnf.VnfOnBoarding):
clouds_yaml = os.path.join(self.res_dir, "clouds.yaml")
cloud_data = {
'url': self.public_auth_url,
- 'region': os.environ.get(
- "OS_REGION_NAME", self.default_region_name)}
+ 'region': self.snaps_creds.region_name}
with open(clouds_yaml, 'w') as yfile:
yfile.write(CLOUD_TEMPLATE.format(**cloud_data))
if os.system(
@@ -278,9 +275,7 @@ class JujuEpc(vnf.VnfOnBoarding):
os.system(
'juju metadata generate-image -d ~ -i {} -s {} -r '
'{} -u {}'.format(
- image_id, image_name,
- os.environ.get(
- "OS_REGION_NAME", self.default_region_name),
+ image_id, image_name, self.snaps_creds.region_name,
self.public_auth_url))
self.created_object.append(image_creator)
self.__logger.info("Network ID : %s", net_id)