Switch away from the static node info

This commit is contained in:
Brendan Burns
2014-10-10 13:49:09 -07:00
parent b3292e947f
commit e6fa568ad4
3 changed files with 17 additions and 7 deletions

View File

@@ -20,6 +20,7 @@ import (
"fmt"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/resources"
"github.com/golang/glog"
@@ -39,7 +40,15 @@ func (nodes StaticNodeInfo) GetNodeInfo(nodeID string) (*api.Minion, error) {
return &nodes.Items[ix], nil
}
}
return nil, fmt.Errorf("failed to find node: %s", nodeID)
return nil, fmt.Errorf("failed to find node: %s, %#v", nodeID, nodes)
}
type ClientNodeInfo struct {
*client.Client
}
func (nodes ClientNodeInfo) GetNodeInfo(nodeID string) (*api.Minion, error) {
return nodes.GetMinion(nodeID)
}
type ResourceFit struct {