osa_toolkit/filesystem.py
def load_user_configuration(config_path=None):
    """Create a user configuration dictionary from config files

    :param config_path: ``str`` path where the configuration files are kept
    """

    user_defined_config = dict()

    # Load the user defined configuration file
    user_config_file = file_find('openstack_user_config.yml',
                                 preferred_path=config_path,
                                 raise_if_missing=False)
    if user_config_file is not False:
        with open(user_config_file, 'rb') as f:
            user_defined_config.update(yaml.safe_load(f.read()) or {})

    # Load anything in a conf.d directory if found
    base_dir = dir_find(config_path, 'conf.d', raise_if_missing=False)
    if base_dir is not False:
        _extra_config(user_defined_config, base_dir)

    # Exit if no user_config was found and loaded
    if not user_defined_config:
        raise MissingDataSource(_get_search_paths(config_path)
                                + _get_search_paths(config_path, 'conf.d'))

    logger.debug("User configuration loaded from: {}".format(user_config_file))
    return user_defined_config
Create a user configuration dictionary from config files

    :param config_path: ``str`` path where the configuration files are kept
    
Create a user configuration dictionary from config files
Create a user configuration dictionary from config files
def load_user_configuration(config_path=None):
    user_defined_config = dict()
    user_config_file = file_find('openstack_user_config.yml',
                                 preferred_path=config_path,
                                 raise_if_missing=False)
    if user_config_file is not False:
        with open(user_config_file, 'rb') as f:
            user_defined_config.update(yaml.safe_load(f.read()) or {})
    base_dir = dir_find(config_path, 'conf.d', raise_if_missing=False)
    if base_dir is not False:
        _extra_config(user_defined_config, base_dir)
    if not user_defined_config:
        raise MissingDataSource(_get_search_paths(config_path)
                                + _get_search_paths(config_path, 'conf.d'))
    logger.debug("User configuration loaded from: {}".format(user_config_file))
    return user_defined_config
def load_user_configuration ( config_path = None ) : user_defined_config = dict ( ) user_config_file = file_find ( 'openstack_user_config.yml' , preferred_path = config_path , raise_if_missing = False ) if user_config_file is not False : with open ( user_config_file , 'rb' ) as f : user_defined_config . update ( yaml . safe_load ( f . read ( ) ) or { } ) base_dir = dir_find ( config_path , 'conf.d' , raise_if_missing = False ) if base_dir is not False : _extra_config ( user_defined_config , base_dir ) if not user_defined_config : raise MissingDataSource ( _get_search_paths ( config_path ) + _get_search_paths ( config_path , 'conf.d' ) ) logger . debug ( "User configuration loaded from: {}" . format ( user_config_file ) ) return user_defined_config
Create a user configuration dictionary from config files
Create a user configuration dictionary from config files
"""Create a user configuration dictionary from config files

    :param config_path: ``str`` path where the configuration files are kept
    """ # Load the user defined configuration file # Load anything in a conf.d directory if found # Exit if no user_config was found and loaded
config_path
``str`` path where the configuration files are kept
` ` str ` ` path where the configuration files are kept