summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack/vPing
diff options
context:
space:
mode:
Diffstat (limited to 'testcases/OpenStack/vPing')
-rw-r--r--testcases/OpenStack/vPing/vping_util.py56
1 files changed, 28 insertions, 28 deletions
diff --git a/testcases/OpenStack/vPing/vping_util.py b/testcases/OpenStack/vPing/vping_util.py
index 7e7173aee..cf5a28dbd 100644
--- a/testcases/OpenStack/vPing/vping_util.py
+++ b/testcases/OpenStack/vPing/vping_util.py
@@ -4,43 +4,43 @@ import re
import sys
import time
-import functest.utils.functest_utils as ft_utils
-import functest.utils.openstack_utils as os_utils
import paramiko
-from functest.utils.functest_utils import FUNCTEST_REPO as REPO_PATH
from scp import SCPClient
-functest_yaml = ft_utils.get_functest_yaml()
+import functest.utils.functest_utils as ft_utils
+import functest.utils.openstack_utils as os_utils
+FUNCTEST_REPO = ft_utils.FUNCTEST_REPO
-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")
+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 = functest_yaml.get("vping").get("vping_sg_name")
-SECGROUP_DESCR = functest_yaml.get("vping").get("vping_sg_descr")
+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
@@ -57,8 +57,8 @@ def pMsg(value):
def check_repo_exist():
- if not os.path.exists(REPO_PATH):
- logger.error("Functest repository not found '%s'" % REPO_PATH)
+ if not os.path.exists(FUNCTEST_REPO):
+ logger.error("Functest repository not found '%s'" % FUNCTEST_REPO)
exit(-1)
@@ -339,7 +339,7 @@ def transfer_ping_script(ssh, floatip):
logger.info("Trying to transfer ping.sh to %s..." % floatip)
scp = SCPClient(ssh.get_transport())
- ping_script = REPO_PATH + '/' + "testcases/OpenStack/vPing/ping.sh"
+ ping_script = FUNCTEST_REPO + "/testcases/OpenStack/vPing/ping.sh"
try:
scp.put(ping_script, "~/")
except: