aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_env.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-27 14:25:49 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-27 14:27:57 +0100
commitbaa8f2d5f67d45e5761f92cb93fe22050f08d0fe (patch)
tree05ddb33dc893cad35369b3286db944eac79ffe4d /functest/cli/commands/cli_env.py
parent53cd7f8176c996014decb7311d9f546f6b8f2497 (diff)
Clean all OpenStack related modules
Xtesting is only focused on the framework and entry points. Change-Id: I1a4146ed8519438b13810a20ddf1140c35bb6ecd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/cli/commands/cli_env.py')
-rw-r--r--functest/cli/commands/cli_env.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py
deleted file mode 100644
index 18c8895a..00000000
--- a/functest/cli/commands/cli_env.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-#
-# jose.lausuch@ericsson.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-
-# pylint: disable=missing-docstring
-
-import click
-import prettytable
-import six
-
-from functest.utils import env
-
-
-class Env(object): # pylint: disable=too-few-public-methods
-
- @staticmethod
- def show():
- install_type = env.get('INSTALLER_TYPE')
- scenario = env.get('DEPLOY_SCENARIO')
- node = env.get('NODE_NAME')
- build_tag = env.get('BUILD_TAG')
- if build_tag:
- build_tag = build_tag.lstrip(
- "jenkins-").lstrip("functest").lstrip("-")
-
- env_info = {'INSTALLER': install_type,
- 'SCENARIO': scenario,
- 'POD': node,
- 'BUILD_TAG': build_tag}
-
- return env_info
-
-
-class CliEnv(object): # pylint: disable=too-few-public-methods
-
- @staticmethod
- def show():
- env_info = Env.show()
- msg = prettytable.PrettyTable(
- header_style='upper', padding_width=5,
- field_names=['Functest Environment', 'value'])
- for key, value in six.iteritems(env_info):
- if key is not None:
- msg.add_row([key, value])
- click.echo(msg.get_string())