diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-05-18 07:17:27 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-05-19 08:40:59 +0000 |
commit | d55207785fc615c5236bf204a583285882b0672f (patch) | |
tree | 967ac269e2703417fe99c53189f2ea0f5b999490 /functest/opnfv_tests/openstack/tempest/tempest.py | |
parent | 9b36089c6a5f01e0770351d0e93b5f34410248a3 (diff) |
Replace CONST.* by getattribute/setattr for rally and tempest
Directories affected:
- functest/opnfv_tests/openstack/rally
- functest/opnfv_tests/openstack/tempest
and respective unit test
JIRA: FUNCTEST-796
Change-Id: I963f5947663f0b660337f3304defb697f5d338f3
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/tempest.py')
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index a41d07c7..233ceb48 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -81,8 +81,8 @@ class TempestCommon(testcase.TestCase): result_file = open(conf_utils.TEMPEST_LIST, 'w') black_tests = [] try: - installer_type = CONST.INSTALLER_TYPE - deploy_scenario = CONST.DEPLOY_SCENARIO + installer_type = CONST.__getattribute__('INSTALLER_TYPE') + deploy_scenario = CONST.__getattribute__('DEPLOY_SCENARIO') if (bool(installer_type) * bool(deploy_scenario)): # if INSTALLER_TYPE and DEPLOY_SCENARIO are set we read the # file @@ -119,9 +119,9 @@ class TempestCommon(testcase.TestCase): header = ("Tempest environment:\n" " SUT: %s\n Scenario: %s\n Node: %s\n Date: %s\n" % - (CONST.INSTALLER_TYPE, - CONST.DEPLOY_SCENARIO, - CONST.NODE_NAME, + (CONST.__getattribute__('INSTALLER_TYPE'), + CONST.__getattribute__('DEPLOY_SCENARIO'), + CONST.__getattribute__('NODE_NAME'), time.strftime("%a %b %d %H:%M:%S %Z %Y"))) f_stdout = open( @@ -273,7 +273,8 @@ class TempestMultisite(TempestCommon): TempestCommon.__init__(self, **kwargs) self.MODE = "feature_multisite" self.OPTION = "--concurrency 1" - conf_utils.install_verifier_ext(CONST.dir_repo_kingbird) + conf_utils.install_verifier_ext( + CONST.__getattribute__('dir_repo_kingbird')) class TempestCustom(TempestCommon): |