Add __repr__ to least_cost scheduler.

Change-Id: I883dd5a734ef71cef915abf95a7125926e07f3d0
This commit is contained in:
Chris Behrens
2012-02-08 23:53:20 +00:00
committed by Rick Harris
parent e4d8b4824d
commit f50a5ec1fc
+5
View File
@@ -67,6 +67,11 @@ class WeightedHost(object):
x['host'] = self.host_state.host
return x
def __repr__(self):
if self.host_state:
return "WeightedHost host: %s" % self.host_state.host
return "WeightedHost with no host_state"
def noop_cost_fn(host_state, weighing_properties):
"""Return a pre-weight cost of 1 for each host"""