~justin-fathomdb/nova/schedule-compute-near-volume

« back to all changes in this revision

Viewing changes to nova/scheduler/constraint.py

  • Committer: Justin Santa Barbara
  • Date: 2011-03-08 07:04:57 UTC
  • Revision ID: justin@fathomdb.com-20110308070457-5mrc5cbb2rxq2r12
Pep8ulous

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    def __repr__(self):
60
60
        return self.__str__()
61
61
 
 
62
 
62
63
class InstanceConstraintFavorLeastLoaded(SchedulerConstraint):
63
64
    def __init__(self):
64
65
        super(InstanceConstraintFavorLeastLoaded, self).__init__()
213
214
        """Picks a host that is up and has the fewest running instances."""
214
215
        instance_ref = db.instance_get(request_context, instance_id)
215
216
 
216
 
        
217
217
        solver = constraint_lib.Solver({'request_context': request_context,
218
218
                                        'request': instance_ref,
219
219
                                        'scheduler': self})