diff options
Diffstat (limited to 'functest/cli/commands/cli_env.py')
-rw-r--r-- | functest/cli/commands/cli_env.py | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py index 72a870b5..0e0afe52 100644 --- a/functest/cli/commands/cli_env.py +++ b/functest/cli/commands/cli_env.py @@ -7,13 +7,10 @@ # http://www.apache.org/licenses/LICENSE-2.0 # -import os - import click import prettytable from functest.utils.constants import CONST -import functest.utils.functest_utils as ft_utils class Env(object): @@ -21,22 +18,6 @@ class Env(object): def __init__(self): pass - def prepare(self): - if self.status(verbose=False) == 0: - answer = raw_input("It seems that the environment has been " - "already prepared. Do you want to do " - "it again? [y|n]\n") - while True: - if answer.lower() in ["y", "yes"]: - os.remove(CONST.__getattribute__('env_active')) - break - elif answer.lower() in ["n", "no"]: - return - else: - answer = raw_input("Invalid answer. Please type [y|n]\n") - - ft_utils.execute_command("prepare_env start") - def show(self): def _get_value(attr, default='Unknown'): return attr if attr else default @@ -52,30 +33,14 @@ class Env(object): build_tag = build_tag.lstrip( "jenkins-").lstrip("functest").lstrip("-") - STATUS = "not ready" - if self.status(verbose=False) == 0: - STATUS = "ready" - env_info = {'INSTALLER': installer_info, 'SCENARIO': scenario, 'POD': node, 'DEBUG FLAG': is_debug, - 'BUILD_TAG': build_tag, - 'STATUS': STATUS} + 'BUILD_TAG': build_tag} return env_info - def status(self, verbose=True): - ret_val = 0 - if not os.path.isfile(CONST.__getattribute__('env_active')): - if verbose: - click.echo("Functest environment is not installed.\n") - ret_val = 1 - elif verbose: - click.echo("Functest environment ready to run tests.\n") - - return ret_val - class CliEnv(Env): |