Simplify List() signature in clients.

This commit is contained in:
Wojciech Tyczynski
2015-12-02 12:12:57 +01:00
parent 800012dfb8
commit 6dcb689d4e
141 changed files with 532 additions and 650 deletions

View File

@@ -45,10 +45,8 @@ import (
"k8s.io/kubernetes/pkg/api/errors"
"k8s.io/kubernetes/pkg/api/unversioned"
client "k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/kubelet/container"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/labels"
"k8s.io/kubernetes/pkg/util/sets"
)
@@ -652,7 +650,7 @@ func (k *framework) makeTaskRegistryReconciler() taskreconciler.Action {
// tasks identified by annotations in the Kubernetes pod registry.
func (k *framework) makePodRegistryReconciler() taskreconciler.Action {
return taskreconciler.Action(func(drv bindings.SchedulerDriver, cancel <-chan struct{}) <-chan error {
podList, err := k.client.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
podList, err := k.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{})
if err != nil {
return proc.ErrorChanf("failed to reconcile pod registry: %v", err)
}
@@ -728,7 +726,7 @@ func (k *framework) explicitlyReconcileTasks(driver bindings.SchedulerDriver, ta
}
func (ks *framework) recoverTasks() error {
podList, err := ks.client.Pods(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
podList, err := ks.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{})
if err != nil {
log.V(1).Infof("failed to recover pod registry, madness may ensue: %v", err)
return err