osa_toolkit/filesystem.py
def dir_find(preferred_path=None, suffix=None, raise_if_missing=True):
    """Return the path to the user configuration files.

    If no directory is found the system will exit.

    The lookup will be done in the following directories:

      * ``preferred_path`` [Optional]
      * ``/etc/openstack_deploy/``

    :param preferred_path: ``str`` Additional directory to look in FIRST
    :param suffix: ``str`` Name of a subdirectory to find under standard paths
    :param raise_if_missing: ``bool`` Should a MissingDataSource be raised if
        the directory is not found.
    """
    search_paths = _get_search_paths(preferred_path, suffix)

    for f in search_paths:
        if os.path.isdir(f):
            return f

    # The directory was not found
    if raise_if_missing:
        raise MissingDataSource(search_paths)
    else:
        return False
Return the path to the user configuration files.

    If no directory is found the system will exit.

    The lookup will be done in the following directories:

      * ``preferred_path`` [Optional]
      * ``/etc/openstack_deploy/``

    :param preferred_path: ``str`` Additional directory to look in FIRST
    :param suffix: ``str`` Name of a subdirectory to find under standard paths
    :param raise_if_missing: ``bool`` Should a MissingDataSource be raised if
        the directory is not found.
    
Return the path to the user configuration files.
If no directory is found the system will exit.

The lookup will be done in the following directories.


Return the path to the user configuration files . If no directory is found the system will exit . The lookup will be done in the following directories .
def dir_find(preferred_path=None, suffix=None, raise_if_missing=True):
    search_paths = _get_search_paths(preferred_path, suffix)
    for f in search_paths:
        if os.path.isdir(f):
            return f
    if raise_if_missing:
        raise MissingDataSource(search_paths)
    else:
        return False
def dir_find ( preferred_path = None , suffix = None , raise_if_missing = True ) : search_paths = _get_search_paths ( preferred_path , suffix ) for f in search_paths : if os . path . isdir ( f ) : return f if raise_if_missing : raise MissingDataSource ( search_paths ) else : return False
Return the path to the user configuration files.
Return the path to the user configuration files .
"""Return the path to the user configuration files.

    If no directory is found the system will exit.

    The lookup will be done in the following directories:

      * ``preferred_path`` [Optional]
      * ``/etc/openstack_deploy/``

    :param preferred_path: ``str`` Additional directory to look in FIRST
    :param suffix: ``str`` Name of a subdirectory to find under standard paths
    :param raise_if_missing: ``bool`` Should a MissingDataSource be raised if
        the directory is not found.
    """ # The directory was not found
preferred_path
``str`` Additional directory to look in FIRST
` ` str ` ` Additional directory to look in FIRST
suffix
``str`` Name of a subdirectory to find under standard paths
` ` str ` ` Name of a subdirectory to find under standard paths
raise_if_missing
``bool`` Should a MissingDataSource be raised if
the directory is not found.
` ` bool ` ` Should a MissingDataSource be raised if the directory is not found .