mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 10:18:13 +00:00 
			
		
		
		
	Switch to versioned ListOptions in client.
This commit is contained in:
		| @@ -274,7 +274,7 @@ func makeTempDirOrDie(prefix string, baseDir string) string { | |||||||
| func podsOnNodes(c *client.Client, podNamespace string, labelSelector labels.Selector) wait.ConditionFunc { | func podsOnNodes(c *client.Client, podNamespace string, labelSelector labels.Selector) wait.ConditionFunc { | ||||||
| 	// Wait until all pods are running on the node. | 	// Wait until all pods are running on the node. | ||||||
| 	return func() (bool, error) { | 	return func() (bool, error) { | ||||||
| 		options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{labelSelector}} | 		options := api.ListOptions{LabelSelector: labelSelector} | ||||||
| 		pods, err := c.Pods(podNamespace).List(options) | 		pods, err := c.Pods(podNamespace).List(options) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			glog.Infof("Unable to get pods to list: %v", err) | 			glog.Infof("Unable to get pods to list: %v", err) | ||||||
| @@ -401,7 +401,7 @@ containers: | |||||||
| 			namespace := kubetypes.NamespaceDefault | 			namespace := kubetypes.NamespaceDefault | ||||||
| 			if err := wait.Poll(time.Second, longTestTimeout, | 			if err := wait.Poll(time.Second, longTestTimeout, | ||||||
| 				podRunning(c, namespace, podName)); err != nil { | 				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 { | 					for _, pod := range pods.Items { | ||||||
| 						glog.Infof("pod found: %s/%s", namespace, pod.Name) | 						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) | 		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 { | 	if err != nil { | ||||||
| 		glog.Fatalf("Failed listing services: %v", err) | 		glog.Fatalf("Failed listing services: %v", err) | ||||||
| 	} | 	} | ||||||
| @@ -730,7 +730,7 @@ func runPatchTest(c *client.Client) { | |||||||
|  |  | ||||||
| func runMasterServiceTest(client *client.Client) { | func runMasterServiceTest(client *client.Client) { | ||||||
| 	time.Sleep(12 * time.Second) | 	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 { | 	if err != nil { | ||||||
| 		glog.Fatalf("Unexpected error listing services: %v", err) | 		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) | 		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 { | 	if err != nil { | ||||||
| 		glog.Fatalf("Failed to list services across namespaces: %v", err) | 		glog.Fatalf("Failed to list services across namespaces: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -520,10 +520,10 @@ func NewMockPodsListWatch(initialPodList api.PodList) *MockPodsListWatch { | |||||||
| 		list:        initialPodList, | 		list:        initialPodList, | ||||||
| 	} | 	} | ||||||
| 	lw.ListWatch = cache.ListWatch{ | 	lw.ListWatch = cache.ListWatch{ | ||||||
| 		WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 		WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 			return lw.fakeWatcher, nil | 			return lw.fakeWatcher, nil | ||||||
| 		}, | 		}, | ||||||
| 		ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 		ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 			return &lw.list, nil | 			return &lw.list, nil | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -43,7 +43,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/contrib/mesos/pkg/scheduler/podtask" | 	"k8s.io/kubernetes/contrib/mesos/pkg/scheduler/podtask" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/kubelet/container" | 	"k8s.io/kubernetes/pkg/kubelet/container" | ||||||
| 	kubetypes "k8s.io/kubernetes/pkg/kubelet/types" | 	kubetypes "k8s.io/kubernetes/pkg/kubelet/types" | ||||||
| @@ -650,7 +649,7 @@ func (k *framework) makeTaskRegistryReconciler() taskreconciler.Action { | |||||||
| // tasks identified by annotations in the Kubernetes pod registry. | // tasks identified by annotations in the Kubernetes pod registry. | ||||||
| func (k *framework) makePodRegistryReconciler() taskreconciler.Action { | func (k *framework) makePodRegistryReconciler() taskreconciler.Action { | ||||||
| 	return taskreconciler.Action(func(drv bindings.SchedulerDriver, cancel <-chan struct{}) <-chan error { | 	return taskreconciler.Action(func(drv bindings.SchedulerDriver, cancel <-chan struct{}) <-chan error { | ||||||
| 		podList, err := k.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{}) | 		podList, err := k.client.Pods(api.NamespaceAll).List(api.ListOptions{}) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return proc.ErrorChanf("failed to reconcile pod registry: %v", err) | 			return proc.ErrorChanf("failed to reconcile pod registry: %v", err) | ||||||
| 		} | 		} | ||||||
| @@ -726,7 +725,7 @@ func (k *framework) explicitlyReconcileTasks(driver bindings.SchedulerDriver, ta | |||||||
| } | } | ||||||
|  |  | ||||||
| func (ks *framework) recoverTasks() error { | func (ks *framework) recoverTasks() error { | ||||||
| 	podList, err := ks.client.Pods(api.NamespaceAll).List(unversioned.ListOptions{}) | 	podList, err := ks.client.Pods(api.NamespaceAll).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		log.V(1).Infof("failed to recover pod registry, madness may ensue: %v", err) | 		log.V(1).Infof("failed to recover pod registry, madness may ensue: %v", err) | ||||||
| 		return err | 		return err | ||||||
|   | |||||||
| @@ -170,10 +170,10 @@ func NewMockPodsListWatch(initialPodList api.PodList) *MockPodsListWatch { | |||||||
| 		list:        initialPodList, | 		list:        initialPodList, | ||||||
| 	} | 	} | ||||||
| 	lw.ListWatch = cache.ListWatch{ | 	lw.ListWatch = cache.ListWatch{ | ||||||
| 		WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 		WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 			return lw.fakeWatcher, nil | 			return lw.fakeWatcher, nil | ||||||
| 		}, | 		}, | ||||||
| 		ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 		ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 			lw.lock.Lock() | 			lw.lock.Lock() | ||||||
| 			defer lw.lock.Unlock() | 			defer lw.lock.Unlock() | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/endpoints" | 	"k8s.io/kubernetes/pkg/api/endpoints" | ||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	kservice "k8s.io/kubernetes/pkg/controller/endpoint" | 	kservice "k8s.io/kubernetes/pkg/controller/endpoint" | ||||||
| @@ -58,10 +57,10 @@ func NewEndpointController(client *client.Client) *endpointController { | |||||||
| 	} | 	} | ||||||
| 	e.serviceStore.Store, e.serviceController = framework.NewInformer( | 	e.serviceStore.Store, e.serviceController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.Services(api.NamespaceAll).List(options) | 				return e.client.Services(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.Services(api.NamespaceAll).Watch(options) | 				return e.client.Services(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -78,10 +77,10 @@ func NewEndpointController(client *client.Client) *endpointController { | |||||||
|  |  | ||||||
| 	e.podStore.Store, e.podController = framework.NewInformer( | 	e.podStore.Store, e.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.Pods(api.NamespaceAll).List(options) | 				return e.client.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.Pods(api.NamespaceAll).Watch(options) | 				return e.client.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -385,7 +384,7 @@ func (e *endpointController) syncService(key string) { | |||||||
| // some stragglers could have been left behind if the endpoint controller | // some stragglers could have been left behind if the endpoint controller | ||||||
| // reboots). | // reboots). | ||||||
| func (e *endpointController) checkLeftoverEndpoints() { | func (e *endpointController) checkLeftoverEndpoints() { | ||||||
| 	list, err := e.client.Endpoints(api.NamespaceAll).List(unversioned.ListOptions{}) | 	list, err := e.client.Endpoints(api.NamespaceAll).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		glog.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err) | 		glog.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err) | ||||||
| 		return | 		return | ||||||
|   | |||||||
| @@ -31,6 +31,14 @@ var Codec = runtime.CodecFor(Scheme, "") | |||||||
|  |  | ||||||
| func init() { | func init() { | ||||||
| 	Scheme.AddDefaultingFuncs( | 	Scheme.AddDefaultingFuncs( | ||||||
|  | 		func(obj *ListOptions) { | ||||||
|  | 			if obj.LabelSelector == nil { | ||||||
|  | 				obj.LabelSelector = labels.Everything() | ||||||
|  | 			} | ||||||
|  | 			if obj.FieldSelector == nil { | ||||||
|  | 				obj.FieldSelector = fields.Everything() | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
| 		func(obj *unversioned.ListOptions) { | 		func(obj *unversioned.ListOptions) { | ||||||
| 			if obj.LabelSelector.Selector == nil { | 			if obj.LabelSelector.Selector == nil { | ||||||
| 				obj.LabelSelector = unversioned.LabelSelector{labels.Everything()} | 				obj.LabelSelector = unversioned.LabelSelector{labels.Everything()} | ||||||
|   | |||||||
| @@ -71,6 +71,7 @@ func init() { | |||||||
| 		&PersistentVolumeClaim{}, | 		&PersistentVolumeClaim{}, | ||||||
| 		&PersistentVolumeClaimList{}, | 		&PersistentVolumeClaimList{}, | ||||||
| 		&DeleteOptions{}, | 		&DeleteOptions{}, | ||||||
|  | 		&ListOptions{}, | ||||||
| 		&PodAttachOptions{}, | 		&PodAttachOptions{}, | ||||||
| 		&PodLogOptions{}, | 		&PodLogOptions{}, | ||||||
| 		&PodExecOptions{}, | 		&PodExecOptions{}, | ||||||
| @@ -83,7 +84,6 @@ func init() { | |||||||
|  |  | ||||||
| 	// Register Unversioned types | 	// Register Unversioned types | ||||||
| 	// TODO this should not be done here | 	// TODO this should not be done here | ||||||
| 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.ListOptions{}) |  | ||||||
| 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.Status{}) | 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.Status{}) | ||||||
| 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.APIVersions{}) | 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.APIVersions{}) | ||||||
| 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.APIGroupList{}) | 	Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.APIGroupList{}) | ||||||
| @@ -123,6 +123,7 @@ func (*PersistentVolumeList) IsAnAPIObject()      {} | |||||||
| func (*PersistentVolumeClaim) IsAnAPIObject()     {} | func (*PersistentVolumeClaim) IsAnAPIObject()     {} | ||||||
| func (*PersistentVolumeClaimList) IsAnAPIObject() {} | func (*PersistentVolumeClaimList) IsAnAPIObject() {} | ||||||
| func (*DeleteOptions) IsAnAPIObject()             {} | func (*DeleteOptions) IsAnAPIObject()             {} | ||||||
|  | func (*ListOptions) IsAnAPIObject()               {} | ||||||
| func (*PodAttachOptions) IsAnAPIObject()          {} | func (*PodAttachOptions) IsAnAPIObject()          {} | ||||||
| func (*PodLogOptions) IsAnAPIObject()             {} | func (*PodLogOptions) IsAnAPIObject()             {} | ||||||
| func (*PodExecOptions) IsAnAPIObject()            {} | func (*PodExecOptions) IsAnAPIObject()            {} | ||||||
|   | |||||||
| @@ -97,6 +97,12 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer { | |||||||
| 			j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) | 			j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) | ||||||
| 			j.SelfLink = c.RandString() | 			j.SelfLink = c.RandString() | ||||||
| 		}, | 		}, | ||||||
|  | 		func(j *api.ListOptions, c fuzz.Continue) { | ||||||
|  | 			label, _ := labels.Parse("a=b") | ||||||
|  | 			j.LabelSelector = label | ||||||
|  | 			field, _ := fields.ParseSelector("a=b") | ||||||
|  | 			j.FieldSelector = field | ||||||
|  | 		}, | ||||||
| 		func(j *unversioned.ListOptions, c fuzz.Continue) { | 		func(j *unversioned.ListOptions, c fuzz.Continue) { | ||||||
| 			// TODO: add some parsing | 			// TODO: add some parsing | ||||||
| 			label, _ := labels.Parse("a=b") | 			label, _ := labels.Parse("a=b") | ||||||
|   | |||||||
| @@ -19,6 +19,8 @@ package api | |||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" | 	"k8s.io/kubernetes/pkg/api/unversioned" | ||||||
|  | 	"k8s.io/kubernetes/pkg/fields" | ||||||
|  | 	"k8s.io/kubernetes/pkg/labels" | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| 	"k8s.io/kubernetes/pkg/types" | 	"k8s.io/kubernetes/pkg/types" | ||||||
| 	"k8s.io/kubernetes/pkg/util/intstr" | 	"k8s.io/kubernetes/pkg/util/intstr" | ||||||
| @@ -1647,6 +1649,23 @@ type DeleteOptions struct { | |||||||
| 	GracePeriodSeconds *int64 `json:"gracePeriodSeconds"` | 	GracePeriodSeconds *int64 `json:"gracePeriodSeconds"` | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // ListOptions is the query options to a standard REST list call, and has future support for | ||||||
|  | // watch calls. | ||||||
|  | type ListOptions struct { | ||||||
|  | 	unversioned.TypeMeta `json:",inline"` | ||||||
|  |  | ||||||
|  | 	// A selector based on labels | ||||||
|  | 	LabelSelector labels.Selector | ||||||
|  | 	// A selector based on fields | ||||||
|  | 	FieldSelector fields.Selector | ||||||
|  | 	// If true, watch for changes to this list | ||||||
|  | 	Watch bool | ||||||
|  | 	// The resource version to watch (no effect on list yet) | ||||||
|  | 	ResourceVersion string | ||||||
|  | 	// Timeout for the list/watch call. | ||||||
|  | 	TimeoutSeconds *int64 | ||||||
|  | } | ||||||
|  |  | ||||||
| // PodLogOptions is the query options for a Pod's logs REST call | // PodLogOptions is the query options for a Pod's logs REST call | ||||||
| type PodLogOptions struct { | type PodLogOptions struct { | ||||||
| 	unversioned.TypeMeta | 	unversioned.TypeMeta | ||||||
|   | |||||||
| @@ -61,11 +61,8 @@ func addKnownTypes() { | |||||||
| 		&ThirdPartyResourceDataList{}, | 		&ThirdPartyResourceDataList{}, | ||||||
| 		&Ingress{}, | 		&Ingress{}, | ||||||
| 		&IngressList{}, | 		&IngressList{}, | ||||||
|  | 		&api.ListOptions{}, | ||||||
| 	) | 	) | ||||||
|  |  | ||||||
| 	// Register Unversioned types |  | ||||||
| 	// TODO this should not be done here |  | ||||||
| 	api.Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.ListOptions{}) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| func (*ClusterAutoscaler) IsAnAPIObject()           {} | func (*ClusterAutoscaler) IsAnAPIObject()           {} | ||||||
|   | |||||||
| @@ -54,11 +54,8 @@ func addKnownTypes() { | |||||||
| 		&ThirdPartyResourceDataList{}, | 		&ThirdPartyResourceDataList{}, | ||||||
| 		&Ingress{}, | 		&Ingress{}, | ||||||
| 		&IngressList{}, | 		&IngressList{}, | ||||||
|  | 		&ListOptions{}, | ||||||
| 	) | 	) | ||||||
|  |  | ||||||
| 	// Register Unversioned types |  | ||||||
| 	// TODO this should not be done here |  | ||||||
| 	api.Scheme.AddKnownTypes(SchemeGroupVersion, &unversioned.ListOptions{}) |  | ||||||
| } | } | ||||||
|  |  | ||||||
| func (*ClusterAutoscaler) IsAnAPIObject()           {} | func (*ClusterAutoscaler) IsAnAPIObject()           {} | ||||||
| @@ -79,3 +76,4 @@ func (*ThirdPartyResourceData) IsAnAPIObject()      {} | |||||||
| func (*ThirdPartyResourceDataList) IsAnAPIObject()  {} | func (*ThirdPartyResourceDataList) IsAnAPIObject()  {} | ||||||
| func (*Ingress) IsAnAPIObject()                     {} | func (*Ingress) IsAnAPIObject()                     {} | ||||||
| func (*IngressList) IsAnAPIObject()                 {} | func (*IngressList) IsAnAPIObject()                 {} | ||||||
|  | func (*ListOptions) IsAnAPIObject()                 {} | ||||||
|   | |||||||
| @@ -663,6 +663,26 @@ type ClusterAutoscalerList struct { | |||||||
| 	Items []ClusterAutoscaler `json:"items"` | 	Items []ClusterAutoscaler `json:"items"` | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // ListOptions is the query options to a standard REST list call. | ||||||
|  | type ListOptions struct { | ||||||
|  | 	unversioned.TypeMeta `json:",inline"` | ||||||
|  |  | ||||||
|  | 	// A selector to restrict the list of returned objects by their labels. | ||||||
|  | 	// Defaults to everything. | ||||||
|  | 	LabelSelector string `json:"labelSelector,omitempty"` | ||||||
|  | 	// A selector to restrict the list of returned objects by their fields. | ||||||
|  | 	// Defaults to everything. | ||||||
|  | 	FieldSelector string `json:"fieldSelector,omitempty"` | ||||||
|  | 	// Watch for changes to the described resources and return them as a stream of | ||||||
|  | 	// add, update, and remove notifications. Specify resourceVersion. | ||||||
|  | 	Watch bool `json:"watch,omitempty"` | ||||||
|  | 	// When specified with a watch call, shows changes that occur after that particular version of a resource. | ||||||
|  | 	// Defaults to changes from the beginning of history. | ||||||
|  | 	ResourceVersion string `json:"resourceVersion,omitempty"` | ||||||
|  | 	// Timeout for the list/watch call. | ||||||
|  | 	TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"` | ||||||
|  | } | ||||||
|  |  | ||||||
| // A label selector is a label query over a set of resources. The result of matchLabels and | // A label selector is a label query over a set of resources. The result of matchLabels and | ||||||
| // matchExpressions are ANDed. An empty label selector matches all objects. A null | // matchExpressions are ANDed. An empty label selector matches all objects. A null | ||||||
| // label selector matches no objects. | // label selector matches no objects. | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								pkg/client/cache/listwatch.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								pkg/client/cache/listwatch.go
									
									
									
									
										vendored
									
									
								
							| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/fields" | 	"k8s.io/kubernetes/pkg/fields" | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| @@ -28,10 +27,10 @@ import ( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| // ListFunc knows how to list resources | // ListFunc knows how to list resources | ||||||
| type ListFunc func(options unversioned.ListOptions) (runtime.Object, error) | type ListFunc func(options api.ListOptions) (runtime.Object, error) | ||||||
|  |  | ||||||
| // WatchFunc knows how to watch resources | // WatchFunc knows how to watch resources | ||||||
| type WatchFunc func(options unversioned.ListOptions) (watch.Interface, error) | type WatchFunc func(options api.ListOptions) (watch.Interface, error) | ||||||
|  |  | ||||||
| // ListWatch knows how to list and watch a set of apiserver resources.  It satisfies the ListerWatcher interface. | // ListWatch knows how to list and watch a set of apiserver resources.  It satisfies the ListerWatcher interface. | ||||||
| // It is a convenience function for users of NewReflector, etc. | // It is a convenience function for users of NewReflector, etc. | ||||||
| @@ -48,7 +47,7 @@ type Getter interface { | |||||||
|  |  | ||||||
| // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. | // NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. | ||||||
| func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { | func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { | ||||||
| 	listFunc := func(options unversioned.ListOptions) (runtime.Object, error) { | 	listFunc := func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 		return c.Get(). | 		return c.Get(). | ||||||
| 			Namespace(namespace). | 			Namespace(namespace). | ||||||
| 			Resource(resource). | 			Resource(resource). | ||||||
| @@ -57,7 +56,7 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe | |||||||
| 			Do(). | 			Do(). | ||||||
| 			Get() | 			Get() | ||||||
| 	} | 	} | ||||||
| 	watchFunc := func(options unversioned.ListOptions) (watch.Interface, error) { | 	watchFunc := func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 		return c.Get(). | 		return c.Get(). | ||||||
| 			Prefix("watch"). | 			Prefix("watch"). | ||||||
| 			Namespace(namespace). | 			Namespace(namespace). | ||||||
| @@ -69,7 +68,7 @@ func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSe | |||||||
| 	return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} | 	return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} | ||||||
| } | } | ||||||
|  |  | ||||||
| func timeoutFromListOptions(options unversioned.ListOptions) time.Duration { | func timeoutFromListOptions(options api.ListOptions) time.Duration { | ||||||
| 	if options.TimeoutSeconds != nil { | 	if options.TimeoutSeconds != nil { | ||||||
| 		return time.Duration(*options.TimeoutSeconds) * time.Second | 		return time.Duration(*options.TimeoutSeconds) * time.Second | ||||||
| 	} | 	} | ||||||
| @@ -77,11 +76,11 @@ func timeoutFromListOptions(options unversioned.ListOptions) time.Duration { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List a set of apiserver resources | // List a set of apiserver resources | ||||||
| func (lw *ListWatch) List(options unversioned.ListOptions) (runtime.Object, error) { | func (lw *ListWatch) List(options api.ListOptions) (runtime.Object, error) { | ||||||
| 	return lw.ListFunc(options) | 	return lw.ListFunc(options) | ||||||
| } | } | ||||||
|  |  | ||||||
| // Watch a set of apiserver resources | // Watch a set of apiserver resources | ||||||
| func (lw *ListWatch) Watch(options unversioned.ListOptions) (watch.Interface, error) { | func (lw *ListWatch) Watch(options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return lw.WatchFunc(options) | 	return lw.WatchFunc(options) | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								pkg/client/cache/listwatch_test.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								pkg/client/cache/listwatch_test.go
									
									
									
									
										vendored
									
									
								
							| @@ -99,7 +99,7 @@ func TestListWatchesCanList(t *testing.T) { | |||||||
| 		client := client.NewOrDie(&client.Config{Host: server.URL, GroupVersion: testapi.Default.GroupVersion()}) | 		client := client.NewOrDie(&client.Config{Host: server.URL, GroupVersion: testapi.Default.GroupVersion()}) | ||||||
| 		lw := NewListWatchFromClient(client, item.resource, item.namespace, item.fieldSelector) | 		lw := NewListWatchFromClient(client, item.resource, item.namespace, item.fieldSelector) | ||||||
| 		// This test merely tests that the correct request is made. | 		// This test merely tests that the correct request is made. | ||||||
| 		lw.List(unversioned.ListOptions{}) | 		lw.List(api.ListOptions{}) | ||||||
| 		handler.ValidateRequest(t, item.location, "GET", nil) | 		handler.ValidateRequest(t, item.location, "GET", nil) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| @@ -165,7 +165,7 @@ func TestListWatchesCanWatch(t *testing.T) { | |||||||
| 		client := client.NewOrDie(&client.Config{Host: server.URL, GroupVersion: testapi.Default.GroupVersion()}) | 		client := client.NewOrDie(&client.Config{Host: server.URL, GroupVersion: testapi.Default.GroupVersion()}) | ||||||
| 		lw := NewListWatchFromClient(client, item.resource, item.namespace, item.fieldSelector) | 		lw := NewListWatchFromClient(client, item.resource, item.namespace, item.fieldSelector) | ||||||
| 		// This test merely tests that the correct request is made. | 		// This test merely tests that the correct request is made. | ||||||
| 		lw.Watch(unversioned.ListOptions{ResourceVersion: item.rv}) | 		lw.Watch(api.ListOptions{ResourceVersion: item.rv}) | ||||||
| 		handler.ValidateRequest(t, item.location, "GET", nil) | 		handler.ValidateRequest(t, item.location, "GET", nil) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								pkg/client/cache/reflector.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								pkg/client/cache/reflector.go
									
									
									
									
										vendored
									
									
								
							| @@ -31,9 +31,9 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
|  | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	apierrs "k8s.io/kubernetes/pkg/api/errors" | 	apierrs "k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/meta" | 	"k8s.io/kubernetes/pkg/api/meta" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| 	"k8s.io/kubernetes/pkg/util" | 	"k8s.io/kubernetes/pkg/util" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -43,9 +43,9 @@ import ( | |||||||
| type ListerWatcher interface { | type ListerWatcher interface { | ||||||
| 	// List should return a list type object; the Items field will be extracted, and the | 	// List should return a list type object; the Items field will be extracted, and the | ||||||
| 	// ResourceVersion field will be used to start the watch in the right place. | 	// ResourceVersion field will be used to start the watch in the right place. | ||||||
| 	List(options unversioned.ListOptions) (runtime.Object, error) | 	List(options api.ListOptions) (runtime.Object, error) | ||||||
| 	// Watch should begin a watch at the specified version. | 	// Watch should begin a watch at the specified version. | ||||||
| 	Watch(options unversioned.ListOptions) (watch.Interface, error) | 	Watch(options api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // Reflector watches a specified resource and causes all changes to be reflected in the given store. | // Reflector watches a specified resource and causes all changes to be reflected in the given store. | ||||||
| @@ -230,7 +230,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { | |||||||
| 	// Explicitly set "0" as resource version - it's fine for the List() | 	// Explicitly set "0" as resource version - it's fine for the List() | ||||||
| 	// to be served from cache and potentially be delayed relative to | 	// to be served from cache and potentially be delayed relative to | ||||||
| 	// etcd contents. Reflector framework will catch up via Watch() eventually. | 	// etcd contents. Reflector framework will catch up via Watch() eventually. | ||||||
| 	options := unversioned.ListOptions{ResourceVersion: "0"} | 	options := api.ListOptions{ResourceVersion: "0"} | ||||||
| 	list, err := r.listerWatcher.List(options) | 	list, err := r.listerWatcher.List(options) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) | 		return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) | ||||||
| @@ -250,7 +250,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { | |||||||
| 	r.setLastSyncResourceVersion(resourceVersion) | 	r.setLastSyncResourceVersion(resourceVersion) | ||||||
|  |  | ||||||
| 	for { | 	for { | ||||||
| 		options := unversioned.ListOptions{ | 		options := api.ListOptions{ | ||||||
| 			ResourceVersion: resourceVersion, | 			ResourceVersion: resourceVersion, | ||||||
| 			// We want to avoid situations when resyncing is breaking the TCP connection | 			// We want to avoid situations when resyncing is breaking the TCP connection | ||||||
| 			// - see comment for 'timeoutForWatch()' for more details. | 			// - see comment for 'timeoutForWatch()' for more details. | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								pkg/client/cache/reflector_test.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								pkg/client/cache/reflector_test.go
									
									
									
									
										vendored
									
									
								
							| @@ -35,10 +35,10 @@ type testLW struct { | |||||||
| 	WatchFunc func(resourceVersion string) (watch.Interface, error) | 	WatchFunc func(resourceVersion string) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (t *testLW) List(options unversioned.ListOptions) (runtime.Object, error) { | func (t *testLW) List(options api.ListOptions) (runtime.Object, error) { | ||||||
| 	return t.ListFunc() | 	return t.ListFunc() | ||||||
| } | } | ||||||
| func (t *testLW) Watch(options unversioned.ListOptions) (watch.Interface, error) { | func (t *testLW) Watch(options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return t.WatchFunc(options.ResourceVersion) | 	return t.WatchFunc(options.ResourceVersion) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| type ComponentStatusesInterface interface { | type ComponentStatusesInterface interface { | ||||||
| @@ -27,11 +26,11 @@ type ComponentStatusesInterface interface { | |||||||
|  |  | ||||||
| // ComponentStatusInterface contains methods to retrieve ComponentStatus | // ComponentStatusInterface contains methods to retrieve ComponentStatus | ||||||
| type ComponentStatusInterface interface { | type ComponentStatusInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.ComponentStatusList, error) | 	List(opts api.ListOptions) (*api.ComponentStatusList, error) | ||||||
| 	Get(name string) (*api.ComponentStatus, error) | 	Get(name string) (*api.ComponentStatus, error) | ||||||
|  |  | ||||||
| 	// TODO: It'd be nice to have watch support at some point | 	// TODO: It'd be nice to have watch support at some point | ||||||
| 	//Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	//Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // componentStatuses implements ComponentStatusesInterface | // componentStatuses implements ComponentStatusesInterface | ||||||
| @@ -43,7 +42,7 @@ func newComponentStatuses(c *Client) *componentStatuses { | |||||||
| 	return &componentStatuses{c} | 	return &componentStatuses{c} | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *componentStatuses) List(opts unversioned.ListOptions) (result *api.ComponentStatusList, err error) { | func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) { | ||||||
| 	result = &api.ComponentStatusList{} | 	result = &api.ComponentStatusList{} | ||||||
| 	err = c.client.Get(). | 	err = c.client.Get(). | ||||||
| 		Resource("componentStatuses"). | 		Resource("componentStatuses"). | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -29,13 +28,13 @@ type DaemonSetsNamespacer interface { | |||||||
| } | } | ||||||
|  |  | ||||||
| type DaemonSetInterface interface { | type DaemonSetInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.DaemonSetList, error) | 	List(opts api.ListOptions) (*extensions.DaemonSetList, error) | ||||||
| 	Get(name string) (*extensions.DaemonSet, error) | 	Get(name string) (*extensions.DaemonSet, error) | ||||||
| 	Create(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | 	Create(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | ||||||
| 	Update(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | 	Update(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | ||||||
| 	UpdateStatus(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | 	UpdateStatus(ctrl *extensions.DaemonSet) (*extensions.DaemonSet, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // daemonSets implements DaemonsSetsNamespacer interface | // daemonSets implements DaemonsSetsNamespacer interface | ||||||
| @@ -51,7 +50,7 @@ func newDaemonSets(c *ExtensionsClient, namespace string) *daemonSets { | |||||||
| // Ensure statically that daemonSets implements DaemonSetsInterface. | // Ensure statically that daemonSets implements DaemonSetsInterface. | ||||||
| var _ DaemonSetInterface = &daemonSets{} | var _ DaemonSetInterface = &daemonSets{} | ||||||
|  |  | ||||||
| func (c *daemonSets) List(opts unversioned.ListOptions) (result *extensions.DaemonSetList, err error) { | func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) { | ||||||
| 	result = &extensions.DaemonSetList{} | 	result = &extensions.DaemonSetList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("daemonsets").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("daemonsets").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -91,7 +90,7 @@ func (c *daemonSets) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested daemon sets. | // Watch returns a watch.Interface that watches the requested daemon sets. | ||||||
| func (c *daemonSets) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -60,7 +59,7 @@ func TestListDaemonSets(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedDSs, err := c.Setup(t).Extensions().DaemonSets(ns).List(unversioned.ListOptions{}) | 	receivedDSs, err := c.Setup(t).Extensions().DaemonSets(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedDSs, err) | 	c.Validate(t, receivedDSs, err) | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -30,13 +29,13 @@ type DeploymentsNamespacer interface { | |||||||
|  |  | ||||||
| // DeploymentInterface has methods to work with Deployment resources. | // DeploymentInterface has methods to work with Deployment resources. | ||||||
| type DeploymentInterface interface { | type DeploymentInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.DeploymentList, error) | 	List(opts api.ListOptions) (*extensions.DeploymentList, error) | ||||||
| 	Get(name string) (*extensions.Deployment, error) | 	Get(name string) (*extensions.Deployment, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Create(*extensions.Deployment) (*extensions.Deployment, error) | 	Create(*extensions.Deployment) (*extensions.Deployment, error) | ||||||
| 	Update(*extensions.Deployment) (*extensions.Deployment, error) | 	Update(*extensions.Deployment) (*extensions.Deployment, error) | ||||||
| 	UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error) | 	UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // deployments implements DeploymentInterface | // deployments implements DeploymentInterface | ||||||
| @@ -54,7 +53,7 @@ func newDeployments(c *ExtensionsClient, namespace string) *deployments { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes label and field selectors, and returns the list of Deployments that match those selectors. | // List takes label and field selectors, and returns the list of Deployments that match those selectors. | ||||||
| func (c *deployments) List(opts unversioned.ListOptions) (result *extensions.DeploymentList, err error) { | func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) { | ||||||
| 	result = &extensions.DeploymentList{} | 	result = &extensions.DeploymentList{} | ||||||
| 	err = c.client.Get().Namespace(c.ns).Resource("deployments").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.client.Get().Namespace(c.ns).Resource("deployments").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -100,7 +99,7 @@ func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *e | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested deployments. | // Watch returns a watch.Interface that watches the requested deployments. | ||||||
| func (c *deployments) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.Get(). | 	return c.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -105,7 +105,7 @@ func TestDeploymentList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: deploymentList}, | 		Response: simple.Response{StatusCode: 200, Body: deploymentList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).Deployments(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).Deployments(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -174,7 +174,7 @@ func TestDeploymentWatch(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).Deployments(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).Deployments(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -205,7 +205,7 @@ func TestListDeploymentsLabels(t *testing.T) { | |||||||
| 	c.Setup(t) | 	c.Setup(t) | ||||||
| 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | ||||||
| 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | ||||||
| 	options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{selector}} | 	options := api.ListOptions{LabelSelector: selector} | ||||||
| 	receivedPodList, err := c.Deployments(ns).List(options) | 	receivedPodList, err := c.Deployments(ns).List(options) | ||||||
| 	c.Validate(t, receivedPodList, err) | 	c.Validate(t, receivedPodList, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -32,11 +31,11 @@ type EndpointsNamespacer interface { | |||||||
| // EndpointsInterface has methods to work with Endpoints resources | // EndpointsInterface has methods to work with Endpoints resources | ||||||
| type EndpointsInterface interface { | type EndpointsInterface interface { | ||||||
| 	Create(endpoints *api.Endpoints) (*api.Endpoints, error) | 	Create(endpoints *api.Endpoints) (*api.Endpoints, error) | ||||||
| 	List(opts unversioned.ListOptions) (*api.EndpointsList, error) | 	List(opts api.ListOptions) (*api.EndpointsList, error) | ||||||
| 	Get(name string) (*api.Endpoints, error) | 	Get(name string) (*api.Endpoints, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Update(endpoints *api.Endpoints) (*api.Endpoints, error) | 	Update(endpoints *api.Endpoints) (*api.Endpoints, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // endpoints implements EndpointsInterface | // endpoints implements EndpointsInterface | ||||||
| @@ -58,7 +57,7 @@ func (c *endpoints) Create(endpoints *api.Endpoints) (*api.Endpoints, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of endpoints that match that selector | // List takes a selector, and returns the list of endpoints that match that selector | ||||||
| func (c *endpoints) List(opts unversioned.ListOptions) (result *api.EndpointsList, err error) { | func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) { | ||||||
| 	result = &api.EndpointsList{} | 	result = &api.EndpointsList{} | ||||||
| 	err = c.r.Get(). | 	err = c.r.Get(). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
| @@ -82,7 +81,7 @@ func (c *endpoints) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested endpoints for a service. | // Watch returns a watch.Interface that watches the requested endpoints for a service. | ||||||
| func (c *endpoints) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestListEndpoints(t *testing.T) { | func TestListEndpoints(t *testing.T) { | ||||||
| @@ -47,7 +46,7 @@ func TestListEndpoints(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedEndpointsList, err := c.Setup(t).Endpoints(ns).List(unversioned.ListOptions{}) | 	receivedEndpointsList, err := c.Setup(t).Endpoints(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedEndpointsList, err) | 	c.Validate(t, receivedEndpointsList, err) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/fields" | 	"k8s.io/kubernetes/pkg/fields" | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -36,14 +35,14 @@ type EventInterface interface { | |||||||
| 	Create(event *api.Event) (*api.Event, error) | 	Create(event *api.Event) (*api.Event, error) | ||||||
| 	Update(event *api.Event) (*api.Event, error) | 	Update(event *api.Event) (*api.Event, error) | ||||||
| 	Patch(event *api.Event, data []byte) (*api.Event, error) | 	Patch(event *api.Event, data []byte) (*api.Event, error) | ||||||
| 	List(opts unversioned.ListOptions) (*api.EventList, error) | 	List(opts api.ListOptions) (*api.EventList, error) | ||||||
| 	Get(name string) (*api.Event, error) | 	Get(name string) (*api.Event, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	// Search finds events about the specified object | 	// Search finds events about the specified object | ||||||
| 	Search(objOrRef runtime.Object) (*api.EventList, error) | 	Search(objOrRef runtime.Object) (*api.EventList, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	// DeleteCollection deletes a collection of events. | 	// DeleteCollection deletes a collection of events. | ||||||
| 	DeleteCollection(options *api.DeleteOptions, listOptions unversioned.ListOptions) error | 	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error | ||||||
| 	// Returns the appropriate field selector based on the API version being used to communicate with the server. | 	// Returns the appropriate field selector based on the API version being used to communicate with the server. | ||||||
| 	// The returned field selector can be used with List and Watch to filter desired events. | 	// The returned field selector can be used with List and Watch to filter desired events. | ||||||
| 	GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector | 	GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector | ||||||
| @@ -118,7 +117,7 @@ func (e *events) Patch(incompleteEvent *api.Event, data []byte) (*api.Event, err | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list of events matching the selectors. | // List returns a list of events matching the selectors. | ||||||
| func (e *events) List(opts unversioned.ListOptions) (*api.EventList, error) { | func (e *events) List(opts api.ListOptions) (*api.EventList, error) { | ||||||
| 	result := &api.EventList{} | 	result := &api.EventList{} | ||||||
| 	err := e.client.Get(). | 	err := e.client.Get(). | ||||||
| 		NamespaceIfScoped(e.namespace, len(e.namespace) > 0). | 		NamespaceIfScoped(e.namespace, len(e.namespace) > 0). | ||||||
| @@ -142,7 +141,7 @@ func (e *events) Get(name string) (*api.Event, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch starts watching for events matching the given selectors. | // Watch starts watching for events matching the given selectors. | ||||||
| func (e *events) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (e *events) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return e.client.Get(). | 	return e.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		NamespaceIfScoped(e.namespace, len(e.namespace) > 0). | 		NamespaceIfScoped(e.namespace, len(e.namespace) > 0). | ||||||
| @@ -173,7 +172,7 @@ func (e *events) Search(objOrRef runtime.Object) (*api.EventList, error) { | |||||||
| 		refUID = &stringRefUID | 		refUID = &stringRefUID | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) | 	fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) | ||||||
| 	return e.List(unversioned.ListOptions{FieldSelector: unversioned.FieldSelector{fieldSelector}}) | 	return e.List(api.ListOptions{FieldSelector: fieldSelector}) | ||||||
| } | } | ||||||
|  |  | ||||||
| // Delete deletes an existing event. | // Delete deletes an existing event. | ||||||
| @@ -187,7 +186,7 @@ func (e *events) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // DeleteCollection deletes a collection of objects. | // DeleteCollection deletes a collection of objects. | ||||||
| func (e *events) DeleteCollection(options *api.DeleteOptions, listOptions unversioned.ListOptions) error { | func (e *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { | ||||||
| 	// TODO: to make this reusable in other client libraries | 	// TODO: to make this reusable in other client libraries | ||||||
| 	if options == nil { | 	if options == nil { | ||||||
| 		return e.client.Delete(). | 		return e.client.Delete(). | ||||||
|   | |||||||
| @@ -169,7 +169,7 @@ func TestEventList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: eventList}, | 		Response: simple.Response{StatusCode: 200, Body: eventList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).Events(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).Events(ns).List(api.ListOptions{}) | ||||||
|  |  | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Errorf("%#v should be nil.", err) | 		t.Errorf("%#v should be nil.", err) | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -30,13 +29,13 @@ type HorizontalPodAutoscalersNamespacer interface { | |||||||
|  |  | ||||||
| // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. | // HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources. | ||||||
| type HorizontalPodAutoscalerInterface interface { | type HorizontalPodAutoscalerInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) | 	List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) | ||||||
| 	Get(name string) (*extensions.HorizontalPodAutoscaler, error) | 	Get(name string) (*extensions.HorizontalPodAutoscaler, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | 	Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | ||||||
| 	Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | 	Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | ||||||
| 	UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | 	UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface | // horizontalPodAutoscalers implements HorizontalPodAutoscalersNamespacer interface | ||||||
| @@ -54,7 +53,7 @@ func newHorizontalPodAutoscalers(c *ExtensionsClient, namespace string) *horizon | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes label and field selectors, and returns the list of horizontalPodAutoscalers that match those selectors. | // List takes label and field selectors, and returns the list of horizontalPodAutoscalers that match those selectors. | ||||||
| func (c *horizontalPodAutoscalers) List(opts unversioned.ListOptions) (result *extensions.HorizontalPodAutoscalerList, err error) { | func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *extensions.HorizontalPodAutoscalerList, err error) { | ||||||
| 	result = &extensions.HorizontalPodAutoscalerList{} | 	result = &extensions.HorizontalPodAutoscalerList{} | ||||||
| 	err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.client.Get().Namespace(c.ns).Resource("horizontalPodAutoscalers").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -102,7 +101,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensi | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. | // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. | ||||||
| func (c *horizontalPodAutoscalers) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.Get(). | 	return c.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -103,7 +102,7 @@ func TestHorizontalPodAutoscalerList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: horizontalPodAutoscalerList}, | 		Response: simple.Response{StatusCode: 200, Body: horizontalPodAutoscalerList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).Extensions().HorizontalPodAutoscalers(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).Extensions().HorizontalPodAutoscalers(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -159,6 +158,6 @@ func TestHorizontalPodAutoscalerWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).Extensions().HorizontalPodAutoscalers(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).Extensions().HorizontalPodAutoscalers(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -30,12 +29,12 @@ type IngressNamespacer interface { | |||||||
|  |  | ||||||
| // IngressInterface exposes methods to work on Ingress resources. | // IngressInterface exposes methods to work on Ingress resources. | ||||||
| type IngressInterface interface { | type IngressInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.IngressList, error) | 	List(opts api.ListOptions) (*extensions.IngressList, error) | ||||||
| 	Get(name string) (*extensions.Ingress, error) | 	Get(name string) (*extensions.Ingress, error) | ||||||
| 	Create(ingress *extensions.Ingress) (*extensions.Ingress, error) | 	Create(ingress *extensions.Ingress) (*extensions.Ingress, error) | ||||||
| 	Update(ingress *extensions.Ingress) (*extensions.Ingress, error) | 	Update(ingress *extensions.Ingress) (*extensions.Ingress, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error) | 	UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -51,7 +50,7 @@ func newIngress(c *ExtensionsClient, namespace string) *ingress { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list of ingress that match the label and field selectors. | // List returns a list of ingress that match the label and field selectors. | ||||||
| func (c *ingress) List(opts unversioned.ListOptions) (result *extensions.IngressList, err error) { | func (c *ingress) List(opts api.ListOptions) (result *extensions.IngressList, err error) { | ||||||
| 	result = &extensions.IngressList{} | 	result = &extensions.IngressList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("ingresses").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("ingresses").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -92,7 +91,7 @@ func (c *ingress) Delete(name string, options *api.DeleteOptions) (err error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested ingress. | // Watch returns a watch.Interface that watches the requested ingress. | ||||||
| func (c *ingress) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *ingress) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -60,7 +59,7 @@ func TestListIngress(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedIngressList, err := c.Setup(t).Extensions().Ingress(ns).List(unversioned.ListOptions{}) | 	receivedIngressList, err := c.Setup(t).Extensions().Ingress(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedIngressList, err) | 	c.Validate(t, receivedIngressList, err) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -19,7 +19,6 @@ package unversioned | |||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/latest" | 	"k8s.io/kubernetes/pkg/api/latest" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -31,12 +30,12 @@ type JobsNamespacer interface { | |||||||
|  |  | ||||||
| // JobInterface exposes methods to work on Job resources. | // JobInterface exposes methods to work on Job resources. | ||||||
| type JobInterface interface { | type JobInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.JobList, error) | 	List(opts api.ListOptions) (*extensions.JobList, error) | ||||||
| 	Get(name string) (*extensions.Job, error) | 	Get(name string) (*extensions.Job, error) | ||||||
| 	Create(job *extensions.Job) (*extensions.Job, error) | 	Create(job *extensions.Job) (*extensions.Job, error) | ||||||
| 	Update(job *extensions.Job) (*extensions.Job, error) | 	Update(job *extensions.Job) (*extensions.Job, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	UpdateStatus(job *extensions.Job) (*extensions.Job, error) | 	UpdateStatus(job *extensions.Job) (*extensions.Job, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -55,7 +54,7 @@ func newJobs(c *ExtensionsClient, namespace string) *jobs { | |||||||
| var _ JobInterface = &jobs{} | var _ JobInterface = &jobs{} | ||||||
|  |  | ||||||
| // List returns a list of jobs that match the label and field selectors. | // List returns a list of jobs that match the label and field selectors. | ||||||
| func (c *jobs) List(opts unversioned.ListOptions) (result *extensions.JobList, err error) { | func (c *jobs) List(opts api.ListOptions) (result *extensions.JobList, err error) { | ||||||
| 	result = &extensions.JobList{} | 	result = &extensions.JobList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("jobs").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("jobs").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -96,7 +95,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) (err error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested jobs. | // Watch returns a watch.Interface that watches the requested jobs. | ||||||
| func (c *jobs) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -60,7 +59,7 @@ func TestListJobs(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedJobList, err := c.Setup(t).Extensions().Jobs(ns).List(unversioned.ListOptions{}) | 	receivedJobList, err := c.Setup(t).Extensions().Jobs(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedJobList, err) | 	c.Validate(t, receivedJobList, err) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -31,12 +30,12 @@ type LimitRangesNamespacer interface { | |||||||
|  |  | ||||||
| // LimitRangeInterface has methods to work with LimitRange resources. | // LimitRangeInterface has methods to work with LimitRange resources. | ||||||
| type LimitRangeInterface interface { | type LimitRangeInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.LimitRangeList, error) | 	List(opts api.ListOptions) (*api.LimitRangeList, error) | ||||||
| 	Get(name string) (*api.LimitRange, error) | 	Get(name string) (*api.LimitRange, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Create(limitRange *api.LimitRange) (*api.LimitRange, error) | 	Create(limitRange *api.LimitRange) (*api.LimitRange, error) | ||||||
| 	Update(limitRange *api.LimitRange) (*api.LimitRange, error) | 	Update(limitRange *api.LimitRange) (*api.LimitRange, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // limitRanges implements LimitRangesNamespacer interface | // limitRanges implements LimitRangesNamespacer interface | ||||||
| @@ -54,7 +53,7 @@ func newLimitRanges(c *Client, namespace string) *limitRanges { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of limitRanges that match that selector. | // List takes a selector, and returns the list of limitRanges that match that selector. | ||||||
| func (c *limitRanges) List(opts unversioned.ListOptions) (result *api.LimitRangeList, err error) { | func (c *limitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) { | ||||||
| 	result = &api.LimitRangeList{} | 	result = &api.LimitRangeList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("limitRanges").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("limitRanges").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -91,7 +90,7 @@ func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested resource | // Watch returns a watch.Interface that watches the requested resource | ||||||
| func (c *limitRanges) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getLimitRangesResourceName() string { | func getLimitRangesResourceName() string { | ||||||
| @@ -126,7 +125,7 @@ func TestLimitRangeList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: limitRangeList}, | 		Response: simple.Response{StatusCode: 200, Body: limitRangeList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).LimitRanges(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).LimitRanges(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -211,6 +210,6 @@ func TestLimitRangeWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).LimitRanges(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).LimitRanges(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -31,10 +30,10 @@ type NamespacesInterface interface { | |||||||
| type NamespaceInterface interface { | type NamespaceInterface interface { | ||||||
| 	Create(item *api.Namespace) (*api.Namespace, error) | 	Create(item *api.Namespace) (*api.Namespace, error) | ||||||
| 	Get(name string) (result *api.Namespace, err error) | 	Get(name string) (result *api.Namespace, err error) | ||||||
| 	List(opts unversioned.ListOptions) (*api.NamespaceList, error) | 	List(opts api.ListOptions) (*api.NamespaceList, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Update(item *api.Namespace) (*api.Namespace, error) | 	Update(item *api.Namespace) (*api.Namespace, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	Finalize(item *api.Namespace) (*api.Namespace, error) | 	Finalize(item *api.Namespace) (*api.Namespace, error) | ||||||
| 	Status(item *api.Namespace) (*api.Namespace, error) | 	Status(item *api.Namespace) (*api.Namespace, error) | ||||||
| } | } | ||||||
| @@ -57,7 +56,7 @@ func (c *namespaces) Create(namespace *api.Namespace) (*api.Namespace, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List lists all the namespaces in the cluster. | // List lists all the namespaces in the cluster. | ||||||
| func (c *namespaces) List(opts unversioned.ListOptions) (*api.NamespaceList, error) { | func (c *namespaces) List(opts api.ListOptions) (*api.NamespaceList, error) { | ||||||
| 	result := &api.NamespaceList{} | 	result := &api.NamespaceList{} | ||||||
| 	err := c.r.Get(). | 	err := c.r.Get(). | ||||||
| 		Resource("namespaces"). | 		Resource("namespaces"). | ||||||
| @@ -112,7 +111,7 @@ func (c *namespaces) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested namespaces. | // Watch returns a watch.Interface that watches the requested namespaces. | ||||||
| func (c *namespaces) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Resource("namespaces"). | 		Resource("namespaces"). | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestNamespaceCreate(t *testing.T) { | func TestNamespaceCreate(t *testing.T) { | ||||||
| @@ -96,7 +95,7 @@ func TestNamespaceList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: namespaceList}, | 		Response: simple.Response{StatusCode: 200, Body: namespaceList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).Namespaces().List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).Namespaces().List(api.ListOptions{}) | ||||||
|  |  | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Errorf("%#v should be nil.", err) | 		t.Errorf("%#v should be nil.", err) | ||||||
| @@ -178,6 +177,6 @@ func TestNamespaceWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).Namespaces().Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).Namespaces().Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -31,11 +30,11 @@ type NodesInterface interface { | |||||||
| type NodeInterface interface { | type NodeInterface interface { | ||||||
| 	Get(name string) (result *api.Node, err error) | 	Get(name string) (result *api.Node, err error) | ||||||
| 	Create(node *api.Node) (*api.Node, error) | 	Create(node *api.Node) (*api.Node, error) | ||||||
| 	List(opts unversioned.ListOptions) (*api.NodeList, error) | 	List(opts api.ListOptions) (*api.NodeList, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Update(*api.Node) (*api.Node, error) | 	Update(*api.Node) (*api.Node, error) | ||||||
| 	UpdateStatus(*api.Node) (*api.Node, error) | 	UpdateStatus(*api.Node) (*api.Node, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // nodes implements NodesInterface | // nodes implements NodesInterface | ||||||
| @@ -61,7 +60,7 @@ func (c *nodes) Create(node *api.Node) (*api.Node, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of nodes that match that selector in the cluster. | // List takes a selector, and returns the list of nodes that match that selector in the cluster. | ||||||
| func (c *nodes) List(opts unversioned.ListOptions) (*api.NodeList, error) { | func (c *nodes) List(opts api.ListOptions) (*api.NodeList, error) { | ||||||
| 	result := &api.NodeList{} | 	result := &api.NodeList{} | ||||||
| 	err := c.r.Get().Resource(c.resourceName()).VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err := c.r.Get().Resource(c.resourceName()).VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return result, err | 	return result, err | ||||||
| @@ -101,7 +100,7 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested nodes. | // Watch returns a watch.Interface that watches the requested nodes. | ||||||
| func (c *nodes) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(api.NamespaceAll). | 		Namespace(api.NamespaceAll). | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ func TestListNodes(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: &api.NodeList{ListMeta: unversioned.ListMeta{ResourceVersion: "1"}}}, | 		Response: simple.Response{StatusCode: 200, Body: &api.NodeList{ListMeta: unversioned.ListMeta{ResourceVersion: "1"}}}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).Nodes().List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).Nodes().List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -74,7 +74,7 @@ func TestListNodesLabels(t *testing.T) { | |||||||
| 	c.Setup(t) | 	c.Setup(t) | ||||||
| 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | ||||||
| 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | ||||||
| 	options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{selector}} | 	options := api.ListOptions{LabelSelector: selector} | ||||||
| 	receivedNodeList, err := c.Nodes().List(options) | 	receivedNodeList, err := c.Nodes().List(options) | ||||||
| 	c.Validate(t, receivedNodeList, err) | 	c.Validate(t, receivedNodeList, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getPersistentVolumesResoureName() string { | func getPersistentVolumesResoureName() string { | ||||||
| @@ -110,7 +109,7 @@ func TestPersistentVolumeList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: persistentVolumeList}, | 		Response: simple.Response{StatusCode: 200, Body: persistentVolumeList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).PersistentVolumes().List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).PersistentVolumes().List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -184,6 +183,6 @@ func TestPersistentVolumeWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).PersistentVolumes().Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).PersistentVolumes().Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -31,13 +30,13 @@ type PersistentVolumeClaimsNamespacer interface { | |||||||
|  |  | ||||||
| // PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources. | // PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources. | ||||||
| type PersistentVolumeClaimInterface interface { | type PersistentVolumeClaimInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.PersistentVolumeClaimList, error) | 	List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error) | ||||||
| 	Get(name string) (*api.PersistentVolumeClaim, error) | 	Get(name string) (*api.PersistentVolumeClaim, error) | ||||||
| 	Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | 	Create(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | ||||||
| 	Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | 	Update(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | ||||||
| 	UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | 	UpdateStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface | // persistentVolumeClaims implements PersistentVolumeClaimsNamespacer interface | ||||||
| @@ -51,7 +50,7 @@ func newPersistentVolumeClaims(c *Client, namespace string) *persistentVolumeCla | |||||||
| 	return &persistentVolumeClaims{c, namespace} | 	return &persistentVolumeClaims{c, namespace} | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *persistentVolumeClaims) List(opts unversioned.ListOptions) (result *api.PersistentVolumeClaimList, err error) { | func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) { | ||||||
| 	result = &api.PersistentVolumeClaimList{} | 	result = &api.PersistentVolumeClaimList{} | ||||||
|  |  | ||||||
| 	err = c.client.Get(). | 	err = c.client.Get(). | ||||||
| @@ -96,7 +95,7 @@ func (c *persistentVolumeClaims) Delete(name string) error { | |||||||
| 	return c.client.Delete().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(name).Do().Error() | 	return c.client.Delete().Namespace(c.namespace).Resource("persistentVolumeClaims").Name(name).Do().Error() | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *persistentVolumeClaims) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.Get(). | 	return c.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.namespace). | 		Namespace(c.namespace). | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getPersistentVolumeClaimsResoureName() string { | func getPersistentVolumeClaimsResoureName() string { | ||||||
| @@ -119,7 +118,7 @@ func TestPersistentVolumeClaimList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: persistentVolumeList}, | 		Response: simple.Response{StatusCode: 200, Body: persistentVolumeList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).PersistentVolumeClaims(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).PersistentVolumeClaims(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -201,6 +200,6 @@ func TestPersistentVolumeClaimWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).PersistentVolumeClaims(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).PersistentVolumeClaims(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -20,7 +20,6 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -30,13 +29,13 @@ type PersistentVolumesInterface interface { | |||||||
|  |  | ||||||
| // PersistentVolumeInterface has methods to work with PersistentVolume resources. | // PersistentVolumeInterface has methods to work with PersistentVolume resources. | ||||||
| type PersistentVolumeInterface interface { | type PersistentVolumeInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.PersistentVolumeList, error) | 	List(opts api.ListOptions) (*api.PersistentVolumeList, error) | ||||||
| 	Get(name string) (*api.PersistentVolume, error) | 	Get(name string) (*api.PersistentVolume, error) | ||||||
| 	Create(volume *api.PersistentVolume) (*api.PersistentVolume, error) | 	Create(volume *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
| 	Update(volume *api.PersistentVolume) (*api.PersistentVolume, error) | 	Update(volume *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
| 	UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error) | 	UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // persistentVolumes implements PersistentVolumesInterface | // persistentVolumes implements PersistentVolumesInterface | ||||||
| @@ -48,7 +47,7 @@ func newPersistentVolumes(c *Client) *persistentVolumes { | |||||||
| 	return &persistentVolumes{c} | 	return &persistentVolumes{c} | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *persistentVolumes) List(opts unversioned.ListOptions) (result *api.PersistentVolumeList, err error) { | func (c *persistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) { | ||||||
| 	result = &api.PersistentVolumeList{} | 	result = &api.PersistentVolumeList{} | ||||||
| 	err = c.client.Get(). | 	err = c.client.Get(). | ||||||
| 		Resource("persistentVolumes"). | 		Resource("persistentVolumes"). | ||||||
| @@ -91,7 +90,7 @@ func (c *persistentVolumes) Delete(name string) error { | |||||||
| 	return c.client.Delete().Resource("persistentVolumes").Name(name).Do().Error() | 	return c.client.Delete().Resource("persistentVolumes").Name(name).Do().Error() | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *persistentVolumes) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.Get(). | 	return c.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Resource("persistentVolumes"). | 		Resource("persistentVolumes"). | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -29,12 +28,12 @@ type PodTemplatesNamespacer interface { | |||||||
|  |  | ||||||
| // PodTemplateInterface has methods to work with PodTemplate resources. | // PodTemplateInterface has methods to work with PodTemplate resources. | ||||||
| type PodTemplateInterface interface { | type PodTemplateInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.PodTemplateList, error) | 	List(opts api.ListOptions) (*api.PodTemplateList, error) | ||||||
| 	Get(name string) (*api.PodTemplate, error) | 	Get(name string) (*api.PodTemplate, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Create(podTemplate *api.PodTemplate) (*api.PodTemplate, error) | 	Create(podTemplate *api.PodTemplate) (*api.PodTemplate, error) | ||||||
| 	Update(podTemplate *api.PodTemplate) (*api.PodTemplate, error) | 	Update(podTemplate *api.PodTemplate) (*api.PodTemplate, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // podTemplates implements PodTemplatesNamespacer interface | // podTemplates implements PodTemplatesNamespacer interface | ||||||
| @@ -52,7 +51,7 @@ func newPodTemplates(c *Client, namespace string) *podTemplates { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes label and field selectors, and returns the list of podTemplates that match those selectors. | // List takes label and field selectors, and returns the list of podTemplates that match those selectors. | ||||||
| func (c *podTemplates) List(opts unversioned.ListOptions) (result *api.PodTemplateList, err error) { | func (c *podTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) { | ||||||
| 	result = &api.PodTemplateList{} | 	result = &api.PodTemplateList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("podTemplates").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("podTemplates").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -93,7 +92,7 @@ func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemp | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested podTemplates. | // Watch returns a watch.Interface that watches the requested podTemplates. | ||||||
| func (c *podTemplates) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getPodTemplatesResoureName() string { | func getPodTemplatesResoureName() string { | ||||||
| @@ -101,7 +100,7 @@ func TestPodTemplateList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: podTemplateList}, | 		Response: simple.Response{StatusCode: 200, Body: podTemplateList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).PodTemplates(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).PodTemplates(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -141,6 +140,6 @@ func TestPodTemplateWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).PodTemplates(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).PodTemplates(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -29,12 +28,12 @@ type PodsNamespacer interface { | |||||||
|  |  | ||||||
| // PodInterface has methods to work with Pod resources. | // PodInterface has methods to work with Pod resources. | ||||||
| type PodInterface interface { | type PodInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.PodList, error) | 	List(opts api.ListOptions) (*api.PodList, error) | ||||||
| 	Get(name string) (*api.Pod, error) | 	Get(name string) (*api.Pod, error) | ||||||
| 	Delete(name string, options *api.DeleteOptions) error | 	Delete(name string, options *api.DeleteOptions) error | ||||||
| 	Create(pod *api.Pod) (*api.Pod, error) | 	Create(pod *api.Pod) (*api.Pod, error) | ||||||
| 	Update(pod *api.Pod) (*api.Pod, error) | 	Update(pod *api.Pod) (*api.Pod, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	Bind(binding *api.Binding) error | 	Bind(binding *api.Binding) error | ||||||
| 	UpdateStatus(pod *api.Pod) (*api.Pod, error) | 	UpdateStatus(pod *api.Pod) (*api.Pod, error) | ||||||
| 	GetLogs(name string, opts *api.PodLogOptions) *Request | 	GetLogs(name string, opts *api.PodLogOptions) *Request | ||||||
| @@ -55,7 +54,7 @@ func newPods(c *Client, namespace string) *pods { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes label and field selectors, and returns the list of pods that match those selectors. | // List takes label and field selectors, and returns the list of pods that match those selectors. | ||||||
| func (c *pods) List(opts unversioned.ListOptions) (result *api.PodList, err error) { | func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) { | ||||||
| 	result = &api.PodList{} | 	result = &api.PodList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("pods").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("pods").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -96,7 +95,7 @@ func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested pods. | // Watch returns a watch.Interface that watches the requested pods. | ||||||
| func (c *pods) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -36,7 +36,7 @@ func TestListEmptyPods(t *testing.T) { | |||||||
| 		Request:  simple.Request{Method: "GET", Path: testapi.Default.ResourcePath("pods", ns, ""), Query: simple.BuildQueryValues(nil)}, | 		Request:  simple.Request{Method: "GET", Path: testapi.Default.ResourcePath("pods", ns, ""), Query: simple.BuildQueryValues(nil)}, | ||||||
| 		Response: simple.Response{StatusCode: http.StatusOK, Body: &api.PodList{}}, | 		Response: simple.Response{StatusCode: http.StatusOK, Body: &api.PodList{}}, | ||||||
| 	} | 	} | ||||||
| 	podList, err := c.Setup(t).Pods(ns).List(unversioned.ListOptions{}) | 	podList, err := c.Setup(t).Pods(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, podList, err) | 	c.Validate(t, podList, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -62,7 +62,7 @@ func TestListPods(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedPodList, err := c.Setup(t).Pods(ns).List(unversioned.ListOptions{}) | 	receivedPodList, err := c.Setup(t).Pods(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedPodList, err) | 	c.Validate(t, receivedPodList, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -96,7 +96,7 @@ func TestListPodsLabels(t *testing.T) { | |||||||
| 	c.Setup(t) | 	c.Setup(t) | ||||||
| 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | ||||||
| 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | ||||||
| 	options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{selector}} | 	options := api.ListOptions{LabelSelector: selector} | ||||||
| 	receivedPodList, err := c.Pods(ns).List(options) | 	receivedPodList, err := c.Pods(ns).List(options) | ||||||
| 	c.Validate(t, receivedPodList, err) | 	c.Validate(t, receivedPodList, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -29,13 +28,13 @@ type ReplicationControllersNamespacer interface { | |||||||
|  |  | ||||||
| // ReplicationControllerInterface has methods to work with ReplicationController resources. | // ReplicationControllerInterface has methods to work with ReplicationController resources. | ||||||
| type ReplicationControllerInterface interface { | type ReplicationControllerInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.ReplicationControllerList, error) | 	List(opts api.ListOptions) (*api.ReplicationControllerList, error) | ||||||
| 	Get(name string) (*api.ReplicationController, error) | 	Get(name string) (*api.ReplicationController, error) | ||||||
| 	Create(ctrl *api.ReplicationController) (*api.ReplicationController, error) | 	Create(ctrl *api.ReplicationController) (*api.ReplicationController, error) | ||||||
| 	Update(ctrl *api.ReplicationController) (*api.ReplicationController, error) | 	Update(ctrl *api.ReplicationController) (*api.ReplicationController, error) | ||||||
| 	UpdateStatus(ctrl *api.ReplicationController) (*api.ReplicationController, error) | 	UpdateStatus(ctrl *api.ReplicationController) (*api.ReplicationController, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // replicationControllers implements ReplicationControllersNamespacer interface | // replicationControllers implements ReplicationControllersNamespacer interface | ||||||
| @@ -50,7 +49,7 @@ func newReplicationControllers(c *Client, namespace string) *replicationControll | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of replication controllers that match that selector. | // List takes a selector, and returns the list of replication controllers that match that selector. | ||||||
| func (c *replicationControllers) List(opts unversioned.ListOptions) (result *api.ReplicationControllerList, err error) { | func (c *replicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) { | ||||||
| 	result = &api.ReplicationControllerList{} | 	result = &api.ReplicationControllerList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("replicationControllers").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("replicationControllers").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -90,7 +89,7 @@ func (c *replicationControllers) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested controllers. | // Watch returns a watch.Interface that watches the requested controllers. | ||||||
| func (c *replicationControllers) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getRCResourceName() string { | func getRCResourceName() string { | ||||||
| @@ -60,7 +59,7 @@ func TestListControllers(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedControllerList, err := c.Setup(t).ReplicationControllers(ns).List(unversioned.ListOptions{}) | 	receivedControllerList, err := c.Setup(t).ReplicationControllers(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedControllerList, err) | 	c.Validate(t, receivedControllerList, err) | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -195,7 +195,7 @@ func TestRequestVersionedParams(t *testing.T) { | |||||||
|  |  | ||||||
| func TestRequestVersionedParamsFromListOptions(t *testing.T) { | func TestRequestVersionedParamsFromListOptions(t *testing.T) { | ||||||
| 	r := &Request{groupVersion: v1.SchemeGroupVersion} | 	r := &Request{groupVersion: v1.SchemeGroupVersion} | ||||||
| 	r.VersionedParams(&unversioned.ListOptions{ResourceVersion: "1"}, api.Scheme) | 	r.VersionedParams(&api.ListOptions{ResourceVersion: "1"}, api.Scheme) | ||||||
| 	if !reflect.DeepEqual(r.params, url.Values{ | 	if !reflect.DeepEqual(r.params, url.Values{ | ||||||
| 		"resourceVersion": []string{"1"}, | 		"resourceVersion": []string{"1"}, | ||||||
| 	}) { | 	}) { | ||||||
| @@ -203,7 +203,7 @@ func TestRequestVersionedParamsFromListOptions(t *testing.T) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	var timeout int64 = 10 | 	var timeout int64 = 10 | ||||||
| 	r.VersionedParams(&unversioned.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.Scheme) | 	r.VersionedParams(&api.ListOptions{ResourceVersion: "2", TimeoutSeconds: &timeout}, api.Scheme) | ||||||
| 	if !reflect.DeepEqual(r.params, url.Values{ | 	if !reflect.DeepEqual(r.params, url.Values{ | ||||||
| 		"resourceVersion": []string{"1", "2"}, | 		"resourceVersion": []string{"1", "2"}, | ||||||
| 		"timeoutSeconds":  []string{"10"}, | 		"timeoutSeconds":  []string{"10"}, | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -29,13 +28,13 @@ type ResourceQuotasNamespacer interface { | |||||||
|  |  | ||||||
| // ResourceQuotaInterface has methods to work with ResourceQuota resources. | // ResourceQuotaInterface has methods to work with ResourceQuota resources. | ||||||
| type ResourceQuotaInterface interface { | type ResourceQuotaInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.ResourceQuotaList, error) | 	List(opts api.ListOptions) (*api.ResourceQuotaList, error) | ||||||
| 	Get(name string) (*api.ResourceQuota, error) | 	Get(name string) (*api.ResourceQuota, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | 	Create(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | ||||||
| 	Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | 	Update(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | ||||||
| 	UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | 	UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // resourceQuotas implements ResourceQuotasNamespacer interface | // resourceQuotas implements ResourceQuotasNamespacer interface | ||||||
| @@ -53,7 +52,7 @@ func newResourceQuotas(c *Client, namespace string) *resourceQuotas { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of resourceQuotas that match that selector. | // List takes a selector, and returns the list of resourceQuotas that match that selector. | ||||||
| func (c *resourceQuotas) List(opts unversioned.ListOptions) (result *api.ResourceQuotaList, err error) { | func (c *resourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) { | ||||||
| 	result = &api.ResourceQuotaList{} | 	result = &api.ResourceQuotaList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("resourceQuotas").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -93,7 +92,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested resource | // Watch returns a watch.Interface that watches the requested resource | ||||||
| func (c *resourceQuotas) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getResourceQuotasResoureName() string { | func getResourceQuotasResoureName() string { | ||||||
| @@ -118,7 +117,7 @@ func TestResourceQuotaList(t *testing.T) { | |||||||
| 		}, | 		}, | ||||||
| 		Response: simple.Response{StatusCode: 200, Body: resourceQuotaList}, | 		Response: simple.Response{StatusCode: 200, Body: resourceQuotaList}, | ||||||
| 	} | 	} | ||||||
| 	response, err := c.Setup(t).ResourceQuotas(ns).List(unversioned.ListOptions{}) | 	response, err := c.Setup(t).ResourceQuotas(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, response, err) | 	c.Validate(t, response, err) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -197,6 +196,6 @@ func TestResourceQuotaWatch(t *testing.T) { | |||||||
| 			Query:  url.Values{"resourceVersion": []string{}}}, | 			Query:  url.Values{"resourceVersion": []string{}}}, | ||||||
| 		Response: simple.Response{StatusCode: 200}, | 		Response: simple.Response{StatusCode: 200}, | ||||||
| 	} | 	} | ||||||
| 	_, err := c.Setup(t).ResourceQuotas(api.NamespaceAll).Watch(unversioned.ListOptions{}) | 	_, err := c.Setup(t).ResourceQuotas(api.NamespaceAll).Watch(api.ListOptions{}) | ||||||
| 	c.Validate(t, nil, err) | 	c.Validate(t, nil, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -30,9 +29,9 @@ type SecretsInterface interface { | |||||||
| 	Create(secret *api.Secret) (*api.Secret, error) | 	Create(secret *api.Secret) (*api.Secret, error) | ||||||
| 	Update(secret *api.Secret) (*api.Secret, error) | 	Update(secret *api.Secret) (*api.Secret, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	List(opts unversioned.ListOptions) (*api.SecretList, error) | 	List(opts api.ListOptions) (*api.SecretList, error) | ||||||
| 	Get(name string) (*api.Secret, error) | 	Get(name string) (*api.Secret, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // events implements Secrets interface | // events implements Secrets interface | ||||||
| @@ -62,7 +61,7 @@ func (s *secrets) Create(secret *api.Secret) (*api.Secret, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list of secrets matching the selectors. | // List returns a list of secrets matching the selectors. | ||||||
| func (s *secrets) List(opts unversioned.ListOptions) (*api.SecretList, error) { | func (s *secrets) List(opts api.ListOptions) (*api.SecretList, error) { | ||||||
| 	result := &api.SecretList{} | 	result := &api.SecretList{} | ||||||
|  |  | ||||||
| 	err := s.client.Get(). | 	err := s.client.Get(). | ||||||
| @@ -89,7 +88,7 @@ func (s *secrets) Get(name string) (*api.Secret, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch starts watching for secrets matching the given selectors. | // Watch starts watching for secrets matching the given selectors. | ||||||
| func (s *secrets) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (s *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return s.client.Get(). | 	return s.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(s.namespace). | 		Namespace(s.namespace). | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -30,9 +29,9 @@ type ServiceAccountsInterface interface { | |||||||
| 	Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error) | 	Create(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error) | ||||||
| 	Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error) | 	Update(serviceAccount *api.ServiceAccount) (*api.ServiceAccount, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	List(opts unversioned.ListOptions) (*api.ServiceAccountList, error) | 	List(opts api.ListOptions) (*api.ServiceAccountList, error) | ||||||
| 	Get(name string) (*api.ServiceAccount, error) | 	Get(name string) (*api.ServiceAccount, error) | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // serviceAccounts implements ServiceAccounts interface | // serviceAccounts implements ServiceAccounts interface | ||||||
| @@ -62,7 +61,7 @@ func (s *serviceAccounts) Create(serviceAccount *api.ServiceAccount) (*api.Servi | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list of serviceAccounts matching the selectors. | // List returns a list of serviceAccounts matching the selectors. | ||||||
| func (s *serviceAccounts) List(opts unversioned.ListOptions) (*api.ServiceAccountList, error) { | func (s *serviceAccounts) List(opts api.ListOptions) (*api.ServiceAccountList, error) { | ||||||
| 	result := &api.ServiceAccountList{} | 	result := &api.ServiceAccountList{} | ||||||
|  |  | ||||||
| 	err := s.client.Get(). | 	err := s.client.Get(). | ||||||
| @@ -89,7 +88,7 @@ func (s *serviceAccounts) Get(name string) (*api.ServiceAccount, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch starts watching for serviceAccounts matching the given selectors. | // Watch starts watching for serviceAccounts matching the given selectors. | ||||||
| func (s *serviceAccounts) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (s *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return s.client.Get(). | 	return s.client.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(s.namespace). | 		Namespace(s.namespace). | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/util" | 	"k8s.io/kubernetes/pkg/util" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -30,12 +29,12 @@ type ServicesNamespacer interface { | |||||||
|  |  | ||||||
| // ServiceInterface has methods to work with Service resources. | // ServiceInterface has methods to work with Service resources. | ||||||
| type ServiceInterface interface { | type ServiceInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*api.ServiceList, error) | 	List(opts api.ListOptions) (*api.ServiceList, error) | ||||||
| 	Get(name string) (*api.Service, error) | 	Get(name string) (*api.Service, error) | ||||||
| 	Create(srv *api.Service) (*api.Service, error) | 	Create(srv *api.Service) (*api.Service, error) | ||||||
| 	Update(srv *api.Service) (*api.Service, error) | 	Update(srv *api.Service) (*api.Service, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| 	ProxyGet(scheme, name, port, path string, params map[string]string) ResponseWrapper | 	ProxyGet(scheme, name, port, path string, params map[string]string) ResponseWrapper | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -51,7 +50,7 @@ func newServices(c *Client, namespace string) *services { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List takes a selector, and returns the list of services that match that selector | // List takes a selector, and returns the list of services that match that selector | ||||||
| func (c *services) List(opts unversioned.ListOptions) (result *api.ServiceList, err error) { | func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) { | ||||||
| 	result = &api.ServiceList{} | 	result = &api.ServiceList{} | ||||||
| 	err = c.r.Get(). | 	err = c.r.Get(). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
| @@ -89,7 +88,7 @@ func (c *services) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested services. | // Watch returns a watch.Interface that watches the requested services. | ||||||
| func (c *services) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -59,7 +59,7 @@ func TestListServices(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedServiceList, err := c.Setup(t).Services(ns).List(unversioned.ListOptions{}) | 	receivedServiceList, err := c.Setup(t).Services(ns).List(api.ListOptions{}) | ||||||
| 	t.Logf("received services: %v %#v", err, receivedServiceList) | 	t.Logf("received services: %v %#v", err, receivedServiceList) | ||||||
| 	c.Validate(t, receivedServiceList, err) | 	c.Validate(t, receivedServiceList, err) | ||||||
| } | } | ||||||
| @@ -96,7 +96,7 @@ func TestListServicesLabels(t *testing.T) { | |||||||
| 	c.Setup(t) | 	c.Setup(t) | ||||||
| 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | 	c.QueryValidator[labelSelectorQueryParamName] = simple.ValidateLabels | ||||||
| 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | 	selector := labels.Set{"foo": "bar", "name": "baz"}.AsSelector() | ||||||
| 	options := unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{selector}} | 	options := api.ListOptions{LabelSelector: selector} | ||||||
| 	receivedServiceList, err := c.Services(ns).List(options) | 	receivedServiceList, err := c.Services(ns).List(options) | ||||||
| 	c.Validate(t, receivedServiceList, err) | 	c.Validate(t, receivedServiceList, err) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -19,7 +19,7 @@ package testclient | |||||||
| import ( | import ( | ||||||
| 	"strings" | 	"strings" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/fields" | 	"k8s.io/kubernetes/pkg/fields" | ||||||
| 	"k8s.io/kubernetes/pkg/labels" | 	"k8s.io/kubernetes/pkg/labels" | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| @@ -44,15 +44,15 @@ func NewGetAction(resource, namespace, name string) GetActionImpl { | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewRootListAction(resource string, opts unversioned.ListOptions) ListActionImpl { | func NewRootListAction(resource string, opts api.ListOptions) ListActionImpl { | ||||||
| 	action := ListActionImpl{} | 	action := ListActionImpl{} | ||||||
| 	action.Verb = "list" | 	action.Verb = "list" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -61,16 +61,16 @@ func NewRootListAction(resource string, opts unversioned.ListOptions) ListAction | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewListAction(resource, namespace string, opts unversioned.ListOptions) ListActionImpl { | func NewListAction(resource, namespace string, opts api.ListOptions) ListActionImpl { | ||||||
| 	action := ListActionImpl{} | 	action := ListActionImpl{} | ||||||
| 	action.Verb = "list" | 	action.Verb = "list" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	action.Namespace = namespace | 	action.Namespace = namespace | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -166,15 +166,15 @@ func NewDeleteAction(resource, namespace, name string) DeleteActionImpl { | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewRootDeleteCollectionAction(resource string, opts unversioned.ListOptions) DeleteCollectionActionImpl { | func NewRootDeleteCollectionAction(resource string, opts api.ListOptions) DeleteCollectionActionImpl { | ||||||
| 	action := DeleteCollectionActionImpl{} | 	action := DeleteCollectionActionImpl{} | ||||||
| 	action.Verb = "delete-collection" | 	action.Verb = "delete-collection" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -183,16 +183,16 @@ func NewRootDeleteCollectionAction(resource string, opts unversioned.ListOptions | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewDeleteCollectionAction(resource, namespace string, opts unversioned.ListOptions) DeleteCollectionActionImpl { | func NewDeleteCollectionAction(resource, namespace string, opts api.ListOptions) DeleteCollectionActionImpl { | ||||||
| 	action := DeleteCollectionActionImpl{} | 	action := DeleteCollectionActionImpl{} | ||||||
| 	action.Verb = "delete-collection" | 	action.Verb = "delete-collection" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	action.Namespace = namespace | 	action.Namespace = namespace | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -201,15 +201,15 @@ func NewDeleteCollectionAction(resource, namespace string, opts unversioned.List | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewRootWatchAction(resource string, opts unversioned.ListOptions) WatchActionImpl { | func NewRootWatchAction(resource string, opts api.ListOptions) WatchActionImpl { | ||||||
| 	action := WatchActionImpl{} | 	action := WatchActionImpl{} | ||||||
| 	action.Verb = "watch" | 	action.Verb = "watch" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -218,16 +218,16 @@ func NewRootWatchAction(resource string, opts unversioned.ListOptions) WatchActi | |||||||
| 	return action | 	return action | ||||||
| } | } | ||||||
|  |  | ||||||
| func NewWatchAction(resource, namespace string, opts unversioned.ListOptions) WatchActionImpl { | func NewWatchAction(resource, namespace string, opts api.ListOptions) WatchActionImpl { | ||||||
| 	action := WatchActionImpl{} | 	action := WatchActionImpl{} | ||||||
| 	action.Verb = "watch" | 	action.Verb = "watch" | ||||||
| 	action.Resource = resource | 	action.Resource = resource | ||||||
| 	action.Namespace = namespace | 	action.Namespace = namespace | ||||||
| 	labelSelector := opts.LabelSelector.Selector | 	labelSelector := opts.LabelSelector | ||||||
| 	if labelSelector == nil { | 	if labelSelector == nil { | ||||||
| 		labelSelector = labels.Everything() | 		labelSelector = labels.Everything() | ||||||
| 	} | 	} | ||||||
| 	fieldSelector := opts.FieldSelector.Selector | 	fieldSelector := opts.FieldSelector | ||||||
| 	if fieldSelector == nil { | 	if fieldSelector == nil { | ||||||
| 		fieldSelector = fields.Everything() | 		fieldSelector = fields.Everything() | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // Fake implements ComponentStatusInterface. | // Fake implements ComponentStatusInterface. | ||||||
| @@ -35,7 +34,7 @@ func (c *FakeComponentStatuses) Get(name string) (*api.ComponentStatus, error) { | |||||||
| 	return obj.(*api.ComponentStatus), err | 	return obj.(*api.ComponentStatus), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeComponentStatuses) List(opts unversioned.ListOptions) (result *api.ComponentStatusList, err error) { | func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewRootListAction("componentstatuses", opts), &api.ComponentStatusList{}) | 	obj, err := c.Fake.Invokes(NewRootListAction("componentstatuses", opts), &api.ComponentStatusList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ limitations under the License. | |||||||
| package testclient | package testclient | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	kclientlib "k8s.io/kubernetes/pkg/client/unversioned" | 	kclientlib "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -41,7 +41,7 @@ func (c *FakeDaemonSets) Get(name string) (*extensions.DaemonSet, error) { | |||||||
| 	return obj.(*extensions.DaemonSet), err | 	return obj.(*extensions.DaemonSet), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeDaemonSets) List(opts unversioned.ListOptions) (*extensions.DaemonSetList, error) { | func (c *FakeDaemonSets) List(opts api.ListOptions) (*extensions.DaemonSetList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("daemonsets", c.Namespace, opts), &extensions.DaemonSetList{}) | 	obj, err := c.Fake.Invokes(NewListAction("daemonsets", c.Namespace, opts), &extensions.DaemonSetList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -78,6 +78,6 @@ func (c *FakeDaemonSets) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeDaemonSets) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("daemonsets", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("daemonsets", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/labels" | 	"k8s.io/kubernetes/pkg/labels" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -40,12 +39,12 @@ func (c *FakeDeployments) Get(name string) (*extensions.Deployment, error) { | |||||||
| 	return obj.(*extensions.Deployment), err | 	return obj.(*extensions.Deployment), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeDeployments) List(opts unversioned.ListOptions) (*extensions.DeploymentList, error) { | func (c *FakeDeployments) List(opts api.ListOptions) (*extensions.DeploymentList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("deployments", c.Namespace, opts), &extensions.DeploymentList{}) | 	obj, err := c.Fake.Invokes(NewListAction("deployments", c.Namespace, opts), &extensions.DeploymentList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 	label := opts.LabelSelector.Selector | 	label := opts.LabelSelector | ||||||
| 	if label == nil { | 	if label == nil { | ||||||
| 		label = labels.Everything() | 		label = labels.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -90,6 +89,6 @@ func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeDeployments) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("deployments", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("deployments", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeEndpoints) Get(name string) (*api.Endpoints, error) { | |||||||
| 	return obj.(*api.Endpoints), err | 	return obj.(*api.Endpoints), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeEndpoints) List(opts unversioned.ListOptions) (*api.EndpointsList, error) { | func (c *FakeEndpoints) List(opts api.ListOptions) (*api.EndpointsList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("endpoints", c.Namespace, opts), &api.EndpointsList{}) | 	obj, err := c.Fake.Invokes(NewListAction("endpoints", c.Namespace, opts), &api.EndpointsList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,6 +69,6 @@ func (c *FakeEndpoints) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeEndpoints) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("endpoints", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("endpoints", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/fields" | 	"k8s.io/kubernetes/pkg/fields" | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -46,7 +45,7 @@ func (c *FakeEvents) Get(name string) (*api.Event, error) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list of events matching the selectors. | // List returns a list of events matching the selectors. | ||||||
| func (c *FakeEvents) List(opts unversioned.ListOptions) (*api.EventList, error) { | func (c *FakeEvents) List(opts api.ListOptions) (*api.EventList, error) { | ||||||
| 	action := NewRootListAction("events", opts) | 	action := NewRootListAction("events", opts) | ||||||
| 	if c.Namespace != "" { | 	if c.Namespace != "" { | ||||||
| 		action = NewListAction("events", c.Namespace, opts) | 		action = NewListAction("events", c.Namespace, opts) | ||||||
| @@ -110,7 +109,7 @@ func (c *FakeEvents) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions unversioned.ListOptions) error { | func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { | ||||||
| 	action := NewRootDeleteCollectionAction("events", listOptions) | 	action := NewRootDeleteCollectionAction("events", listOptions) | ||||||
| 	if c.Namespace != "" { | 	if c.Namespace != "" { | ||||||
| 		action = NewDeleteCollectionAction("events", c.Namespace, listOptions) | 		action = NewDeleteCollectionAction("events", c.Namespace, listOptions) | ||||||
| @@ -120,7 +119,7 @@ func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions un | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch starts watching for events matching the given selectors. | // Watch starts watching for events matching the given selectors. | ||||||
| func (c *FakeEvents) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	action := NewRootWatchAction("events", opts) | 	action := NewRootWatchAction("events", opts) | ||||||
| 	if c.Namespace != "" { | 	if c.Namespace != "" { | ||||||
| 		action = NewWatchAction("events", c.Namespace, opts) | 		action = NewWatchAction("events", c.Namespace, opts) | ||||||
| @@ -130,9 +129,9 @@ func (c *FakeEvents) Watch(opts unversioned.ListOptions) (watch.Interface, error | |||||||
|  |  | ||||||
| // Search returns a list of events matching the specified object. | // Search returns a list of events matching the specified object. | ||||||
| func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) { | func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) { | ||||||
| 	action := NewRootListAction("events", unversioned.ListOptions{}) | 	action := NewRootListAction("events", api.ListOptions{}) | ||||||
| 	if c.Namespace != "" { | 	if c.Namespace != "" { | ||||||
| 		action = NewListAction("events", c.Namespace, unversioned.ListOptions{}) | 		action = NewListAction("events", c.Namespace, api.ListOptions{}) | ||||||
| 	} | 	} | ||||||
| 	obj, err := c.Fake.Invokes(action, &api.EventList{}) | 	obj, err := c.Fake.Invokes(action, &api.EventList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/labels" | 	"k8s.io/kubernetes/pkg/labels" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -40,12 +39,12 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (*extensions.HorizontalP | |||||||
| 	return obj.(*extensions.HorizontalPodAutoscaler), err | 	return obj.(*extensions.HorizontalPodAutoscaler), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeHorizontalPodAutoscalers) List(opts unversioned.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) { | func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, opts), &extensions.HorizontalPodAutoscalerList{}) | 	obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, opts), &extensions.HorizontalPodAutoscalerList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 	label := opts.LabelSelector.Selector | 	label := opts.LabelSelector | ||||||
| 	if label == nil { | 	if label == nil { | ||||||
| 		label = labels.Everything() | 		label = labels.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -89,6 +88,6 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOp | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeHorizontalPodAutoscalers) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("horizontalpodautoscalers", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("horizontalpodautoscalers", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -39,7 +38,7 @@ func (c *FakeIngress) Get(name string) (*extensions.Ingress, error) { | |||||||
| 	return obj.(*extensions.Ingress), err | 	return obj.(*extensions.Ingress), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeIngress) List(opts unversioned.ListOptions) (*extensions.IngressList, error) { | func (c *FakeIngress) List(opts api.ListOptions) (*extensions.IngressList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("ingresses", c.Namespace, opts), &extensions.IngressList{}) | 	obj, err := c.Fake.Invokes(NewListAction("ingresses", c.Namespace, opts), &extensions.IngressList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -71,7 +70,7 @@ func (c *FakeIngress) Delete(name string, options *api.DeleteOptions) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeIngress) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeIngress) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("ingresses", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("ingresses", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -39,7 +38,7 @@ func (c *FakeJobs) Get(name string) (*extensions.Job, error) { | |||||||
| 	return obj.(*extensions.Job), err | 	return obj.(*extensions.Job), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeJobs) List(opts unversioned.ListOptions) (*extensions.JobList, error) { | func (c *FakeJobs) List(opts api.ListOptions) (*extensions.JobList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("jobs", c.Namespace, opts), &extensions.JobList{}) | 	obj, err := c.Fake.Invokes(NewListAction("jobs", c.Namespace, opts), &extensions.JobList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -71,7 +70,7 @@ func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeJobs) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("jobs", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("jobs", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeLimitRanges) Get(name string) (*api.LimitRange, error) { | |||||||
| 	return obj.(*api.LimitRange), err | 	return obj.(*api.LimitRange), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeLimitRanges) List(opts unversioned.ListOptions) (*api.LimitRangeList, error) { | func (c *FakeLimitRanges) List(opts api.ListOptions) (*api.LimitRangeList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("limitranges", c.Namespace, opts), &api.LimitRangeList{}) | 	obj, err := c.Fake.Invokes(NewListAction("limitranges", c.Namespace, opts), &api.LimitRangeList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,6 +69,6 @@ func (c *FakeLimitRanges) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeLimitRanges) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("limitranges", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("limitranges", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -37,7 +36,7 @@ func (c *FakeNamespaces) Get(name string) (*api.Namespace, error) { | |||||||
| 	return obj.(*api.Namespace), err | 	return obj.(*api.Namespace), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeNamespaces) List(opts unversioned.ListOptions) (*api.NamespaceList, error) { | func (c *FakeNamespaces) List(opts api.ListOptions) (*api.NamespaceList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewRootListAction("namespaces", opts), &api.NamespaceList{}) | 	obj, err := c.Fake.Invokes(NewRootListAction("namespaces", opts), &api.NamespaceList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -69,7 +68,7 @@ func (c *FakeNamespaces) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeNamespaces) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewRootWatchAction("namespaces", opts)) | 	return c.Fake.InvokesWatch(NewRootWatchAction("namespaces", opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -37,7 +36,7 @@ func (c *FakeNodes) Get(name string) (*api.Node, error) { | |||||||
| 	return obj.(*api.Node), err | 	return obj.(*api.Node), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeNodes) List(opts unversioned.ListOptions) (*api.NodeList, error) { | func (c *FakeNodes) List(opts api.ListOptions) (*api.NodeList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewRootListAction("nodes", opts), &api.NodeList{}) | 	obj, err := c.Fake.Invokes(NewRootListAction("nodes", opts), &api.NodeList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -69,7 +68,7 @@ func (c *FakeNodes) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeNodes) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewRootWatchAction("nodes", opts)) | 	return c.Fake.InvokesWatch(NewRootWatchAction("nodes", opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -36,7 +35,7 @@ func (c *FakePersistentVolumeClaims) Get(name string) (*api.PersistentVolumeClai | |||||||
| 	return obj.(*api.PersistentVolumeClaim), err | 	return obj.(*api.PersistentVolumeClaim), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePersistentVolumeClaims) List(opts unversioned.ListOptions) (*api.PersistentVolumeClaimList, error) { | func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("persistentvolumeclaims", c.Namespace, opts), &api.PersistentVolumeClaimList{}) | 	obj, err := c.Fake.Invokes(NewListAction("persistentvolumeclaims", c.Namespace, opts), &api.PersistentVolumeClaimList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -68,7 +67,7 @@ func (c *FakePersistentVolumeClaims) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePersistentVolumeClaims) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("persistentvolumeclaims", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("persistentvolumeclaims", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -35,7 +34,7 @@ func (c *FakePersistentVolumes) Get(name string) (*api.PersistentVolume, error) | |||||||
| 	return obj.(*api.PersistentVolume), err | 	return obj.(*api.PersistentVolume), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePersistentVolumes) List(opts unversioned.ListOptions) (*api.PersistentVolumeList, error) { | func (c *FakePersistentVolumes) List(opts api.ListOptions) (*api.PersistentVolumeList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewRootListAction("persistentvolumes", opts), &api.PersistentVolumeList{}) | 	obj, err := c.Fake.Invokes(NewRootListAction("persistentvolumes", opts), &api.PersistentVolumeList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -67,7 +66,7 @@ func (c *FakePersistentVolumes) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePersistentVolumes) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewRootWatchAction("persistentvolumes", opts)) | 	return c.Fake.InvokesWatch(NewRootWatchAction("persistentvolumes", opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakePodTemplates) Get(name string) (*api.PodTemplate, error) { | |||||||
| 	return obj.(*api.PodTemplate), err | 	return obj.(*api.PodTemplate), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePodTemplates) List(opts unversioned.ListOptions) (*api.PodTemplateList, error) { | func (c *FakePodTemplates) List(opts api.ListOptions) (*api.PodTemplateList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("podtemplates", c.Namespace, opts), &api.PodTemplateList{}) | 	obj, err := c.Fake.Invokes(NewListAction("podtemplates", c.Namespace, opts), &api.PodTemplateList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,6 +69,6 @@ func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePodTemplates) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("podtemplates", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("podtemplates", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/labels" | 	"k8s.io/kubernetes/pkg/labels" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -40,12 +39,12 @@ func (c *FakePods) Get(name string) (*api.Pod, error) { | |||||||
| 	return obj.(*api.Pod), err | 	return obj.(*api.Pod), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePods) List(opts unversioned.ListOptions) (*api.PodList, error) { | func (c *FakePods) List(opts api.ListOptions) (*api.PodList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("pods", c.Namespace, opts), &api.PodList{}) | 	obj, err := c.Fake.Invokes(NewListAction("pods", c.Namespace, opts), &api.PodList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 	label := opts.LabelSelector.Selector | 	label := opts.LabelSelector | ||||||
| 	if label == nil { | 	if label == nil { | ||||||
| 		label = labels.Everything() | 		label = labels.Everything() | ||||||
| 	} | 	} | ||||||
| @@ -81,7 +80,7 @@ func (c *FakePods) Delete(name string, options *api.DeleteOptions) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakePods) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("pods", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("pods", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeReplicationControllers) Get(name string) (*api.ReplicationControlle | |||||||
| 	return obj.(*api.ReplicationController), err | 	return obj.(*api.ReplicationController), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeReplicationControllers) List(opts unversioned.ListOptions) (*api.ReplicationControllerList, error) { | func (c *FakeReplicationControllers) List(opts api.ListOptions) (*api.ReplicationControllerList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("replicationcontrollers", c.Namespace, opts), &api.ReplicationControllerList{}) | 	obj, err := c.Fake.Invokes(NewListAction("replicationcontrollers", c.Namespace, opts), &api.ReplicationControllerList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -78,6 +77,6 @@ func (c *FakeReplicationControllers) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeReplicationControllers) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("replicationcontrollers", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("replicationcontrollers", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeResourceQuotas) Get(name string) (*api.ResourceQuota, error) { | |||||||
| 	return obj.(*api.ResourceQuota), err | 	return obj.(*api.ResourceQuota), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeResourceQuotas) List(opts unversioned.ListOptions) (*api.ResourceQuotaList, error) { | func (c *FakeResourceQuotas) List(opts api.ListOptions) (*api.ResourceQuotaList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("resourcequotas", c.Namespace, opts), &api.ResourceQuotaList{}) | 	obj, err := c.Fake.Invokes(NewListAction("resourcequotas", c.Namespace, opts), &api.ResourceQuotaList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,7 +69,7 @@ func (c *FakeResourceQuotas) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeResourceQuotas) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("resourcequotas", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("resourcequotas", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeSecrets) Get(name string) (*api.Secret, error) { | |||||||
| 	return obj.(*api.Secret), err | 	return obj.(*api.Secret), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeSecrets) List(opts unversioned.ListOptions) (*api.SecretList, error) { | func (c *FakeSecrets) List(opts api.ListOptions) (*api.SecretList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("secrets", c.Namespace, opts), &api.SecretList{}) | 	obj, err := c.Fake.Invokes(NewListAction("secrets", c.Namespace, opts), &api.SecretList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,6 +69,6 @@ func (c *FakeSecrets) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeSecrets) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("secrets", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("secrets", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -38,7 +37,7 @@ func (c *FakeServiceAccounts) Get(name string) (*api.ServiceAccount, error) { | |||||||
| 	return obj.(*api.ServiceAccount), err | 	return obj.(*api.ServiceAccount), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeServiceAccounts) List(opts unversioned.ListOptions) (*api.ServiceAccountList, error) { | func (c *FakeServiceAccounts) List(opts api.ListOptions) (*api.ServiceAccountList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("serviceaccounts", c.Namespace, opts), &api.ServiceAccountList{}) | 	obj, err := c.Fake.Invokes(NewListAction("serviceaccounts", c.Namespace, opts), &api.ServiceAccountList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -70,6 +69,6 @@ func (c *FakeServiceAccounts) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeServiceAccounts) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("serviceaccounts", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("serviceaccounts", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package testclient | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -39,7 +38,7 @@ func (c *FakeServices) Get(name string) (*api.Service, error) { | |||||||
| 	return obj.(*api.Service), err | 	return obj.(*api.Service), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeServices) List(opts unversioned.ListOptions) (*api.ServiceList, error) { | func (c *FakeServices) List(opts api.ListOptions) (*api.ServiceList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("services", c.Namespace, opts), &api.ServiceList{}) | 	obj, err := c.Fake.Invokes(NewListAction("services", c.Namespace, opts), &api.ServiceList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -71,7 +70,7 @@ func (c *FakeServices) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeServices) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("services", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("services", c.Namespace, opts)) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ limitations under the License. | |||||||
| package testclient | package testclient | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	kclientlib "k8s.io/kubernetes/pkg/client/unversioned" | 	kclientlib "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -41,7 +41,7 @@ func (c *FakeThirdPartyResources) Get(name string) (*extensions.ThirdPartyResour | |||||||
| 	return obj.(*extensions.ThirdPartyResource), err | 	return obj.(*extensions.ThirdPartyResource), err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeThirdPartyResources) List(opts unversioned.ListOptions) (*extensions.ThirdPartyResourceList, error) { | func (c *FakeThirdPartyResources) List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error) { | ||||||
| 	obj, err := c.Fake.Invokes(NewListAction("thirdpartyresources", c.Namespace, opts), &extensions.ThirdPartyResourceList{}) | 	obj, err := c.Fake.Invokes(NewListAction("thirdpartyresources", c.Namespace, opts), &extensions.ThirdPartyResourceList{}) | ||||||
| 	if obj == nil { | 	if obj == nil { | ||||||
| 		return nil, err | 		return nil, err | ||||||
| @@ -78,6 +78,6 @@ func (c *FakeThirdPartyResources) Delete(name string) error { | |||||||
| 	return err | 	return err | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *FakeThirdPartyResources) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.Fake.InvokesWatch(NewWatchAction("thirdpartyresources", c.Namespace, opts)) | 	return c.Fake.InvokesWatch(NewWatchAction("thirdpartyresources", c.Namespace, opts)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -22,7 +22,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -33,7 +32,7 @@ func TestNewClient(t *testing.T) { | |||||||
| 	} | 	} | ||||||
| 	client := &Fake{} | 	client := &Fake{} | ||||||
| 	client.AddReactor("*", "*", ObjectReaction(o, testapi.Default.RESTMapper())) | 	client.AddReactor("*", "*", ObjectReaction(o, testapi.Default.RESTMapper())) | ||||||
| 	list, err := client.Services("test").List(unversioned.ListOptions{}) | 	list, err := client.Services("test").List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatal(err) | 		t.Fatal(err) | ||||||
| 	} | 	} | ||||||
| @@ -42,7 +41,7 @@ func TestNewClient(t *testing.T) { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// When list is invoked a second time, the same results are returned. | 	// When list is invoked a second time, the same results are returned. | ||||||
| 	list, err = client.Services("test").List(unversioned.ListOptions{}) | 	list, err = client.Services("test").List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatal(err) | 		t.Fatal(err) | ||||||
| 	} | 	} | ||||||
| @@ -64,12 +63,12 @@ func TestErrors(t *testing.T) { | |||||||
| 	}) | 	}) | ||||||
| 	client := &Fake{} | 	client := &Fake{} | ||||||
| 	client.AddReactor("*", "*", ObjectReaction(o, testapi.Default.RESTMapper())) | 	client.AddReactor("*", "*", ObjectReaction(o, testapi.Default.RESTMapper())) | ||||||
| 	_, err := client.Services("test").List(unversioned.ListOptions{}) | 	_, err := client.Services("test").List(api.ListOptions{}) | ||||||
| 	if !errors.IsNotFound(err) { | 	if !errors.IsNotFound(err) { | ||||||
| 		t.Fatalf("unexpected error: %v", err) | 		t.Fatalf("unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
| 	t.Logf("error: %#v", err.(*errors.StatusError).Status()) | 	t.Logf("error: %#v", err.(*errors.StatusError).Status()) | ||||||
| 	_, err = client.Services("test").List(unversioned.ListOptions{}) | 	_, err = client.Services("test").List(api.ListOptions{}) | ||||||
| 	if !errors.IsForbidden(err) { | 	if !errors.IsForbidden(err) { | ||||||
| 		t.Fatalf("unexpected error: %v", err) | 		t.Fatalf("unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -18,7 +18,6 @@ package unversioned | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
| @@ -29,13 +28,13 @@ type ThirdPartyResourceNamespacer interface { | |||||||
| } | } | ||||||
|  |  | ||||||
| type ThirdPartyResourceInterface interface { | type ThirdPartyResourceInterface interface { | ||||||
| 	List(opts unversioned.ListOptions) (*extensions.ThirdPartyResourceList, error) | 	List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error) | ||||||
| 	Get(name string) (*extensions.ThirdPartyResource, error) | 	Get(name string) (*extensions.ThirdPartyResource, error) | ||||||
| 	Create(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | 	Create(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | ||||||
| 	Update(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | 	Update(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | ||||||
| 	UpdateStatus(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | 	UpdateStatus(ctrl *extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error) | ||||||
| 	Delete(name string) error | 	Delete(name string) error | ||||||
| 	Watch(opts unversioned.ListOptions) (watch.Interface, error) | 	Watch(opts api.ListOptions) (watch.Interface, error) | ||||||
| } | } | ||||||
|  |  | ||||||
| // thirdPartyResources implements DaemonsSetsNamespacer interface | // thirdPartyResources implements DaemonsSetsNamespacer interface | ||||||
| @@ -51,7 +50,7 @@ func newThirdPartyResources(c *ExtensionsClient, namespace string) *thirdPartyRe | |||||||
| // Ensure statically that thirdPartyResources implements ThirdPartyResourcesInterface. | // Ensure statically that thirdPartyResources implements ThirdPartyResourcesInterface. | ||||||
| var _ ThirdPartyResourceInterface = &thirdPartyResources{} | var _ ThirdPartyResourceInterface = &thirdPartyResources{} | ||||||
|  |  | ||||||
| func (c *thirdPartyResources) List(opts unversioned.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { | func (c *thirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) { | ||||||
| 	result = &extensions.ThirdPartyResourceList{} | 	result = &extensions.ThirdPartyResourceList{} | ||||||
| 	err = c.r.Get().Namespace(c.ns).Resource("thirdpartyresources").VersionedParams(&opts, api.Scheme).Do().Into(result) | 	err = c.r.Get().Namespace(c.ns).Resource("thirdpartyresources").VersionedParams(&opts, api.Scheme).Do().Into(result) | ||||||
| 	return | 	return | ||||||
| @@ -91,7 +90,7 @@ func (c *thirdPartyResources) Delete(name string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| // Watch returns a watch.Interface that watches the requested daemon sets. | // Watch returns a watch.Interface that watches the requested daemon sets. | ||||||
| func (c *thirdPartyResources) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.r.Get(). | 	return c.r.Get(). | ||||||
| 		Prefix("watch"). | 		Prefix("watch"). | ||||||
| 		Namespace(c.ns). | 		Namespace(c.ns). | ||||||
|   | |||||||
| @@ -16,18 +16,14 @@ limitations under the License. | |||||||
|  |  | ||||||
| package unversioned_test | package unversioned_test | ||||||
|  |  | ||||||
| import ( |  | ||||||
| 	. "k8s.io/kubernetes/pkg/client/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/unversioned/testclient/simple" |  | ||||||
| ) |  | ||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
|  | 	. "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
|  | 	"k8s.io/kubernetes/pkg/client/unversioned/testclient/simple" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| func getThirdPartyResourceName() string { | func getThirdPartyResourceName() string { | ||||||
| @@ -58,7 +54,7 @@ func TestListThirdPartyResources(t *testing.T) { | |||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| 	} | 	} | ||||||
| 	receivedDSs, err := c.Setup(t).Extensions().ThirdPartyResources(ns).List(unversioned.ListOptions{}) | 	receivedDSs, err := c.Setup(t).Extensions().ThirdPartyResources(ns).List(api.ListOptions{}) | ||||||
| 	c.Validate(t, receivedDSs, err) | 	c.Validate(t, receivedDSs, err) | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -23,7 +23,6 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	"k8s.io/kubernetes/pkg/client/record" | 	"k8s.io/kubernetes/pkg/client/record" | ||||||
| @@ -96,10 +95,10 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle | |||||||
| 	// Manage addition/update of daemon sets. | 	// Manage addition/update of daemon sets. | ||||||
| 	dsc.dsStore.Store, dsc.dsController = framework.NewInformer( | 	dsc.dsStore.Store, dsc.dsController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).List(options) | 				return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).Watch(options) | 				return dsc.kubeClient.Extensions().DaemonSets(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -128,10 +127,10 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle | |||||||
| 	// more pods until all the effects (expectations) of a daemon set's create/delete have been observed. | 	// more pods until all the effects (expectations) of a daemon set's create/delete have been observed. | ||||||
| 	dsc.podStore.Store, dsc.podController = framework.NewInformer( | 	dsc.podStore.Store, dsc.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return dsc.kubeClient.Pods(api.NamespaceAll).List(options) | 				return dsc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return dsc.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return dsc.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -146,10 +145,10 @@ func NewDaemonSetsController(kubeClient client.Interface, resyncPeriod controlle | |||||||
| 	// Watch for new nodes or updates to nodes - daemon pods are launched on new nodes, and possibly when labels on nodes change, | 	// Watch for new nodes or updates to nodes - daemon pods are launched on new nodes, and possibly when labels on nodes change, | ||||||
| 	dsc.nodeStore.Store, dsc.nodeController = framework.NewInformer( | 	dsc.nodeStore.Store, dsc.nodeController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return dsc.kubeClient.Nodes().List(options) | 				return dsc.kubeClient.Nodes().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return dsc.kubeClient.Nodes().Watch(options) | 				return dsc.kubeClient.Nodes().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -23,7 +23,6 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/apis/extensions" | 	"k8s.io/kubernetes/pkg/apis/extensions" | ||||||
| 	"k8s.io/kubernetes/pkg/client/record" | 	"k8s.io/kubernetes/pkg/client/record" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| @@ -59,7 +58,7 @@ func (d *DeploymentController) Run(syncPeriod time.Duration) { | |||||||
| } | } | ||||||
|  |  | ||||||
| func (d *DeploymentController) reconcileDeployments() []error { | func (d *DeploymentController) reconcileDeployments() []error { | ||||||
| 	list, err := d.expClient.Deployments(api.NamespaceAll).List(unversioned.ListOptions{}) | 	list, err := d.expClient.Deployments(api.NamespaceAll).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return []error{fmt.Errorf("error listing deployments: %v", err)} | 		return []error{fmt.Errorf("error listing deployments: %v", err)} | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/endpoints" | 	"k8s.io/kubernetes/pkg/api/endpoints" | ||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/controller" | 	"k8s.io/kubernetes/pkg/controller" | ||||||
| @@ -62,10 +61,10 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync | |||||||
|  |  | ||||||
| 	e.serviceStore.Store, e.serviceController = framework.NewInformer( | 	e.serviceStore.Store, e.serviceController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.Services(api.NamespaceAll).List(options) | 				return e.client.Services(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.Services(api.NamespaceAll).Watch(options) | 				return e.client.Services(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -83,10 +82,10 @@ func NewEndpointController(client *client.Client, resyncPeriod controller.Resync | |||||||
|  |  | ||||||
| 	e.podStore.Store, e.podController = framework.NewInformer( | 	e.podStore.Store, e.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.Pods(api.NamespaceAll).List(options) | 				return e.client.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.Pods(api.NamespaceAll).Watch(options) | 				return e.client.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -385,7 +384,7 @@ func (e *EndpointController) syncService(key string) { | |||||||
| // some stragglers could have been left behind if the endpoint controller | // some stragglers could have been left behind if the endpoint controller | ||||||
| // reboots). | // reboots). | ||||||
| func (e *EndpointController) checkLeftoverEndpoints() { | func (e *EndpointController) checkLeftoverEndpoints() { | ||||||
| 	list, err := e.client.Endpoints(api.NamespaceAll).List(unversioned.ListOptions{}) | 	list, err := e.client.Endpoints(api.NamespaceAll).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		glog.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err) | 		glog.Errorf("Unable to list endpoints (%v); orphaned endpoints will not be cleaned up. (They're pretty harmless, but you can restart this component if you want another attempt made.)", err) | ||||||
| 		return | 		return | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/meta" | 	"k8s.io/kubernetes/pkg/api/meta" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/runtime" | 	"k8s.io/kubernetes/pkg/runtime" | ||||||
| 	"k8s.io/kubernetes/pkg/types" | 	"k8s.io/kubernetes/pkg/types" | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| @@ -122,7 +121,7 @@ func (f *FakeControllerSource) Change(e watch.Event, watchProbability float64) { | |||||||
| } | } | ||||||
|  |  | ||||||
| // List returns a list object, with its resource version set. | // List returns a list object, with its resource version set. | ||||||
| func (f *FakeControllerSource) List(options unversioned.ListOptions) (runtime.Object, error) { | func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, error) { | ||||||
| 	f.lock.RLock() | 	f.lock.RLock() | ||||||
| 	defer f.lock.RUnlock() | 	defer f.lock.RUnlock() | ||||||
| 	list := make([]runtime.Object, 0, len(f.items)) | 	list := make([]runtime.Object, 0, len(f.items)) | ||||||
| @@ -152,7 +151,7 @@ func (f *FakeControllerSource) List(options unversioned.ListOptions) (runtime.Ob | |||||||
|  |  | ||||||
| // Watch returns a watch, which will be pre-populated with all changes | // Watch returns a watch, which will be pre-populated with all changes | ||||||
| // after resourceVersion. | // after resourceVersion. | ||||||
| func (f *FakeControllerSource) Watch(options unversioned.ListOptions) (watch.Interface, error) { | func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, error) { | ||||||
| 	f.lock.RLock() | 	f.lock.RLock() | ||||||
| 	defer f.lock.RUnlock() | 	defer f.lock.RUnlock() | ||||||
| 	rc, err := strconv.Atoi(options.ResourceVersion) | 	rc, err := strconv.Atoi(options.ResourceVersion) | ||||||
|   | |||||||
| @@ -21,7 +21,6 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/watch" | 	"k8s.io/kubernetes/pkg/watch" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -65,13 +64,13 @@ func TestRCNumber(t *testing.T) { | |||||||
| 	source.Modify(pod("foo")) | 	source.Modify(pod("foo")) | ||||||
| 	source.Modify(pod("foo")) | 	source.Modify(pod("foo")) | ||||||
|  |  | ||||||
| 	w, err := source.Watch(unversioned.ListOptions{ResourceVersion: "1"}) | 	w, err := source.Watch(api.ListOptions{ResourceVersion: "1"}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatalf("Unexpected error: %v", err) | 		t.Fatalf("Unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
| 	go consume(t, w, []string{"2", "3"}, wg) | 	go consume(t, w, []string{"2", "3"}, wg) | ||||||
|  |  | ||||||
| 	list, err := source.List(unversioned.ListOptions{}) | 	list, err := source.List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatalf("Unexpected error: %v", err) | 		t.Fatalf("Unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
| @@ -79,13 +78,13 @@ func TestRCNumber(t *testing.T) { | |||||||
| 		t.Errorf("wanted %v, got %v", e, a) | 		t.Errorf("wanted %v, got %v", e, a) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	w2, err := source.Watch(unversioned.ListOptions{ResourceVersion: "2"}) | 	w2, err := source.Watch(api.ListOptions{ResourceVersion: "2"}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatalf("Unexpected error: %v", err) | 		t.Fatalf("Unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
| 	go consume(t, w2, []string{"3"}, wg) | 	go consume(t, w2, []string{"3"}, wg) | ||||||
|  |  | ||||||
| 	w3, err := source.Watch(unversioned.ListOptions{ResourceVersion: "3"}) | 	w3, err := source.Watch(api.ListOptions{ResourceVersion: "3"}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatalf("Unexpected error: %v", err) | 		t.Fatalf("Unexpected error: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -22,7 +22,6 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	"k8s.io/kubernetes/pkg/client/record" | 	"k8s.io/kubernetes/pkg/client/record" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| @@ -66,12 +65,12 @@ func New(kubeClient client.Interface, resyncPeriod controller.ResyncPeriodFunc, | |||||||
|  |  | ||||||
| 	gcc.podStore.Store, gcc.podStoreSyncer = framework.NewInformer( | 	gcc.podStore.Store, gcc.podStoreSyncer = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				options.FieldSelector.Selector = terminatedSelector | 				options.FieldSelector = terminatedSelector | ||||||
| 				return gcc.kubeClient.Pods(api.NamespaceAll).List(options) | 				return gcc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				options.FieldSelector.Selector = terminatedSelector | 				options.FieldSelector = terminatedSelector | ||||||
| 				return gcc.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return gcc.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -83,10 +83,10 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn | |||||||
|  |  | ||||||
| 	jm.jobStore.Store, jm.jobController = framework.NewInformer( | 	jm.jobStore.Store, jm.jobController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).List(options) | 				return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).Watch(options) | 				return jm.kubeClient.Extensions().Jobs(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -106,10 +106,10 @@ func NewJobController(kubeClient client.Interface, resyncPeriod controller.Resyn | |||||||
|  |  | ||||||
| 	jm.podStore.Store, jm.podController = framework.NewInformer( | 	jm.podStore.Store, jm.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return jm.kubeClient.Pods(api.NamespaceAll).List(options) | 				return jm.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return jm.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return jm.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -45,10 +45,10 @@ func NewNamespaceController(kubeClient client.Interface, versions *unversioned.A | |||||||
| 	var controller *framework.Controller | 	var controller *framework.Controller | ||||||
| 	_, controller = framework.NewInformer( | 	_, controller = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return kubeClient.Namespaces().List(options) | 				return kubeClient.Namespaces().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return kubeClient.Namespaces().Watch(options) | 				return kubeClient.Namespaces().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -337,7 +337,7 @@ func syncNamespace(kubeClient client.Interface, versions *unversioned.APIVersion | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteLimitRanges(kubeClient client.Interface, ns string) error { | func deleteLimitRanges(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.LimitRanges(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.LimitRanges(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -351,7 +351,7 @@ func deleteLimitRanges(kubeClient client.Interface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteResourceQuotas(kubeClient client.Interface, ns string) error { | func deleteResourceQuotas(kubeClient client.Interface, ns string) error { | ||||||
| 	resourceQuotas, err := kubeClient.ResourceQuotas(ns).List(unversioned.ListOptions{}) | 	resourceQuotas, err := kubeClient.ResourceQuotas(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -365,7 +365,7 @@ func deleteResourceQuotas(kubeClient client.Interface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteServiceAccounts(kubeClient client.Interface, ns string) error { | func deleteServiceAccounts(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.ServiceAccounts(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.ServiceAccounts(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -379,7 +379,7 @@ func deleteServiceAccounts(kubeClient client.Interface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteServices(kubeClient client.Interface, ns string) error { | func deleteServices(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.Services(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.Services(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -393,7 +393,7 @@ func deleteServices(kubeClient client.Interface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteReplicationControllers(kubeClient client.Interface, ns string) error { | func deleteReplicationControllers(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.ReplicationControllers(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.ReplicationControllers(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -407,7 +407,7 @@ func deleteReplicationControllers(kubeClient client.Interface, ns string) error | |||||||
| } | } | ||||||
|  |  | ||||||
| func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) (int64, error) { | func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) (int64, error) { | ||||||
| 	items, err := kubeClient.Pods(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.Pods(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return 0, err | 		return 0, err | ||||||
| 	} | 	} | ||||||
| @@ -436,11 +436,11 @@ func deletePods(kubeClient client.Interface, ns string, before unversioned.Time) | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteEvents(kubeClient client.Interface, ns string) error { | func deleteEvents(kubeClient client.Interface, ns string) error { | ||||||
| 	return kubeClient.Events(ns).DeleteCollection(nil, unversioned.ListOptions{}) | 	return kubeClient.Events(ns).DeleteCollection(nil, api.ListOptions{}) | ||||||
| } | } | ||||||
|  |  | ||||||
| func deleteSecrets(kubeClient client.Interface, ns string) error { | func deleteSecrets(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.Secrets(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.Secrets(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -454,7 +454,7 @@ func deleteSecrets(kubeClient client.Interface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deletePersistentVolumeClaims(kubeClient client.Interface, ns string) error { | func deletePersistentVolumeClaims(kubeClient client.Interface, ns string) error { | ||||||
| 	items, err := kubeClient.PersistentVolumeClaims(ns).List(unversioned.ListOptions{}) | 	items, err := kubeClient.PersistentVolumeClaims(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -468,7 +468,7 @@ func deletePersistentVolumeClaims(kubeClient client.Interface, ns string) error | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteHorizontalPodAutoscalers(expClient client.ExtensionsInterface, ns string) error { | func deleteHorizontalPodAutoscalers(expClient client.ExtensionsInterface, ns string) error { | ||||||
| 	items, err := expClient.HorizontalPodAutoscalers(ns).List(unversioned.ListOptions{}) | 	items, err := expClient.HorizontalPodAutoscalers(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -482,7 +482,7 @@ func deleteHorizontalPodAutoscalers(expClient client.ExtensionsInterface, ns str | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { | func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { | ||||||
| 	items, err := expClient.DaemonSets(ns).List(unversioned.ListOptions{}) | 	items, err := expClient.DaemonSets(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -496,7 +496,7 @@ func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteJobs(expClient client.ExtensionsInterface, ns string) error { | func deleteJobs(expClient client.ExtensionsInterface, ns string) error { | ||||||
| 	items, err := expClient.Jobs(ns).List(unversioned.ListOptions{}) | 	items, err := expClient.Jobs(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -510,7 +510,7 @@ func deleteJobs(expClient client.ExtensionsInterface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteDeployments(expClient client.ExtensionsInterface, ns string) error { | func deleteDeployments(expClient client.ExtensionsInterface, ns string) error { | ||||||
| 	items, err := expClient.Deployments(ns).List(unversioned.ListOptions{}) | 	items, err := expClient.Deployments(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -524,7 +524,7 @@ func deleteDeployments(expClient client.ExtensionsInterface, ns string) error { | |||||||
| } | } | ||||||
|  |  | ||||||
| func deleteIngress(expClient client.ExtensionsInterface, ns string) error { | func deleteIngress(expClient client.ExtensionsInterface, ns string) error { | ||||||
| 	items, err := expClient.Ingress(ns).List(unversioned.ListOptions{}) | 	items, err := expClient.Ingress(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -162,10 +162,10 @@ func NewNodeController( | |||||||
|  |  | ||||||
| 	nc.podStore.Store, nc.podController = framework.NewInformer( | 	nc.podStore.Store, nc.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return nc.kubeClient.Pods(api.NamespaceAll).List(options) | 				return nc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return nc.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return nc.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -178,10 +178,10 @@ func NewNodeController( | |||||||
| 	) | 	) | ||||||
| 	nc.nodeStore.Store, nc.nodeController = framework.NewInformer( | 	nc.nodeStore.Store, nc.nodeController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return nc.kubeClient.Nodes().List(options) | 				return nc.kubeClient.Nodes().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return nc.kubeClient.Nodes().Watch(options) | 				return nc.kubeClient.Nodes().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -354,7 +354,7 @@ func forcefullyDeletePod(c client.Interface, pod *api.Pod) { | |||||||
| // post "NodeReady==ConditionUnknown". It also evicts all pods if node is not ready or | // post "NodeReady==ConditionUnknown". It also evicts all pods if node is not ready or | ||||||
| // not reachable for a long period of time. | // not reachable for a long period of time. | ||||||
| func (nc *NodeController) monitorNodeStatus() error { | func (nc *NodeController) monitorNodeStatus() error { | ||||||
| 	nodes, err := nc.kubeClient.Nodes().List(unversioned.ListOptions{}) | 	nodes, err := nc.kubeClient.Nodes().List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| @@ -692,7 +692,7 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap | |||||||
| // the server could not be contacted. | // the server could not be contacted. | ||||||
| func (nc *NodeController) hasPods(nodeName string) (bool, error) { | func (nc *NodeController) hasPods(nodeName string) (bool, error) { | ||||||
| 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | ||||||
| 	options := unversioned.ListOptions{FieldSelector: unversioned.FieldSelector{selector}} | 	options := api.ListOptions{FieldSelector: selector} | ||||||
| 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return false, err | 		return false, err | ||||||
| @@ -727,7 +727,7 @@ func (nc *NodeController) cancelPodEviction(nodeName string) bool { | |||||||
| func (nc *NodeController) deletePods(nodeName string) (bool, error) { | func (nc *NodeController) deletePods(nodeName string) (bool, error) { | ||||||
| 	remaining := false | 	remaining := false | ||||||
| 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | ||||||
| 	options := unversioned.ListOptions{FieldSelector: unversioned.FieldSelector{selector}} | 	options := api.ListOptions{FieldSelector: selector} | ||||||
| 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return remaining, err | 		return remaining, err | ||||||
| @@ -767,7 +767,7 @@ func (nc *NodeController) terminatePods(nodeName string, since time.Time) (bool, | |||||||
| 	complete := true | 	complete := true | ||||||
|  |  | ||||||
| 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | 	selector := fields.OneTermEqualSelector(client.PodHost, nodeName) | ||||||
| 	options := unversioned.ListOptions{FieldSelector: unversioned.FieldSelector{selector}} | 	options := api.ListOptions{FieldSelector: selector} | ||||||
| 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | 	pods, err := nc.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return false, nextAttempt, err | 		return false, nextAttempt, err | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ func (m *FakeNodeHandler) Get(name string) (*api.Node, error) { | |||||||
| 	return nil, nil | 	return nil, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (m *FakeNodeHandler) List(opts unversioned.ListOptions) (*api.NodeList, error) { | func (m *FakeNodeHandler) List(opts api.ListOptions) (*api.NodeList, error) { | ||||||
| 	defer func() { m.RequestCount++ }() | 	defer func() { m.RequestCount++ }() | ||||||
| 	var nodes []*api.Node | 	var nodes []*api.Node | ||||||
| 	for i := 0; i < len(m.UpdatedNodes); i++ { | 	for i := 0; i < len(m.UpdatedNodes); i++ { | ||||||
| @@ -134,7 +134,7 @@ func (m *FakeNodeHandler) UpdateStatus(node *api.Node) (*api.Node, error) { | |||||||
| 	return node, nil | 	return node, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (m *FakeNodeHandler) Watch(opts unversioned.ListOptions) (watch.Interface, error) { | func (m *FakeNodeHandler) Watch(opts api.ListOptions) (watch.Interface, error) { | ||||||
| 	return nil, nil | 	return nil, nil | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -23,7 +23,6 @@ import ( | |||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/controller/framework" | 	"k8s.io/kubernetes/pkg/controller/framework" | ||||||
| @@ -55,10 +54,10 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time | |||||||
|  |  | ||||||
| 	_, volumeController := framework.NewInformer( | 	_, volumeController := framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return kubeClient.PersistentVolumes().List(options) | 				return kubeClient.PersistentVolumes().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return kubeClient.PersistentVolumes().Watch(options) | 				return kubeClient.PersistentVolumes().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -73,10 +72,10 @@ func NewPersistentVolumeClaimBinder(kubeClient client.Interface, syncPeriod time | |||||||
| 	) | 	) | ||||||
| 	_, claimController := framework.NewInformer( | 	_, claimController := framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return kubeClient.PersistentVolumeClaims(api.NamespaceAll).List(options) | 				return kubeClient.PersistentVolumeClaims(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return kubeClient.PersistentVolumeClaims(api.NamespaceAll).Watch(options) | 				return kubeClient.PersistentVolumeClaims(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -22,7 +22,6 @@ import ( | |||||||
| 	"time" | 	"time" | ||||||
|  |  | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/cloudprovider" | 	"k8s.io/kubernetes/pkg/cloudprovider" | ||||||
| @@ -74,10 +73,10 @@ func NewPersistentVolumeProvisionerController(client controllerClient, syncPerio | |||||||
|  |  | ||||||
| 	controller.volumeStore, controller.volumeController = framework.NewInformer( | 	controller.volumeStore, controller.volumeController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return client.ListPersistentVolumes(options) | 				return client.ListPersistentVolumes(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return client.WatchPersistentVolumes(options) | 				return client.WatchPersistentVolumes(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -92,10 +91,10 @@ func NewPersistentVolumeProvisionerController(client controllerClient, syncPerio | |||||||
| 	) | 	) | ||||||
| 	controller.claimStore, controller.claimController = framework.NewInformer( | 	controller.claimStore, controller.claimController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return client.ListPersistentVolumeClaims(api.NamespaceAll, options) | 				return client.ListPersistentVolumeClaims(api.NamespaceAll, options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return client.WatchPersistentVolumeClaims(api.NamespaceAll, options) | 				return client.WatchPersistentVolumeClaims(api.NamespaceAll, options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -345,16 +344,16 @@ func newProvisioner(plugin volume.ProvisionableVolumePlugin, claim *api.Persiste | |||||||
| // controllerClient abstracts access to PVs and PVCs.  Easy to mock for testing and wrap for real client. | // controllerClient abstracts access to PVs and PVCs.  Easy to mock for testing and wrap for real client. | ||||||
| type controllerClient interface { | type controllerClient interface { | ||||||
| 	CreatePersistentVolume(pv *api.PersistentVolume) (*api.PersistentVolume, error) | 	CreatePersistentVolume(pv *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
| 	ListPersistentVolumes(options unversioned.ListOptions) (*api.PersistentVolumeList, error) | 	ListPersistentVolumes(options api.ListOptions) (*api.PersistentVolumeList, error) | ||||||
| 	WatchPersistentVolumes(options unversioned.ListOptions) (watch.Interface, error) | 	WatchPersistentVolumes(options api.ListOptions) (watch.Interface, error) | ||||||
| 	GetPersistentVolume(name string) (*api.PersistentVolume, error) | 	GetPersistentVolume(name string) (*api.PersistentVolume, error) | ||||||
| 	UpdatePersistentVolume(volume *api.PersistentVolume) (*api.PersistentVolume, error) | 	UpdatePersistentVolume(volume *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
| 	DeletePersistentVolume(volume *api.PersistentVolume) error | 	DeletePersistentVolume(volume *api.PersistentVolume) error | ||||||
| 	UpdatePersistentVolumeStatus(volume *api.PersistentVolume) (*api.PersistentVolume, error) | 	UpdatePersistentVolumeStatus(volume *api.PersistentVolume) (*api.PersistentVolume, error) | ||||||
|  |  | ||||||
| 	GetPersistentVolumeClaim(namespace, name string) (*api.PersistentVolumeClaim, error) | 	GetPersistentVolumeClaim(namespace, name string) (*api.PersistentVolumeClaim, error) | ||||||
| 	ListPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (*api.PersistentVolumeClaimList, error) | 	ListPersistentVolumeClaims(namespace string, options api.ListOptions) (*api.PersistentVolumeClaimList, error) | ||||||
| 	WatchPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (watch.Interface, error) | 	WatchPersistentVolumeClaims(namespace string, options api.ListOptions) (watch.Interface, error) | ||||||
| 	UpdatePersistentVolumeClaim(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | 	UpdatePersistentVolumeClaim(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | ||||||
| 	UpdatePersistentVolumeClaimStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | 	UpdatePersistentVolumeClaimStatus(claim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) | ||||||
|  |  | ||||||
| @@ -376,11 +375,11 @@ func (c *realControllerClient) GetPersistentVolume(name string) (*api.Persistent | |||||||
| 	return c.client.PersistentVolumes().Get(name) | 	return c.client.PersistentVolumes().Get(name) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *realControllerClient) ListPersistentVolumes(options unversioned.ListOptions) (*api.PersistentVolumeList, error) { | func (c *realControllerClient) ListPersistentVolumes(options api.ListOptions) (*api.PersistentVolumeList, error) { | ||||||
| 	return c.client.PersistentVolumes().List(options) | 	return c.client.PersistentVolumes().List(options) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *realControllerClient) WatchPersistentVolumes(options unversioned.ListOptions) (watch.Interface, error) { | func (c *realControllerClient) WatchPersistentVolumes(options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.PersistentVolumes().Watch(options) | 	return c.client.PersistentVolumes().Watch(options) | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -404,11 +403,11 @@ func (c *realControllerClient) GetPersistentVolumeClaim(namespace, name string) | |||||||
| 	return c.client.PersistentVolumeClaims(namespace).Get(name) | 	return c.client.PersistentVolumeClaims(namespace).Get(name) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *realControllerClient) ListPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (*api.PersistentVolumeClaimList, error) { | func (c *realControllerClient) ListPersistentVolumeClaims(namespace string, options api.ListOptions) (*api.PersistentVolumeClaimList, error) { | ||||||
| 	return c.client.PersistentVolumeClaims(namespace).List(options) | 	return c.client.PersistentVolumeClaims(namespace).List(options) | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *realControllerClient) WatchPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (watch.Interface, error) { | func (c *realControllerClient) WatchPersistentVolumeClaims(namespace string, options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return c.client.PersistentVolumeClaims(namespace).Watch(options) | 	return c.client.PersistentVolumeClaims(namespace).Watch(options) | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,7 +25,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api/errors" | 	"k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/testapi" | 	"k8s.io/kubernetes/pkg/api/testapi" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" | 	fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" | ||||||
| 	"k8s.io/kubernetes/pkg/util" | 	"k8s.io/kubernetes/pkg/util" | ||||||
| @@ -185,13 +184,13 @@ func (c *mockControllerClient) CreatePersistentVolume(pv *api.PersistentVolume) | |||||||
| 	return c.volume, nil | 	return c.volume, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *mockControllerClient) ListPersistentVolumes(options unversioned.ListOptions) (*api.PersistentVolumeList, error) { | func (c *mockControllerClient) ListPersistentVolumes(options api.ListOptions) (*api.PersistentVolumeList, error) { | ||||||
| 	return &api.PersistentVolumeList{ | 	return &api.PersistentVolumeList{ | ||||||
| 		Items: []api.PersistentVolume{*c.volume}, | 		Items: []api.PersistentVolume{*c.volume}, | ||||||
| 	}, nil | 	}, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *mockControllerClient) WatchPersistentVolumes(options unversioned.ListOptions) (watch.Interface, error) { | func (c *mockControllerClient) WatchPersistentVolumes(options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return watch.NewFake(), nil | 	return watch.NewFake(), nil | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -216,13 +215,13 @@ func (c *mockControllerClient) GetPersistentVolumeClaim(namespace, name string) | |||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *mockControllerClient) ListPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (*api.PersistentVolumeClaimList, error) { | func (c *mockControllerClient) ListPersistentVolumeClaims(namespace string, options api.ListOptions) (*api.PersistentVolumeClaimList, error) { | ||||||
| 	return &api.PersistentVolumeClaimList{ | 	return &api.PersistentVolumeClaimList{ | ||||||
| 		Items: []api.PersistentVolumeClaim{*c.claim}, | 		Items: []api.PersistentVolumeClaim{*c.claim}, | ||||||
| 	}, nil | 	}, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func (c *mockControllerClient) WatchPersistentVolumeClaims(namespace string, options unversioned.ListOptions) (watch.Interface, error) { | func (c *mockControllerClient) WatchPersistentVolumeClaims(namespace string, options api.ListOptions) (watch.Interface, error) { | ||||||
| 	return watch.NewFake(), nil | 	return watch.NewFake(), nil | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -22,7 +22,6 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/cloudprovider" | 	"k8s.io/kubernetes/pkg/cloudprovider" | ||||||
| @@ -64,10 +63,10 @@ func NewPersistentVolumeRecycler(kubeClient client.Interface, syncPeriod time.Du | |||||||
|  |  | ||||||
| 	_, volumeController := framework.NewInformer( | 	_, volumeController := framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return kubeClient.PersistentVolumes().List(options) | 				return kubeClient.PersistentVolumes().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return kubeClient.PersistentVolumes().Watch(options) | 				return kubeClient.PersistentVolumes().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -173,7 +173,7 @@ func (a *HorizontalController) reconcileAutoscaler(hpa extensions.HorizontalPodA | |||||||
|  |  | ||||||
| func (a *HorizontalController) reconcileAutoscalers() error { | func (a *HorizontalController) reconcileAutoscalers() error { | ||||||
| 	ns := api.NamespaceAll | 	ns := api.NamespaceAll | ||||||
| 	list, err := a.client.Extensions().HorizontalPodAutoscalers(ns).List(unversioned.ListOptions{}) | 	list, err := a.client.Extensions().HorizontalPodAutoscalers(ns).List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return fmt.Errorf("error listing nodes: %v", err) | 		return fmt.Errorf("error listing nodes: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -25,7 +25,6 @@ import ( | |||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/labels" | 	"k8s.io/kubernetes/pkg/labels" | ||||||
|  |  | ||||||
| @@ -120,7 +119,7 @@ func (h *HeapsterMetricsClient) GetCPUUtilization(namespace string, selector map | |||||||
| func (h *HeapsterMetricsClient) GetResourceConsumptionAndRequest(resourceName api.ResourceName, namespace string, selector map[string]string) (consumption *ResourceConsumption, request *resource.Quantity, timestamp time.Time, err error) { | func (h *HeapsterMetricsClient) GetResourceConsumptionAndRequest(resourceName api.ResourceName, namespace string, selector map[string]string) (consumption *ResourceConsumption, request *resource.Quantity, timestamp time.Time, err error) { | ||||||
| 	labelSelector := labels.SelectorFromSet(labels.Set(selector)) | 	labelSelector := labels.SelectorFromSet(labels.Set(selector)) | ||||||
| 	podList, err := h.client.Pods(namespace). | 	podList, err := h.client.Pods(namespace). | ||||||
| 		List(unversioned.ListOptions{LabelSelector: unversioned.LabelSelector{labelSelector}}) | 		List(api.ListOptions{LabelSelector: labelSelector}) | ||||||
|  |  | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return nil, nil, time.Time{}, fmt.Errorf("failed to get pod list: %v", err) | 		return nil, nil, time.Time{}, fmt.Errorf("failed to get pod list: %v", err) | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	"k8s.io/kubernetes/pkg/client/record" | 	"k8s.io/kubernetes/pkg/client/record" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| @@ -107,10 +106,10 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller. | |||||||
|  |  | ||||||
| 	rm.rcStore.Store, rm.rcController = framework.NewInformer( | 	rm.rcStore.Store, rm.rcController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return rm.kubeClient.ReplicationControllers(api.NamespaceAll).List(options) | 				return rm.kubeClient.ReplicationControllers(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return rm.kubeClient.ReplicationControllers(api.NamespaceAll).Watch(options) | 				return rm.kubeClient.ReplicationControllers(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -148,10 +147,10 @@ func NewReplicationManager(kubeClient client.Interface, resyncPeriod controller. | |||||||
|  |  | ||||||
| 	rm.podStore.Store, rm.podController = framework.NewInformer( | 	rm.podStore.Store, rm.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return rm.kubeClient.Pods(api.NamespaceAll).List(options) | 				return rm.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return rm.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return rm.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -23,7 +23,6 @@ import ( | |||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/resource" | 	"k8s.io/kubernetes/pkg/api/resource" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/controller" | 	"k8s.io/kubernetes/pkg/controller" | ||||||
| @@ -65,10 +64,10 @@ func NewResourceQuotaController(kubeClient client.Interface, resyncPeriod contro | |||||||
|  |  | ||||||
| 	rq.rqIndexer, rq.rqController = framework.NewIndexerInformer( | 	rq.rqIndexer, rq.rqController = framework.NewIndexerInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return rq.kubeClient.ResourceQuotas(api.NamespaceAll).List(options) | 				return rq.kubeClient.ResourceQuotas(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return rq.kubeClient.ResourceQuotas(api.NamespaceAll).Watch(options) | 				return rq.kubeClient.ResourceQuotas(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -105,10 +104,10 @@ func NewResourceQuotaController(kubeClient client.Interface, resyncPeriod contro | |||||||
| 	// release compute resources from any associated quota. | 	// release compute resources from any associated quota. | ||||||
| 	rq.podStore.Store, rq.podController = framework.NewInformer( | 	rq.podStore.Store, rq.podController = framework.NewInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return rq.kubeClient.Pods(api.NamespaceAll).List(options) | 				return rq.kubeClient.Pods(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return rq.kubeClient.Pods(api.NamespaceAll).Watch(options) | 				return rq.kubeClient.Pods(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -265,7 +264,7 @@ func (rq *ResourceQuotaController) syncResourceQuota(quota api.ResourceQuota) (e | |||||||
|  |  | ||||||
| 	pods := &api.PodList{} | 	pods := &api.PodList{} | ||||||
| 	if set[api.ResourcePods] || set[api.ResourceMemory] || set[api.ResourceCPU] { | 	if set[api.ResourcePods] || set[api.ResourceMemory] || set[api.ResourceCPU] { | ||||||
| 		pods, err = rq.kubeClient.Pods(usage.Namespace).List(unversioned.ListOptions{}) | 		pods, err = rq.kubeClient.Pods(usage.Namespace).List(api.ListOptions{}) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return err | 			return err | ||||||
| 		} | 		} | ||||||
| @@ -288,31 +287,31 @@ func (rq *ResourceQuotaController) syncResourceQuota(quota api.ResourceQuota) (e | |||||||
| 		case api.ResourcePods: | 		case api.ResourcePods: | ||||||
| 			value = resource.NewQuantity(int64(len(filteredPods)), resource.DecimalSI) | 			value = resource.NewQuantity(int64(len(filteredPods)), resource.DecimalSI) | ||||||
| 		case api.ResourceServices: | 		case api.ResourceServices: | ||||||
| 			items, err := rq.kubeClient.Services(usage.Namespace).List(unversioned.ListOptions{}) | 			items, err := rq.kubeClient.Services(usage.Namespace).List(api.ListOptions{}) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
| 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | ||||||
| 		case api.ResourceReplicationControllers: | 		case api.ResourceReplicationControllers: | ||||||
| 			items, err := rq.kubeClient.ReplicationControllers(usage.Namespace).List(unversioned.ListOptions{}) | 			items, err := rq.kubeClient.ReplicationControllers(usage.Namespace).List(api.ListOptions{}) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
| 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | ||||||
| 		case api.ResourceQuotas: | 		case api.ResourceQuotas: | ||||||
| 			items, err := rq.kubeClient.ResourceQuotas(usage.Namespace).List(unversioned.ListOptions{}) | 			items, err := rq.kubeClient.ResourceQuotas(usage.Namespace).List(api.ListOptions{}) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
| 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | ||||||
| 		case api.ResourceSecrets: | 		case api.ResourceSecrets: | ||||||
| 			items, err := rq.kubeClient.Secrets(usage.Namespace).List(unversioned.ListOptions{}) | 			items, err := rq.kubeClient.Secrets(usage.Namespace).List(api.ListOptions{}) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
| 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | 			value = resource.NewQuantity(int64(len(items.Items)), resource.DecimalSI) | ||||||
| 		case api.ResourcePersistentVolumeClaims: | 		case api.ResourcePersistentVolumeClaims: | ||||||
| 			items, err := rq.kubeClient.PersistentVolumeClaims(usage.Namespace).List(unversioned.ListOptions{}) | 			items, err := rq.kubeClient.PersistentVolumeClaims(usage.Namespace).List(api.ListOptions{}) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
|   | |||||||
| @@ -23,7 +23,6 @@ import ( | |||||||
|  |  | ||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/cloudprovider" | 	"k8s.io/kubernetes/pkg/cloudprovider" | ||||||
| 	"k8s.io/kubernetes/pkg/util" | 	"k8s.io/kubernetes/pkg/util" | ||||||
| @@ -60,7 +59,7 @@ func (rc *RouteController) reconcileNodeRoutes() error { | |||||||
| 	} | 	} | ||||||
| 	// TODO (cjcullen): use pkg/controller/framework.NewInformer to watch this | 	// TODO (cjcullen): use pkg/controller/framework.NewInformer to watch this | ||||||
| 	// and reduce the number of lists needed. | 	// and reduce the number of lists needed. | ||||||
| 	nodeList, err := rc.kubeClient.Nodes().List(unversioned.ListOptions{}) | 	nodeList, err := rc.kubeClient.Nodes().List(api.ListOptions{}) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return fmt.Errorf("error listing nodes: %v", err) | 		return fmt.Errorf("error listing nodes: %v", err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ import ( | |||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	apierrs "k8s.io/kubernetes/pkg/api/errors" | 	apierrs "k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/meta" | 	"k8s.io/kubernetes/pkg/api/meta" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/controller/framework" | 	"k8s.io/kubernetes/pkg/controller/framework" | ||||||
| @@ -80,12 +79,12 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo | |||||||
| 	} | 	} | ||||||
| 	e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( | 	e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				options.FieldSelector.Selector = accountSelector | 				options.FieldSelector = accountSelector | ||||||
| 				return e.client.ServiceAccounts(api.NamespaceAll).List(options) | 				return e.client.ServiceAccounts(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				options.FieldSelector.Selector = accountSelector | 				options.FieldSelector = accountSelector | ||||||
| 				return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) | 				return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -99,10 +98,10 @@ func NewServiceAccountsController(cl client.Interface, options ServiceAccountsCo | |||||||
|  |  | ||||||
| 	e.namespaces, e.namespaceController = framework.NewIndexerInformer( | 	e.namespaces, e.namespaceController = framework.NewIndexerInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.Namespaces().List(options) | 				return e.client.Namespaces().List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.Namespaces().Watch(options) | 				return e.client.Namespaces().Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
| @@ -24,7 +24,6 @@ import ( | |||||||
| 	"github.com/golang/glog" | 	"github.com/golang/glog" | ||||||
| 	"k8s.io/kubernetes/pkg/api" | 	"k8s.io/kubernetes/pkg/api" | ||||||
| 	apierrors "k8s.io/kubernetes/pkg/api/errors" | 	apierrors "k8s.io/kubernetes/pkg/api/errors" | ||||||
| 	"k8s.io/kubernetes/pkg/api/unversioned" |  | ||||||
| 	"k8s.io/kubernetes/pkg/client/cache" | 	"k8s.io/kubernetes/pkg/client/cache" | ||||||
| 	client "k8s.io/kubernetes/pkg/client/unversioned" | 	client "k8s.io/kubernetes/pkg/client/unversioned" | ||||||
| 	"k8s.io/kubernetes/pkg/controller/framework" | 	"k8s.io/kubernetes/pkg/controller/framework" | ||||||
| @@ -62,10 +61,10 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) * | |||||||
|  |  | ||||||
| 	e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( | 	e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				return e.client.ServiceAccounts(api.NamespaceAll).List(options) | 				return e.client.ServiceAccounts(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) | 				return e.client.ServiceAccounts(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
| @@ -82,12 +81,12 @@ func NewTokensController(cl client.Interface, options TokensControllerOptions) * | |||||||
| 	tokenSelector := fields.SelectorFromSet(map[string]string{client.SecretType: string(api.SecretTypeServiceAccountToken)}) | 	tokenSelector := fields.SelectorFromSet(map[string]string{client.SecretType: string(api.SecretTypeServiceAccountToken)}) | ||||||
| 	e.secrets, e.secretController = framework.NewIndexerInformer( | 	e.secrets, e.secretController = framework.NewIndexerInformer( | ||||||
| 		&cache.ListWatch{ | 		&cache.ListWatch{ | ||||||
| 			ListFunc: func(options unversioned.ListOptions) (runtime.Object, error) { | 			ListFunc: func(options api.ListOptions) (runtime.Object, error) { | ||||||
| 				options.FieldSelector.Selector = tokenSelector | 				options.FieldSelector = tokenSelector | ||||||
| 				return e.client.Secrets(api.NamespaceAll).List(options) | 				return e.client.Secrets(api.NamespaceAll).List(options) | ||||||
| 			}, | 			}, | ||||||
| 			WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) { | 			WatchFunc: func(options api.ListOptions) (watch.Interface, error) { | ||||||
| 				options.FieldSelector.Selector = tokenSelector | 				options.FieldSelector = tokenSelector | ||||||
| 				return e.client.Secrets(api.NamespaceAll).Watch(options) | 				return e.client.Secrets(api.NamespaceAll).Watch(options) | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	 Wojciech Tyczynski
					Wojciech Tyczynski