'Return True if host has the exact number of CPU cores.'

def host_passes(self, host_state, spec_obj):

    if (not host_state.vcpus_total):
        LOG.warning(_LW('VCPUs    not    set;    assuming    CPU    collection    broken'))
        return False
    required_vcpus = spec_obj.vcpus
    usable_vcpus = (host_state.vcpus_total - host_state.vcpus_used)
    if (required_vcpus != usable_vcpus):
        LOG.debug('%(host_state)s    does    not    have    exactly    %(requested_vcpus)s    cores    of    usable    vcpu,    it    has    %(usable_vcpus)s.', {'host_state': host_state, 'requested_vcpus': required_vcpus, 'usable_vcpus': usable_vcpus})
        return False
    host_state.limits['vcpu'] = host_state.vcpus_total
    return True
