def _get_adapters_from_configuration():
    """Get adapters from adapter config dir."""
    configs = util.load_configs(setting.ADAPTER_DIR)
    adapters = {}
    for config in configs:
        logging.info('add config %s to adapter', config)
        if 'OS_INSTALLER' in config:
            os_installer = OS_INSTALLERS[config['OS_INSTALLER']]
        else:
            os_installer = None

        if config in 'PACKAGE_INSTALLER':
            package_installer = PACKAGE_INSTALLERS[
                config['PACKAGE_INSTALLER']
            ]
        else:
            package_installer = None

        adapter_name = config['NAME']
        parent_name = config.get('PARENT', None)
        adapter = {
            'name': adapter_name,
            'id': adapter_name,
            'parent': parent_name,
            'parent_id': parent_name,
            'display_name': config.get('DISPLAY_NAME', adapter_name),
            'os_installer': os_installer,
            'package_installer': package_installer,
            'deployable': config.get('DEPLOYABLE', False),
            'health_check_cmd': config.get('HEALTH_CHECK_COMMAND', None),
            'supported_oses': [],
            'roles': [],
            'flavors': []
        }
        supported_os_patterns = [
            re.compile(supported_os_pattern)
            for supported_os_pattern in config.get('SUPPORTED_OS_PATTERNS', [])
        ]
        for os_name, os in OSES.items():
            if not os.get('deployable', False):
                continue
            for supported_os_pattern in supported_os_patterns:
                if supported_os_pattern.match(os_name):
                    adapter['supported_oses'].append(os)
                    break
        adapters[adapter_name] = adapter

    parents = {}
    for name, adapter in adapters.items():
        parent = adapter.get('parent', None)
        parents[name] = parent
    for name, adapter in adapters.items():
        util.recursive_merge_dict(name, adapters, parents)
    return adapters
dataset/ETHPy150Open openstack/compass-core/compass/db/api/adapter.py/_get_adapters_from_configuration/swapped operands of `in`