From f5c2aaa5ea6dce72fda01a3392d88148264eb02b Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 3 May 2017 14:11:38 +0200 Subject: Replace CONST.* by getattribute/setattr Directories affected: - ci - core and respective unit tests Change-Id: I6a3d5aa68de29fc5a37ae543a067ff797eba33e6 Signed-off-by: jose.lausuch --- functest/core/vnf_base.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'functest/core') 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, -- cgit 1.2.3-korg