diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-12-21 10:32:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-12-21 10:32:03 +0000 |
commit | 3592444c8abcaca3312d831fd610d82bffd627ea (patch) | |
tree | 940de72ea5b22430e177f07df17f52ba299d9398 /functest/opnfv_tests | |
parent | 266e29ce1eb02bf8f97ada361d759d41567cce73 (diff) | |
parent | 231b742d9db18ee347d786dd6cb42c0ca67ad5bc (diff) |
Merge "refactor vping using new constants provider"
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r-- | functest/opnfv_tests/openstack/snaps/smoke.py | 2 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/vping/vping_base.py | 43 |
2 files changed, 20 insertions, 25 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/smoke.py b/functest/opnfv_tests/openstack/snaps/smoke.py index f66c17ff..691f8138 100644 --- a/functest/opnfv_tests/openstack/snaps/smoke.py +++ b/functest/opnfv_tests/openstack/snaps/smoke.py @@ -33,7 +33,7 @@ class SnapsSmoke(PyTestSuiteRunner): # SNAPS repository and are found relative to that path if use_fip: snaps_dir = ft_utils.get_functest_config( - 'general.directories.dir_repo_snaps') + '/snaps' + 'general.dir.dir_repo_snaps') + '/snaps' os.chdir(snaps_dir) test_suite_builder.add_openstack_integration_tests( diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index e467dd9f..a5309bd4 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() |