diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-05-05 13:50:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-05 13:50:54 +0000 |
commit | 6e4d097a8881fa0cfcc2c192639eb0f17ce025a2 (patch) | |
tree | b8a658487f2399f201426d25adaa3b51f627393b /functest/core | |
parent | 60f2c04e6c01c55cb66dfaebda436e2c60a6a3ac (diff) | |
parent | f5c2aaa5ea6dce72fda01a3392d88148264eb02b (diff) |
Merge "Replace CONST.* by getattribute/setattr"
Diffstat (limited to 'functest/core')
-rw-r--r-- | functest/core/vnf_base.py | 18 |
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, |