X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fcli%2Fcommands%2Fcli_tier.py;h=531f0ff96a221ad1eb6163018499caa8dfdf3bc0;hb=refs%2Fchanges%2F55%2F34955%2F1;hp=b9d25b6d094c30e32996ba8e47bac26883efca4d;hpb=6503cfae235e53fc994d84411cc8f3d8a59750fd;p=functest.git diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py index b9d25b6d0..531f0ff96 100644 --- a/functest/cli/commands/cli_tier.py +++ b/functest/cli/commands/cli_tier.py @@ -18,12 +18,13 @@ from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils -class CliTier: +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: 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)