'Find all items with attributes matching ``**kwargs``.'

def findall(self, **kwargs):

    found = ListWithMeta([], None)
    searches = kwargs.items()
    detailed = True
    list_kwargs = {}
    list_argspec = reflection.get_callable_args(self.list)
    if ('detailed' in list_argspec):
        detailed = (('human_id' not in kwargs) and ('name' not in kwargs) and ('display_name' not in kwargs))
        list_kwargs['detailed'] = detailed
    if (('is_public' in list_argspec) and ('is_public' in kwargs)):
        is_public = kwargs['is_public']
        list_kwargs['is_public'] = is_public
        if (is_public is None):
            tmp_kwargs = kwargs.copy()
            del tmp_kwargs['is_public']
            searches = tmp_kwargs.items()
    if ('search_opts' in list_argspec):
        if ('human_id' in kwargs):
            list_kwargs['search_opts'] = {'name': kwargs['human_id']}
        elif ('name' in kwargs):
            list_kwargs['search_opts'] = {'name': kwargs['name']}
        elif ('display_name' in kwargs):
            list_kwargs['search_opts'] = {'name': kwargs['display_name']}
        if ('all_tenants' in kwargs):
            all_tenants = kwargs['all_tenants']
            list_kwargs['search_opts']['all_tenants'] = all_tenants
            searches = [(k, v) for (k, v) in searches if (k != 'all_tenants')]
        if ('deleted' in kwargs):
            deleted = kwargs['deleted']
            list_kwargs['search_opts']['deleted'] = deleted
            searches = [(k, v) for (k, v) in searches if (k != 'deleted')]
    listing = self.list(**list_kwargs)
    found.append_request_ids(listing.request_ids)
    for obj in listing:
        try:
            if all(((getattr(obj, attr) == value) for (attr, value) in searches)):
                if detailed:
                    found.append(obj)
                else:
                    detail = self.get(obj.id)
                    found.append(detail)
                    found.append_request_ids(detail.request_ids)
        except AttributeError:
            continue
    return found
