Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge "Add __repr__ to least_cost scheduler."

  • Loading branch information...
commit eb96b41a022fb2786a6bb7a4950b2826a2de46c6 2 parents 93cb89e + f50a5ec
Jenkins authored openstack-gerrit committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 nova/scheduler/least_cost.py
View
5 nova/scheduler/least_cost.py
@@ -67,6 +67,11 @@ def to_dict(self):
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"""

0 comments on commit eb96b41

Please sign in to comment.
Something went wrong with that request. Please try again.