diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-05-18 08:35:48 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-05-18 08:37:01 +0000 |
commit | 1cbb37c19631f1b7602deeab6d2784c48484f1d0 (patch) | |
tree | 3c1a27bababdb1328f7b5d087ef3576780c3b8ad /functest/cli/commands/cli_tier.py | |
parent | 57da7080488785813adcaff4e2410e2338dccf2a (diff) |
Replace CONST.* by getattribute/setattr for cli
Directories affected:
- functest/cli/commands
and respective unit test
JIRA: FUNCTEST-796
Change-Id: I2ad721819d4b8f97098c589c3b5ed3dcc945409d
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/cli/commands/cli_tier.py')
-rw-r--r-- | functest/cli/commands/cli_tier.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py index 012b11d0..531f0ff9 100644 --- a/functest/cli/commands/cli_tier.py +++ b/functest/cli/commands/cli_tier.py @@ -21,9 +21,10 @@ import functest.utils.functest_utils as ft_utils class CliTier(object): def __init__(self): - self.tiers = tb.TierBuilder(CONST.INSTALLER_TYPE, - CONST.DEPLOY_SCENARIO, - CONST.functest_testcases_yaml) + self.tiers = tb.TierBuilder( + CONST.__getattribute__('INSTALLER_TYPE'), + CONST.__getattribute__('DEPLOY_SCENARIO'), + CONST.__getattribute__('functest_testcases_yaml')) def list(self): summary = "" @@ -62,10 +63,12 @@ class CliTier(object): if report: flags += "-r " - if not os.path.isfile(CONST.env_active): + if not os.path.isfile(CONST.__getattribute__('env_active')): click.echo("Functest environment is not ready. " "Run first 'functest env prepare'") else: cmd = ("python %s/functest/ci/run_tests.py " - "%s -t %s" % (CONST.dir_repo_functest, flags, tiername)) + "%s -t %s" % + (CONST.__getattribute__('dir_repo_functest'), + flags, tiername)) ft_utils.execute_command(cmd) |