'Return a list of hosts that can fulfill the requirements
specified in the query.'

def host_passes(self, host_state, spec_obj):

    query = spec_obj.get_scheduler_hint('query')
    if (not query):
        return True
    result = self._process_filter(jsonutils.loads(query), host_state)
    if isinstance(result, list):
        result = any(result)
    if result:
        return True
    return False
