def _weigh_object(self, host_state, weight_properties): """Arbitrary preferring host1 over host2 over host3.""" weights = {'host1': 100, 'host2': 50, 'host3': 1} return weights.get(host_state.host, 0)
def _weigh_object(self, host_state, weight_properties): """Prefer host1 over host2.""" weights = {'host1': 100, 'host2': 1} return weights.get(host_state.host, 0)