'Initialize a configuration from a conf directory and conf file.'

def __init__(self, parse_conf=True, config_path=None):

    super(TempestConfigPrivate, self).__init__()
    config_files = []
    failsafe_path = ('/etc/tempest/' + self.DEFAULT_CONFIG_FILE)
    if config_path:
        path = config_path
    else:
        conf_dir = os.environ.get('TEMPEST_CONFIG_DIR', self.DEFAULT_CONFIG_DIR)
        conf_file = os.environ.get('TEMPEST_CONFIG', self.DEFAULT_CONFIG_FILE)
        path = os.path.join(conf_dir, conf_file)
    if (not os.path.isfile(path)):
        path = failsafe_path
    if parse_conf:
        config_files.append(path)
    logging.register_options(_CONF)
    if os.path.isfile(path):
        _CONF([], project='tempest', default_config_files=config_files)
    else:
        _CONF([], project='tempest')
    logging_cfg_path = ('%s/logging.conf' % os.path.dirname(path))
    if (((not hasattr(_CONF, 'log_config_append')) or (_CONF.log_config_append is None)) and os.path.isfile(logging_cfg_path)):
        _CONF.log_config_append = logging_cfg_path
    logging.setup(_CONF, 'tempest')
    LOG = logging.getLogger('tempest')
    LOG.info('Using    tempest    config    file    %s', path)
    register_opts()
    self._set_attrs()
    if parse_conf:
        _CONF.log_opt_values(LOG, logging.DEBUG)
