Switch to versioned ListOptions in client.

This commit is contained in:
Wojciech Tyczynski
2015-12-10 10:39:03 +01:00
parent 4ef062c22f
commit 960808bf08
167 changed files with 602 additions and 671 deletions

View File

@@ -274,7 +274,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) {
options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{labelSelector}}
options := api.ListOptions{LabelSelector: labelSelector}
pods, err := c.Pods(podNamespace).List(options)
if err != nil {
glog.Infof("Unable to get pods to list: %v", err)
@@ -401,7 +401,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(unversioned.ListOptions{}); err == nil {
if pods, err := c.Pods(namespace).List(api.ListOptions{}); err == nil {
for _, pod := range pods.Items {
glog.Infof("pod found: %s/%s", namespace, pod.Name)
}
@@ -509,7 +509,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(unversioned.ListOptions{})
svcList, err := services.List(api.ListOptions{})
if err != nil {
glog.Fatalf("Failed listing services: %v", err)
}
@@ -730,7 +730,7 @@ func runPatchTest(c *client.Client) {
func runMasterServiceTest(client *client.Client) {
time.Sleep(12 * time.Second)
svcList, err := client.Services(api.NamespaceDefault).List(unversioned.ListOptions{})
svcList, err := client.Services(api.NamespaceDefault).List(api.ListOptions{})
if err != nil {
glog.Fatalf("Unexpected error listing services: %v", err)
}
@@ -857,7 +857,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(unversioned.ListOptions{})
svcList, err := client.Services(api.NamespaceAll).List(api.ListOptions{})
if err != nil {
glog.Fatalf("Failed to list services across namespaces: %v", err)
}