'Result Matrix with \'restrict_isolated_hosts_to_isolated_images\' set
to True::
|                | isolated_image | non_isolated_image
|   iso_host     |    True        |     False
|   non_iso_host |    False       |      True
Result Matrix with \'restrict_isolated_hosts_to_isolated_images\' set
to False::
|                | isolated_image | non_isolated_image
|   iso_host     |    True        |      True
|   non_iso_host |    False       |      True'

def host_passes(self, host_state, spec_obj):

    isolated_hosts = CONF.filter_scheduler.isolated_hosts
    isolated_images = CONF.filter_scheduler.isolated_images
    restrict_isolated_hosts_to_isolated_images = CONF.filter_scheduler.restrict_isolated_hosts_to_isolated_images
    if (not isolated_images):
        return ((not restrict_isolated_hosts_to_isolated_images) or (host_state.host not in isolated_hosts))
    image_ref = (spec_obj.image.id if spec_obj.image else None)
    image_isolated = (image_ref in isolated_images)
    host_isolated = (host_state.host in isolated_hosts)
    if restrict_isolated_hosts_to_isolated_images:
        return (image_isolated == host_isolated)
    else:
        return ((not image_isolated) or host_isolated)
