from __future__ import print_function
import logging
-import os
import re
import shutil
import subprocess
import yaml
from functest.utils import constants
+from functest.utils import env
LOGGER = logging.getLogger(__name__)
Get the CI env variables
"""
ci_env_var = {
- "installer": os.environ.get('INSTALLER_TYPE'),
- "scenario": os.environ.get('DEPLOY_SCENARIO')}
+ "installer": env.get('INSTALLER_TYPE'),
+ "scenario": env.get('DEPLOY_SCENARIO')}
return ci_env_var
def get_functest_config(parameter):
- yaml_ = constants.CONST.__getattribute__('CONFIG_FUNCTEST_YAML')
+ yaml_ = constants.CONFIG_FUNCTEST_YAML
return get_parameter_from_yaml(parameter, yaml_)
def get_functest_yaml():
# pylint: disable=bad-continuation
- with open(constants.CONST.__getattribute__(
- 'CONFIG_FUNCTEST_YAML')) as yaml_fd:
+ with open(constants.CONFIG_FUNCTEST_YAML) as yaml_fd:
functest_yaml = yaml.safe_load(yaml_fd)
return functest_yaml