From 83a3d18e1d62f5caff94619a33a2ed4a094cf0d9 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 2 Mar 2017 10:48:58 +0800 Subject: delete ft_constants and file functest_constants.py delete no longer used ft_constants in run_test.py substitute ft_constants with CONST in foundation.py and remove useless str() finally delete not-used file functest_constants.py Change-Id: I109a5409e501b610f41aae7d75c55ca745a3d4c1 Signed-off-by: SerenaFeng --- .../sdn/onos/teston/adapters/foundation.py | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'functest/opnfv_tests/sdn/onos/teston/adapters') diff --git a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py index 2bef5cc6..25421d40 100644 --- a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py +++ b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py @@ -17,7 +17,7 @@ import os import re import time -import functest.utils.functest_constants as ft_constants +from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils @@ -26,7 +26,7 @@ class Foundation(object): def __init__(self): # currentpath = os.getcwd() - currentpath = '%s/sdn/onos/teston/ci' % ft_constants.FUNCTEST_TEST_DIR + currentpath = '%s/sdn/onos/teston/ci' % CONST.dir_functest_data self.cipath = currentpath self.logdir = os.path.join(currentpath, 'log') self.workhome = currentpath[0: currentpath.rfind('opnfv_tests') - 1] @@ -54,23 +54,23 @@ class Foundation(object): """ Get Default Parameters value """ - self.Result_DB = str(ft_utils.get_db_url()) - self.masterusername = str(ft_constants.ONOSBENCH_USERNAME) - self.masterpassword = str(ft_constants.ONOSBENCH_PASSWORD) - self.agentusername = str(ft_constants.ONOSCLI_USERNAME) - self.agentpassword = str(ft_constants.ONOSCLI_PASSWORD) - self.runtimeout = ft_constants.ONOS_RUNTIMEOUT - self.OCT = str(ft_constants.ONOS_OCT) - self.OC1 = str(ft_constants.ONOS_OC1) - self.OC2 = str(ft_constants.ONOS_OC2) - self.OC3 = str(ft_constants.ONOS_OC3) - self.OCN = str(ft_constants.ONOS_OCN) - self.OCN2 = str(ft_constants.ONOS_OCN2) - self.installer_master = str(ft_constants.ONOS_INSTALLER_MASTER) - self.installer_master_username = \ - str(ft_constants.ONOS_INSTALLER_MASTER_USERNAME) - self.installer_master_password = \ - ft_constants.ONOS_INSTALLER_MASTER_PASSWORD + self.Result_DB = ft_utils.get_db_url() + self.masterusername = CONST.ONOS_onosbench_username + self.masterpassword = CONST.ONOS_onosbench_password + self.agentusername = CONST.ONOS_onoscli_username + self.agentpassword = CONST.ONOS_onoscli_password + self.runtimeout = CONST.ONOS_runtimeout + self.OCT = CONST.ONOS_environment_OCT + self.OC1 = CONST.ONOS_environment_OC1 + self.OC2 = CONST.ONOS_environment_OC2 + self.OC3 = CONST.ONOS_environment_OC3 + self.OCN = CONST.ONOS_environment_OCN + self.OCN2 = CONST.ONOS_environment_OCN2 + self.installer_master = CONST.ONOS_environment_installer_master + self.installer_master_username = ( + CONST.ONOS_environment_installer_master_username) + self.installer_master_password = ( + CONST.ONOS_environment_installer_master_password) self.hosts = [self.OC1, self.OCN, self.OCN2] self.localhost = self.OCT -- cgit 1.2.3-korg