diff options
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_base.py | 22 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_ssh.py | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index 00177a22..213b79fc 100644 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -15,10 +15,10 @@ from datetime import datetime import functest.utils.functest_utils as ft_utils import functest.utils.functest_constants as ft_constants import functest.utils.openstack_utils as os_utils -from functest.core import TestCasesBase +import functest.core.testcase_base as testcase_base -class VPingBase(TestCasesBase.TestCasesBase): +class VPingBase(testcase_base.TestcaseBase): def __init__(self): def get_conf(parameter): return ft_utils.get_functest_config(parameter) @@ -55,23 +55,23 @@ class VPingBase(TestCasesBase.TestCasesBase): def run(self, **kwargs): if not self.check_repo_exist(): - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR image_id = self.create_image() if not image_id: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR flavor = self.get_flavor() if not flavor: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR network_id = self.create_network_full() if not network_id: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR sg_id = self.create_security_group() if not sg_id: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR self.delete_exist_vms() @@ -87,7 +87,7 @@ class VPingBase(TestCasesBase.TestCasesBase): None, sg_id) if not vm1: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR test_ip = self.get_test_ip(vm1) vm2 = self.boot_vm(self.vm2_name, @@ -97,17 +97,17 @@ class VPingBase(TestCasesBase.TestCasesBase): test_ip, sg_id) if not vm2: - return TestCasesBase.TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR EXIT_CODE = self.do_vping(vm2, test_ip) - if EXIT_CODE == TestCasesBase.TestCasesBase.EX_RUN_ERROR: + if EXIT_CODE == testcase_base.TestcaseBase.EX_RUN_ERROR: return EXIT_CODE self.stop_time = time.time() self.parse_result(EXIT_CODE, self.start_time, self.stop_time) - return TestCasesBase.TestCasesBase.EX_OK + return testcase_base.TestcaseBase.EX_OK def boot_vm_preparation(self, config, vmname, test_ip): pass diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py index 48913857..8ae590ed 100644 --- a/functest/opnfv_tests/openstack/vping/vping_ssh.py +++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py @@ -19,7 +19,7 @@ from scp import SCPClient import functest.utils.functest_logger as ft_logger import functest.utils.openstack_utils as os_utils import vping_base -from functest.core.TestCasesBase import TestCasesBase +import functest.core.testcase_base as testcase_base class VPingSSH(vping_base.VPingBase): @@ -32,12 +32,12 @@ class VPingSSH(vping_base.VPingBase): def do_vping(self, vm, test_ip): floatip = self.add_float_ip(vm) if not floatip: - return TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR ssh = self.establish_ssh(vm, floatip) if not ssh: - return TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR if not self.transfer_ping_script(ssh, floatip): - return TestCasesBase.EX_RUN_ERROR + return testcase_base.TestcaseBase.EX_RUN_ERROR return self.do_vping_ssh(ssh, test_ip) def add_float_ip(self, vm): |