@utils.supported_filters([])
@database.run_in_session()
@user_api.check_user_permission(
    permission.PERMISSION_LIST_ADAPTERS
)
@utils.wrap_to_dict(
    RESP_FIELDS,
    supported_oses=RESP_OS_FIELDS,
    roles=RESP_ROLES_FIELDS,
    flavors=RESP_FLAVORS_FIELDS
)
def get_adapter(adapter_id, user=None, session=None, **kwargs):
    """get adapter."""
    load_adapters()
    if adapter_id not in ADAPTER_MAPPING:
        raise exception.RecordNotExists(
            'adpater %s does not exist' % adapter_id
        )
    return ADAPTER_MAPPING[adapter_id]
dataset/ETHPy150Open openstack/compass-core/compass/db/api/adapter_holder.py/get_adapter/original