Pass ListOptions to List() methods.

This commit is contained in:
Wojciech Tyczynski
2015-11-26 11:06:01 +01:00
parent 7644d34759
commit 8343c8ce6c
138 changed files with 376 additions and 308 deletions

View File

@@ -305,7 +305,7 @@ func makeTempDirOrDie(prefix string, baseDir string) string {
func podsOnNodes(c *client.Client, podNamespace string, labelSelector labels.Selector) wait.ConditionFunc {
// Wait until all pods are running on the node.
return func() (bool, error) {
pods, err := c.Pods(podNamespace).List(labelSelector, fields.Everything())
pods, err := c.Pods(podNamespace).List(labelSelector, fields.Everything(), unversioned.ListOptions{})
if err != nil {
glog.Infof("Unable to get pods to list: %v", err)
return false, nil
@@ -431,7 +431,7 @@ containers:
namespace := kubetypes.NamespaceDefault
if err := wait.Poll(time.Second, longTestTimeout,
podRunning(c, namespace, podName)); err != nil {
if pods, err := c.Pods(namespace).List(labels.Everything(), fields.Everything()); err == nil {
if pods, err := c.Pods(namespace).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{}); err == nil {
for _, pod := range pods.Items {
glog.Infof("pod found: %s/%s", namespace, pod.Name)
}
@@ -539,7 +539,7 @@ func runSelfLinkTestOnNamespace(c *client.Client, namespace string) {
glog.Fatalf("Failed listing service with supplied self link '%v': %v", svc.SelfLink, err)
}
svcList, err := services.List(labels.Everything(), fields.Everything())
svcList, err := services.List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
if err != nil {
glog.Fatalf("Failed listing services: %v", err)
}
@@ -760,7 +760,7 @@ func runPatchTest(c *client.Client) {
func runMasterServiceTest(client *client.Client) {
time.Sleep(12 * time.Second)
svcList, err := client.Services(api.NamespaceDefault).List(labels.Everything(), fields.Everything())
svcList, err := client.Services(api.NamespaceDefault).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
if err != nil {
glog.Fatalf("Unexpected error listing services: %v", err)
}
@@ -887,7 +887,7 @@ func runServiceTest(client *client.Client) {
glog.Fatalf("FAILED: service in other namespace should have no endpoints: %v", err)
}
svcList, err := client.Services(api.NamespaceAll).List(labels.Everything(), fields.Everything())
svcList, err := client.Services(api.NamespaceAll).List(labels.Everything(), fields.Everything(), unversioned.ListOptions{})
if err != nil {
glog.Fatalf("Failed to list services across namespaces: %v", err)
}