diff options
author | soumaya <soumaya.nayek@rebaca.com> | 2017-12-12 19:10:40 +0530 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-12-13 20:29:33 +0100 |
commit | f4643b5dfa0b647b8d496bfdde8fb30a746dd83e (patch) | |
tree | c46de08ef55f2c36d0771a8b6b0ffea7c75f75a2 /functest/opnfv_tests/vnf/epc/juju_epc.py | |
parent | 00315cbac45bdffe0cfd3174a4b0871ccb610b97 (diff) |
Change the name of flavor and disabled ssh-hostname verification.
Change-Id: Ia801e8a37288606a325b5dd010ab9f6acbfdadf4
Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/epc/juju_epc.py')
-rw-r--r-- | functest/opnfv_tests/vnf/epc/juju_epc.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/functest/opnfv_tests/vnf/epc/juju_epc.py b/functest/opnfv_tests/vnf/epc/juju_epc.py index 8e2bca22..d9c14219 100644 --- a/functest/opnfv_tests/vnf/epc/juju_epc.py +++ b/functest/opnfv_tests/vnf/epc/juju_epc.py @@ -150,6 +150,11 @@ class JujuEpc(vnf.VnfOnBoarding): self.created_object.append(image_creator) def deploy_orchestrator(self): + """ + Create network, subnet, router + + Bootstrap juju + """ self.__logger.info("Deployed Orchestrator") private_net_name = CONST.__getattribute__( 'vnf_{}_private_net_name'.format(self.case_name)) @@ -224,6 +229,7 @@ class JujuEpc(vnf.VnfOnBoarding): self.__logger.info("Credential information : %s", net_id) juju_bootstrap_command = ('juju bootstrap abot-epc abot-controller ' '--config network={} --metadata-source ~ ' + '--config ssl-hostname-verification=false ' '--constraints mem=2G --bootstrap-series ' 'trusty ' '--config use-floating-ip=true --debug'. @@ -286,6 +292,7 @@ class JujuEpc(vnf.VnfOnBoarding): return False def test_vnf(self): + """Run test on ABoT.""" start_time = time.time() self.__logger.info("Running VNF Test cases....") os.system('juju run-action abot-epc-basic/0 run ' @@ -312,6 +319,7 @@ class JujuEpc(vnf.VnfOnBoarding): return True def clean(self): + """Clean created objects/functions.""" try: if not self.orchestrator['requirements']['preserve_setup']: self.__logger.info("Removing deployment files...") @@ -324,7 +332,7 @@ class JujuEpc(vnf.VnfOnBoarding): self.__logger.info("Destroying Orchestrator...") os.system('juju destroy-controller -y abot-controller ' '--destroy-all-models') - except: + except Exception: # pylint: disable=broad-except self.__logger.warn("Some issue during the undeployment ..") self.__logger.warn("Tenant clean continue ..") @@ -333,12 +341,10 @@ class JujuEpc(vnf.VnfOnBoarding): for creator in reversed(self.created_object): try: creator.clean() - except Exception as exc: + except Exception as exc: # pylint: disable=broad-except self.__logger.error('Unexpected error cleaning - %s', exc) self.__logger.info("Releasing all the floating IPs") - # user_id = os_utils.get_user_id(self.keystone_client, - # self.tenant_name) floating_ips = os_utils.get_floating_ips(self.neutron_client) tenant_id = os_utils.get_tenant_id(self.keystone_client, self.tenant_name) |