aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/sdn/onos/teston
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-05-20 01:56:57 +0000
committerLinda Wang <wangwulin@huawei.com>2017-05-24 01:23:01 +0000
commit06c9b37627600350755097914e9228fa7bcfa9c0 (patch)
treead88fa910902f81be8e281dffe2e8049d7dc5677 /functest/opnfv_tests/sdn/onos/teston
parent87570cfe1261917a41a3aef287ecd30b928e841f (diff)
Fix some pylint errors in onos package
Directories affected: - functest/opnfv_tests/sdn/onos/ JIRA: FUNCTEST-796 Change-Id: Iffbb0e9a021d31a32d940128435a9f6ed43a504f Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/sdn/onos/teston')
-rw-r--r--functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py34
1 files changed, 19 insertions, 15 deletions
diff --git a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py
index 25421d40..f9eee7af 100644
--- a/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py
+++ b/functest/opnfv_tests/sdn/onos/teston/adapters/foundation.py
@@ -26,7 +26,8 @@ class Foundation(object):
def __init__(self):
# currentpath = os.getcwd()
- currentpath = '%s/sdn/onos/teston/ci' % CONST.dir_functest_data
+ currentpath = ('{0}/sdn/onos/teston/ci'
+ .format(CONST.__getattribute__('dir_functest_data')))
self.cipath = currentpath
self.logdir = os.path.join(currentpath, 'log')
self.workhome = currentpath[0: currentpath.rfind('opnfv_tests') - 1]
@@ -55,22 +56,25 @@ class Foundation(object):
Get Default Parameters value
"""
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.masterusername = CONST.__getattribute__('ONOS_onosbench_username')
+ self.masterpassword = CONST.__getattribute__('ONOS_onosbench_password')
+ self.agentusername = CONST.__getattribute__('ONOS_onoscli_username')
+ self.agentpassword = CONST.__getattribute__('ONOS_onoscli_password')
+ self.runtimeout = CONST.__getattribute__('ONOS_runtimeout')
+ self.OCT = CONST.__getattribute__('ONOS_environment_OCT')
+ self.OC1 = CONST.__getattribute__('ONOS_environment_OC1')
+ self.OC2 = CONST.__getattribute__('ONOS_environment_OC2')
+ self.OC3 = CONST.__getattribute__('ONOS_environment_OC3')
+ self.OCN = CONST.__getattribute__('ONOS_environment_OCN')
+ self.OCN2 = CONST.__getattribute__('ONOS_environment_OCN2')
+ self.installer_master = CONST.__getattribute__(
+ 'ONOS_environment_installer_master')
self.installer_master_username = (
- CONST.ONOS_environment_installer_master_username)
+ CONST.__getattribute__(
+ 'ONOS_environment_installer_master_username'))
self.installer_master_password = (
- CONST.ONOS_environment_installer_master_password)
+ CONST.__getattribute__(
+ 'ONOS_environment_installer_master_password'))
self.hosts = [self.OC1, self.OCN, self.OCN2]
self.localhost = self.OCT