'Find resources that match key:values in filters dict.
If the attribute on the object is a list, each value is checked if it
is in the list.
The values in the dicionary for a single key are matched in an OR
fashion.'

def get_resources(self, rtype, filters):

    self._flood_cache_for_query(rtype, **filters)
    def match(obj):
        for (key, values) in filters.items():
            for value in values:
                attr = getattr(obj, key)
                if isinstance(attr, (list, tuple, set)):
                    if (value in attr):
                        break
                elif (value == attr):
                    break
            else:
                return False
        return True
    return self.match_resources_with_func(rtype, match)
