summaryrefslogtreecommitdiffstats
path: root/functest/ci/prepare_env.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-13 17:35:40 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 21:16:07 +0100
commit9886535d617d95e7d2c2f294e79a7cd994fcd685 (patch)
tree8f72afaf1ef702763f44e04dc3372f8ee460128c /functest/ci/prepare_env.py
parent8b0f0b5b5ce3395dddd938fc43f048eb90d8da8e (diff)
Add deployment_handler printout to prepare env
Example output: http://pastebin.com/raw/xWTe9tAY Change-Id: Ib8100089318f807fb4d5d4fff2911179eb18216e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'functest/ci/prepare_env.py')
-rwxr-xr-xfunctest/ci/prepare_env.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py
index 6b24fe086..d2e773125 100755
--- a/functest/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -21,6 +21,8 @@ import subprocess
import sys
import yaml
+
+from opnfv.deployment import factory
from opnfv.utils import constants as opnfv_constants
import functest.utils.functest_logger as ft_logger
@@ -107,6 +109,27 @@ def check_env_variables():
logger.info(" IS_CI_RUN=%s" % CONST.IS_CI_RUN)
+def print_deployment_info():
+ handler = None
+ if CONST.INSTALLER_IP:
+ if CONST.INSTALLER_TYPE == 'apex':
+ pkey = '/root/.ssh/id_rsa'
+ if os.path.isfile(pkey):
+ handler = factory.Factory.get_handler(CONST.INSTALLER_TYPE,
+ CONST.INSTALLER_IP,
+ 'stack',
+ pkey_file=pkey)
+ elif CONST.INSTALLER_TYPE == 'fuel':
+ handler = factory.Factory.get_handler(CONST.INSTALLER_TYPE,
+ CONST.INSTALLER_IP,
+ 'root',
+ installer_pwd='r00tme')
+
+ if handler:
+ logger.info('\n\nDeployment information:\n%s' %
+ handler.get_deployment_info())
+
+
def create_directories():
print_separator()
logger.info("Creating needed directories...")
@@ -286,6 +309,7 @@ def main(**kwargs):
elif kwargs['action'] == "start":
logger.info("######### Preparing Functest environment #########\n")
check_env_variables()
+ print_deployment_info()
create_directories()
source_rc_file()
patch_config_file()