'Returns the number of slots per host. If for some reason the cluster is
inconsistent, this will return -1 for example, if you have m1.large and
m1.small in the same cluster'

def slots_per_host(self):

    total = self.count_total_slots()
    if (total == 0):
        return total
    single = 0
    for q in self.queues:
        if q.startswith('all.q@'):
            single = self.queues.get(q).get('slots')
            break
    if (total != (single * len(self.hosts))):
        raise exception.BaseException('ERROR:    Number    of    slots    not    consistent    across    cluster')
    return single
