Begin scheduler plugin

This commit is contained in:
Daniel Smith
2014-08-03 00:01:28 -07:00
parent 4c3f509d94
commit dddad888b5
6 changed files with 334 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ func (f FakeMinionLister) List() ([]string, error) {
// PodLister interface represents anything that can list pods for a scheduler
type PodLister interface {
// TODO: make this exactly the same as client's ListPods() method...
ListPods(labels.Selector) ([]api.Pod, error)
}

View File

@@ -57,6 +57,7 @@ func (s *RandomFitScheduler) Schedule(pod api.Pod, minionLister MinionLister) (s
return "", err
}
machineToPods := map[string][]api.Pod{}
// TODO: perform more targeted query...
pods, err := s.podLister.ListPods(labels.Everything())
if err != nil {
return "", err