diff options
Diffstat (limited to 'functest/opnfv_tests/openstack/vping')
-rwxr-xr-x[-rw-r--r--] | functest/opnfv_tests/openstack/vping/vping_base.py | 43 | ||||
-rwxr-xr-x[-rw-r--r--] | functest/opnfv_tests/openstack/vping/vping_ssh.py | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | functest/opnfv_tests/openstack/vping/vping_userdata.py | 0 |
3 files changed, 22 insertions, 27 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index 213b79fc..a5309bd4 100644..100755 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -12,43 +12,38 @@ import pprint import time 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 import functest.core.testcase_base as testcase_base +import functest.utils.openstack_utils as os_utils +from functest.utils.constants import CONST class VPingBase(testcase_base.TestcaseBase): def __init__(self): - def get_conf(parameter): - return ft_utils.get_functest_config(parameter) - super(VPingBase, self).__init__() self.logger = None - self.functest_repo = ft_constants.FUNCTEST_REPO_DIR - self.repo = get_conf('general.directories.dir_vping') - self.vm1_name = get_conf('vping.vm_name_1') - self.vm2_name = get_conf('vping.vm_name_2') + self.functest_repo = CONST.dir_repo_functest + self.repo = CONST.dir_vping + self.vm1_name = CONST.vping_vm_name_1 + self.vm2_name = CONST.vping_vm_name_2 self.vm_boot_timeout = 180 self.vm_delete_timeout = 100 - self.ping_timeout = get_conf('vping.ping_timeout') + self.ping_timeout = CONST.vping_ping_timeout - self.image_name = get_conf('vping.image_name') - self.image_filename = get_conf('general.openstack.image_file_name') - self.image_format = get_conf('general.openstack.image_disk_format') - self.image_path = \ - "%s/%s" % (get_conf('general.directories.dir_functest_data'), - self.image_filename) + self.image_name = CONST.vping_image_name + self.image_filename = CONST.openstack_image_file_name + self.image_format = CONST.openstack_image_disk_format + self.image_path = os.path.join(CONST.dir_functest_data, + self.image_filename) - self.flavor_name = get_conf('vping.vm_flavor') + self.flavor_name = CONST.vping_vm_flavor # NEUTRON Private Network parameters - self.private_net_name = get_conf('vping.vping_private_net_name') - self.private_subnet_name = get_conf('vping.vping_private_subnet_name') - self.private_subnet_cidr = get_conf('vping.vping_private_subnet_cidr') - self.router_name = get_conf('vping.vping_router_name') - self.sg_name = get_conf('vping.vping_sg_name') - self.sg_desc = get_conf('vping.vping_sg_descr') + self.private_net_name = CONST.vping_private_net_name + self.private_subnet_name = CONST.vping_private_subnet_name + self.private_subnet_cidr = CONST.vping_private_subnet_cidr + self.router_name = CONST.vping_router_name + self.sg_name = CONST.vping_sg_name + self.sg_desc = CONST.vping_sg_desc self.neutron_client = os_utils.get_neutron_client() self.glance_client = os_utils.get_glance_client() self.nova_client = os_utils.get_nova_client() diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py index 8ae590ed..b032c308 100644..100755 --- a/functest/opnfv_tests/openstack/vping/vping_ssh.py +++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py @@ -101,9 +101,9 @@ class VPingSSH(vping_base.VPingBase): "from the dhcp agent." % self.vm2_name) # if dhcp not work,it shows "No lease, failing".The test will fail - if "No lease, failing" in console_log \ - and not nolease \ - and not got_ip: + if ("No lease, failing" in console_log and + not nolease and + not got_ip): nolease = True self.logger.debug("Console-log '%s': No lease, failing..." % self.vm2_name) diff --git a/functest/opnfv_tests/openstack/vping/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py index fa91c12a..fa91c12a 100644..100755 --- a/functest/opnfv_tests/openstack/vping/vping_userdata.py +++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py |