summaryrefslogtreecommitdiffstats
path: root/functest/core
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-05-03 14:11:38 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2017-05-05 12:50:46 +0000
commitf5c2aaa5ea6dce72fda01a3392d88148264eb02b (patch)
treeb84fa1e753749b28f5259e94e67d22e75fde5a20 /functest/core
parenta92a31aac7656e8beaeed49eae5f1e4af2f46e86 (diff)
Replace CONST.* by getattribute/setattr
Directories affected: - ci - core and respective unit tests Change-Id: I6a3d5aa68de29fc5a37ae543a067ff797eba33e6 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'functest/core')
-rw-r--r--functest/core/vnf_base.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/functest/core/vnf_base.py b/functest/core/vnf_base.py
index 90bc80b3..bc5bf9a7 100644
--- a/functest/core/vnf_base.py
+++ b/functest/core/vnf_base.py
@@ -26,12 +26,12 @@ class VnfOnBoardingBase(base.TestCase):
self.repo = kwargs.get('repo', '')
self.cmd = kwargs.get('cmd', '')
self.details = {}
- self.result_dir = CONST.dir_results
+ self.result_dir = CONST.__getattribute__('dir_results')
self.details_step_mapping = dict(
- deploy_orchestrator='orchestrator',
- deploy_vnf='vnf',
- test_vnf='test_vnf',
- prepare='prepare_env')
+ deploy_orchestrator='orchestrator',
+ deploy_vnf='vnf',
+ test_vnf='test_vnf',
+ prepare='prepare_env')
self.details['prepare_env'] = {}
self.details['orchestrator'] = {}
self.details['vnf'] = {}
@@ -127,7 +127,7 @@ class VnfOnBoardingBase(base.TestCase):
self.creds['username'])
if not admin_user_id:
self.step_failure("Failed to get id of {0}".format(
- self.creds['username']))
+ self.creds['username']))
tenant_id = os_utils.get_tenant_id(self.keystone_client,
self.tenant_name)
@@ -137,7 +137,7 @@ class VnfOnBoardingBase(base.TestCase):
self.tenant_description)
if not tenant_id:
self.step_failure("Failed to get or create {0} tenant".format(
- self.tenant_name))
+ self.tenant_name))
roles_name = ["admin", "Admin"]
role_id = ''
for role_name in roles_name:
@@ -147,12 +147,12 @@ class VnfOnBoardingBase(base.TestCase):
if not role_id:
self.step_failure("Failed to get id for {0} role".format(
- role_name))
+ role_name))
if not os_utils.add_role_user(self.keystone_client, admin_user_id,
role_id, tenant_id):
self.step_failure("Failed to add {0} on tenant".format(
- self.creds['username']))
+ self.creds['username']))
user_id = os_utils.get_or_create_user(self.keystone_client,
self.tenant_name,