Use unversioned.ListOptions in clients.

This commit is contained in:
Wojciech Tyczynski
2015-11-17 10:59:13 +01:00
parent f3753c02ed
commit b6ef62af24
96 changed files with 249 additions and 214 deletions

View File

@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/meta"
"k8s.io/kubernetes/pkg/api/unversioned"
"k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/conversion"
"k8s.io/kubernetes/pkg/runtime"
@@ -395,7 +396,7 @@ func (lw *cacherListerWatcher) List() (runtime.Object, error) {
}
// Implements cache.ListerWatcher interface.
func (lw *cacherListerWatcher) Watch(options api.ListOptions) (watch.Interface, error) {
func (lw *cacherListerWatcher) Watch(options unversioned.ListOptions) (watch.Interface, error) {
version, err := ParseWatchResourceVersion(options.ResourceVersion, lw.resourcePrefix)
if err != nil {
return nil, err

View File

@@ -250,11 +250,11 @@ func TestWaitUntilFreshAndList(t *testing.T) {
type testLW struct {
ListFunc func() (runtime.Object, error)
WatchFunc func(options api.ListOptions) (watch.Interface, error)
WatchFunc func(options unversioned.ListOptions) (watch.Interface, error)
}
func (t *testLW) List() (runtime.Object, error) { return t.ListFunc() }
func (t *testLW) Watch(options api.ListOptions) (watch.Interface, error) {
func (t *testLW) Watch(options unversioned.ListOptions) (watch.Interface, error) {
return t.WatchFunc(options)
}
@@ -269,7 +269,7 @@ func TestReflectorForWatchCache(t *testing.T) {
}
lw := &testLW{
WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
WatchFunc: func(options unversioned.ListOptions) (watch.Interface, error) {
fw := watch.NewFake()
go fw.Stop()
return fw, nil