Rework client.Interface

This commit is contained in:
derekwaynecarr
2014-10-21 17:14:35 -04:00
parent 2bbd11eda6
commit 580cb5ea4f
20 changed files with 640 additions and 368 deletions

View File

@@ -26,8 +26,7 @@ import (
// for a controller's ReplicaSelector equals the Replicas count.
func (c *Client) ControllerHasDesiredReplicas(controller api.ReplicationController) wait.ConditionFunc {
return func() (bool, error) {
ctx := api.WithNamespace(api.NewContext(), controller.Namespace)
pods, err := c.ListPods(ctx, labels.Set(controller.DesiredState.ReplicaSelector).AsSelector())
pods, err := c.Pods(controller.Namespace).List(labels.Set(controller.DesiredState.ReplicaSelector).AsSelector())
if err != nil {
return false, err
}