aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli
diff options
context:
space:
mode:
authorJose Lausuch <jalausuch@suse.com>2017-11-15 17:11:41 +0100
committerJose Lausuch <jalausuch@suse.com>2017-11-22 19:48:38 +0100
commitd4996440fa16297aee7a925e6357a9cfd42d24f8 (patch)
treee2ef5c7c02eac83422848b7ce186171facf5547c /functest/cli
parent185dbcfb6ed774cc2f0478b05041d9e3a4e2f303 (diff)
Remove prepare_env
After moving the rally installation out of prepare_env It doesn't much sense to keep this script as it doesn't do useful things any more. Change-Id: I9ab3b2dd30c8ec0fbb825ee4302a83cce80f1cbe Signed-off-by: Jose Lausuch <jalausuch@suse.com>
Diffstat (limited to 'functest/cli')
-rw-r--r--functest/cli/cli_base.py12
-rw-r--r--functest/cli/commands/cli_env.py37
-rw-r--r--functest/cli/commands/cli_testcase.py4
-rw-r--r--functest/cli/commands/cli_tier.py10
4 files changed, 3 insertions, 60 deletions
diff --git a/functest/cli/cli_base.py b/functest/cli/cli_base.py
index 507179b1..aa8ab24b 100644
--- a/functest/cli/cli_base.py
+++ b/functest/cli/cli_base.py
@@ -87,23 +87,11 @@ def os_show_credentials():
_openstack.show_credentials()
-@env.command('prepare', help="Prepares the Functest environment. This step is "
- "needed run the tests.")
-def env_prepare():
- _env.prepare()
-
-
@env.command('show', help="Shows information about the current environment.")
def env_show():
_env.show()
-@env.command('status', help="Checks if the Functest environment is ready to "
- "run the tests.")
-def env_status():
- _env.status()
-
-
@testcase.command('list', help="Lists the available testcases.")
def testcase_list():
_testcase.list()
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):
diff --git a/functest/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py
index 65dd9ab7..ee7afa5a 100644
--- a/functest/cli/commands/cli_testcase.py
+++ b/functest/cli/commands/cli_testcase.py
@@ -9,7 +9,6 @@
""" global variables """
-import os
import pkg_resources
import click
@@ -50,9 +49,6 @@ class Testcase(object):
if testname == 'vacation':
vacation.main()
- elif not os.path.isfile(CONST.__getattribute__('env_active')):
- click.echo("Functest environment is not ready. "
- "Run first 'functest env prepare'")
else:
tests = testname.split(",")
for test in tests:
diff --git a/functest/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py
index 995354bb..104cf10b 100644
--- a/functest/cli/commands/cli_tier.py
+++ b/functest/cli/commands/cli_tier.py
@@ -9,7 +9,6 @@
""" global variables """
-import os
import pkg_resources
import click
@@ -54,19 +53,14 @@ class Tier(object):
@staticmethod
def run(tiername, noclean=False, report=False):
-
flags = ""
if noclean:
flags += "-n "
if report:
flags += "-r "
- if not os.path.isfile(CONST.__getattribute__('env_active')):
- click.echo("Functest environment is not ready. "
- "Run first 'functest env prepare'")
- else:
- cmd = "run_tests {}-t {}".format(flags, tiername)
- ft_utils.execute_command(cmd)
+ cmd = "run_tests {}-t {}".format(flags, tiername)
+ ft_utils.execute_command(cmd)
class CliTier(Tier):