From 55d301a2622ff5b63d431b9272caa68224d53843 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 7 Sep 2016 22:13:42 +0800 Subject: make use of functest_utils.get_parameter_from_yaml JIRA: FUNCTEST-463 Change-Id: I1d54a65c5bfa2542f2fd3a2e408967641e6e4ac9 Signed-off-by: SerenaFeng --- testcases/OpenStack/vPing/vping_util.py | 47 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'testcases/OpenStack/vPing/vping_util.py') diff --git a/testcases/OpenStack/vPing/vping_util.py b/testcases/OpenStack/vPing/vping_util.py index e85476e6..cf5a28db 100644 --- a/testcases/OpenStack/vPing/vping_util.py +++ b/testcases/OpenStack/vPing/vping_util.py @@ -9,39 +9,38 @@ from scp import SCPClient import functest.utils.functest_utils as ft_utils import functest.utils.openstack_utils as os_utils - FUNCTEST_REPO = ft_utils.FUNCTEST_REPO -functest_yaml = ft_utils.get_functest_yaml() -NAME_VM_1 = functest_yaml.get("vping").get("vm_name_1") -NAME_VM_2 = functest_yaml.get("vping").get("vm_name_2") +NAME_VM_1 = ft_utils.get_functest_config('vping.vm_name_1') +NAME_VM_2 = ft_utils.get_functest_config('vping.vm_name_2') VM_BOOT_TIMEOUT = 180 VM_DELETE_TIMEOUT = 100 -PING_TIMEOUT = functest_yaml.get("vping").get("ping_timeout") +PING_TIMEOUT = ft_utils.get_functest_config('vping.ping_timeout') + +GLANCE_IMAGE_NAME = ft_utils.get_functest_config('vping.image_name') +GLANCE_IMAGE_FILENAME = \ + ft_utils.get_functest_config('general.openstack.image_file_name') +GLANCE_IMAGE_FORMAT = \ + ft_utils.get_functest_config('general.openstack.image_disk_format') +GLANCE_IMAGE_PATH = \ + ft_utils.get_functest_config('general.directories.dir_functest_data') + \ + "/" + GLANCE_IMAGE_FILENAME -GLANCE_IMAGE_NAME = functest_yaml.get("vping").get("image_name") -GLANCE_IMAGE_FILENAME = functest_yaml.get("general").get( - "openstack").get("image_file_name") -GLANCE_IMAGE_FORMAT = functest_yaml.get("general").get( - "openstack").get("image_disk_format") -GLANCE_IMAGE_PATH = functest_yaml.get("general").get("directories").get( - "dir_functest_data") + "/" + GLANCE_IMAGE_FILENAME -FLAVOR = functest_yaml.get("vping").get("vm_flavor") +FLAVOR = ft_utils.get_functest_config('vping.vm_flavor') # NEUTRON Private Network parameters -PRIVATE_NET_NAME = functest_yaml.get("vping").get( - "vping_private_net_name") -PRIVATE_SUBNET_NAME = functest_yaml.get("vping").get( - "vping_private_subnet_name") -PRIVATE_SUBNET_CIDR = functest_yaml.get("vping").get( - "vping_private_subnet_cidr") -ROUTER_NAME = functest_yaml.get("vping").get( - "vping_router_name") - -SECGROUP_NAME = functest_yaml.get("vping").get("vping_sg_name") -SECGROUP_DESCR = functest_yaml.get("vping").get("vping_sg_descr") +PRIVATE_NET_NAME = \ + ft_utils.get_functest_config('vping.vping_private_net_name') +PRIVATE_SUBNET_NAME = \ + ft_utils.get_functest_config('vping.vping_private_subnet_name') +PRIVATE_SUBNET_CIDR = \ + ft_utils.get_functest_config('vping.vping_private_subnet_cidr') +ROUTER_NAME = ft_utils.get_functest_config('vping.vping_router_name') + +SECGROUP_NAME = ft_utils.get_functest_config('vping.vping_sg_name') +SECGROUP_DESCR = ft_utils.get_functest_config('vping.vping_sg_descr') neutron_client = None -- cgit 1.2.3-korg