From 29ea6eb5fdf7534123f75f1e59817c7d00aab4ec Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 11 Mar 2018 13:05:18 +0100 Subject: Bypass APEX-570 to allow gating juju_epc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This temporarily fix aims at testing juju_epc vs a non default region name [1]. It must be removed as soon as APEX is fixed [2]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/lastFailedBuild/console [2] https://jira.opnfv.org/browse/APEX-570 Change-Id: I0724b694efb43709d43da6a30e11d1daafee47d8 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/vnf/epc/juju_epc.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py index 63de72175..0239e11d9 100644 --- a/functest/opnfv_tests/vnf/epc/juju_epc.py +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -23,6 +23,7 @@ import yaml from functest.core import vnf from functest.opnfv_tests.openstack.snaps import snaps_utils from functest.utils import config +from functest.utils import env from snaps.config.flavor import FlavorConfig from snaps.config.image import ImageConfig @@ -139,9 +140,16 @@ class JujuEpc(vnf.VnfOnBoarding): def _register_cloud(self): self.__logger.info("Creating Cloud for Abot-epc .....") clouds_yaml = os.path.join(self.res_dir, "clouds.yaml") + # It allows gating APEX and ensures this testcase is working till + # https://jira.opnfv.org/browse/APEX-570 is fixed in APEX. + # It must be removed as soon as possible to disable per installer + # processing in Functest. + region = self.snaps_creds.region_name + if not region and env.get('INSTALLER_TYPE') == 'apex': + region = "regionOne" cloud_data = { 'url': self.public_auth_url, - 'region': self.snaps_creds.region_name} + 'region': region} with open(clouds_yaml, 'w') as yfile: yfile.write(CLOUD_TEMPLATE.format(**cloud_data)) if os.system( -- cgit 1.2.3-korg