3 # jose.lausuch@ericsson.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # pylint: disable=missing-docstring
15 from functest.utils import env
18 class Env(object): # pylint: disable=too-few-public-methods
22 install_type = env.get('INSTALLER_TYPE')
23 scenario = env.get('DEPLOY_SCENARIO')
24 node = env.get('NODE_NAME')
25 build_tag = env.get('BUILD_TAG')
27 build_tag = build_tag.lstrip(
28 "jenkins-").lstrip("functest").lstrip("-")
30 env_info = {'INSTALLER': install_type,
33 'BUILD_TAG': build_tag}
38 class CliEnv(object): # pylint: disable=too-few-public-methods
43 msg = prettytable.PrettyTable(
44 header_style='upper', padding_width=5,
45 field_names=['Functest Environment', 'value'])
46 for key, value in six.iteritems(env_info):
48 msg.add_row([key, value])
49 click.echo(msg.get_string())