def load(path, distros_patch=None):
    distro_possibles = []
    patch = jsonpatch.JsonPatch(distros_patch) if distros_patch else None
    input_files = glob.glob(sh.joinpths(path, '*.yaml'))
    if not input_files:
        raise excp.ConfigException('Did not find any distro definition files in %r' % path)
    for fn in input_files:
        LOG.debug("Attempting to load distro definition from %r", fn)
        try:
            cls_kvs = utils.load_yaml(fn)
            # Apply any user specified patches to distros file
            if patch:
                patch.apply(cls_kvs, in_place=True)
        except Exception as err:
            LOG.warning('Could not load distro definition from %r: %s', fn, err)
        else:
            if 'name' not in cls_kvs:
                name, _ext = os.path.splitext(sh.basename(fn))
                cls_kvs['name'] = name
            distro_possibles.append(Distro(**cls_kvs))
    matches = _match_distros(distro_possibles)
    LOG.debug("Matched distros %s", [m.name for m in matches])
    return matches
Load configuration for all distros found in path.
dataset/ETHPy150Open openstack/anvil/anvil/distro.py/load