aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_env.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/cli/commands/cli_env.py')
-rw-r--r--functest/cli/commands/cli_env.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py
index b43116fc..ce977572 100644
--- a/functest/cli/commands/cli_env.py
+++ b/functest/cli/commands/cli_env.py
@@ -8,9 +8,9 @@
#
import os
+import pkg_resources
import click
-import git
import prettytable
from functest.utils.constants import CONST
@@ -36,8 +36,8 @@ class CliEnv(object):
else:
answer = raw_input("Invalid answer. Please type [y|n]\n")
- cmd = ("python %s/functest/ci/prepare_env.py start" %
- CONST.__getattribute__('dir_repo_functest'))
+ cmd = ("python %s start" % pkg_resources.resource_filename(
+ 'functest', 'ci/prepare_env.py'))
ft_utils.execute_command(cmd)
def show(self):
@@ -49,14 +49,6 @@ class CliEnv(object):
installer_info = ("%s, %s" % (install_type, installer_ip))
scenario = _get_value(CONST.__getattribute__('DEPLOY_SCENARIO'))
node = _get_value(CONST.__getattribute__('NODE_NAME'))
- repo_h = git.Repo(CONST.__getattribute__('dir_repo_functest')).head
- if repo_h.is_detached:
- git_branch = 'detached from FETCH_HEAD'
- git_hash = repo_h.commit.hexsha
- else:
- branch = repo_h.reference
- git_branch = branch.name
- git_hash = branch.commit.hexsha
is_debug = _get_value(CONST.__getattribute__('CI_DEBUG'), 'false')
build_tag = CONST.__getattribute__('BUILD_TAG')
if build_tag is not None:
@@ -73,8 +65,6 @@ class CliEnv(object):
msg.add_row(['INSTALLER', installer_info])
msg.add_row(['SCENARIO', scenario])
msg.add_row(['POD', node])
- msg.add_row(['GIT BRANCH', git_branch])
- msg.add_row(['GIT HASH', git_hash])
if build_tag:
msg.add_row(['BUILD TAG', build_tag])
msg.add_row(['DEBUG FLAG', is_debug])