diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-09-07 22:13:42 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-09-08 10:45:45 +0800 |
commit | 55d301a2622ff5b63d431b9272caa68224d53843 (patch) | |
tree | b540f05ba3ed45e15260ee7131ce90dc93af753d /testcases/OpenStack/vPing | |
parent | 227afb8285b8f178987a7d6eb1d28a74201a5d1b (diff) |
make use of functest_utils.get_parameter_from_yaml
JIRA: FUNCTEST-463
Change-Id: I1d54a65c5bfa2542f2fd3a2e408967641e6e4ac9
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testcases/OpenStack/vPing')
-rw-r--r-- | testcases/OpenStack/vPing/vping_util.py | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/testcases/OpenStack/vPing/vping_util.py b/testcases/OpenStack/vPing/vping_util.py index e85476e66..cf5a28dbd 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 |