From a4b9aa713bf3a5a124f6bb70207a7033536ca0fd Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Wed, 27 Sep 2023 13:39:37 +0200 Subject: [PATCH] bump(openshift/client-go,library-go) --- go.mod | 4 +- go.sum | 8 +- .../config/clientset/versioned/clientset.go | 3 +- .../config/clientset/versioned/doc.go | 4 - .../informers/externalversions/factory.go | 81 +++++++++++++++++-- .../operator/clientset/versioned/clientset.go | 3 +- .../operator/clientset/versioned/doc.go | 4 - .../operator/v1/fake/fake_authentication.go | 71 ++++++++-------- .../operator/v1/fake/fake_cloudcredential.go | 71 ++++++++-------- .../operator/v1/fake/fake_clustercsidriver.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_config.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_console.go | 71 ++++++++-------- .../v1/fake/fake_csisnapshotcontroller.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_dns.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_etcd.go | 71 ++++++++-------- .../v1/fake/fake_ingresscontroller.go | 71 ++++++++-------- .../operator/v1/fake/fake_insightsoperator.go | 71 ++++++++-------- .../operator/v1/fake/fake_kubeapiserver.go | 71 ++++++++-------- .../v1/fake/fake_kubecontrollermanager.go | 71 ++++++++-------- .../operator/v1/fake/fake_kubescheduler.go | 71 ++++++++-------- .../fake/fake_kubestorageversionmigrator.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_network.go | 71 ++++++++-------- .../v1/fake/fake_openshiftapiserver.go | 71 ++++++++-------- .../fake/fake_openshiftcontrollermanager.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_serviceca.go | 71 ++++++++-------- .../v1/fake/fake_servicecatalogapiserver.go | 71 ++++++++-------- .../fake_servicecatalogcontrollermanager.go | 71 ++++++++-------- .../typed/operator/v1/fake/fake_storage.go | 71 ++++++++-------- .../operator/v1alpha1/fake/fake_etcdbackup.go | 5 +- .../fake/fake_imagecontentsourcepolicy.go | 5 +- .../typed/operator/v1alpha1/fake/fake_olm.go | 5 +- .../informers/externalversions/factory.go | 81 +++++++++++++++++-- .../clientset/versioned/clientset.go | 3 +- .../clientset/versioned/doc.go | 4 - .../informers/externalversions/factory.go | 81 +++++++++++++++++-- vendor/modules.txt | 4 +- 36 files changed, 980 insertions(+), 806 deletions(-) delete mode 100644 vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go delete mode 100644 vendor/github.com/openshift/client-go/operator/clientset/versioned/doc.go delete mode 100644 vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/doc.go diff --git a/go.mod b/go.mod index a7d9920248..bc6f6e32b2 100644 --- a/go.mod +++ b/go.mod @@ -14,8 +14,8 @@ require ( github.com/miekg/dns v1.1.25 github.com/openshift/api v0.0.0-20230915112357-693d4b64813c github.com/openshift/build-machinery-go v0.0.0-20230228230858-4cd708338479 - github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7 - github.com/openshift/library-go v0.0.0-20230921140650-cf7c1f73089c + github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 + github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4 github.com/pkg/profile v1.5.0 // indirect github.com/prometheus/client_golang v1.16.0 github.com/spf13/cobra v1.7.0 diff --git a/go.sum b/go.sum index 24aea97079..8c76aaea91 100644 --- a/go.sum +++ b/go.sum @@ -254,10 +254,10 @@ github.com/openshift/api v0.0.0-20230915112357-693d4b64813c h1:ro/BvvpAikMoZc/fs github.com/openshift/api v0.0.0-20230915112357-693d4b64813c/go.mod h1:NFgA+laiQtptmjsp1trDnGqjV62nYzlUfQ6P5I9oqXA= github.com/openshift/build-machinery-go v0.0.0-20230228230858-4cd708338479 h1:IU2KU1kzg7/dfiZO4uPJY1G5Wp1k/IiXfYesc+quwaE= github.com/openshift/build-machinery-go v0.0.0-20230228230858-4cd708338479/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= -github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7 h1:+5WyBC1jCqbMwFNn+uW71zcarZshuD5NCnU0/tHHn+0= -github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7/go.mod h1:ihUJrhBcYAGYQrJu/gP2OMgfVds5f5z5kbeLNBqjHLo= -github.com/openshift/library-go v0.0.0-20230921140650-cf7c1f73089c h1:de8LcCcBANs7y5M4hChA/W/ZiwJLt1HFOY7tXViIZ64= -github.com/openshift/library-go v0.0.0-20230921140650-cf7c1f73089c/go.mod h1:Y3kMcQhx+oARET073sjj5YruA6Ef4zdAbh9w/ikU7DA= +github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 h1:W1N/3nVciqmjPjn2xldHjb0AwwCQzlGxLvX5BCgE8H4= +github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1/go.mod h1:ihUJrhBcYAGYQrJu/gP2OMgfVds5f5z5kbeLNBqjHLo= +github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4 h1:nNPH6wOCPP6XLDyHECflAlgW7xLorcUq7wl0vqyRQ34= +github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4/go.mod h1:hl8bxWuFMM72N4YH7FKLGWtYhDz/A0xwvaa8Yr5fxYU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go index f2559671a1..29896542d0 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go @@ -19,8 +19,7 @@ type Interface interface { ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient configV1 *configv1.ConfigV1Client diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go deleted file mode 100644 index 0e0c2a8900..0000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go index ff9a302a22..f6c30203aa 100644 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go +++ b/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go @@ -31,6 +31,11 @@ type sharedInformerFactory struct { // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool } // WithCustomResyncConfig sets a custom resync period for the specified informer types. @@ -91,20 +96,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() + if f.shuttingDown { + return + } + for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - go informer.Run(stopCh) + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() f.startedInformers[informerType] = true } } } -// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() @@ -126,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref return res } -// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// InformerFor returns the SharedIndexInformer for obj using an internal // client. func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { f.lock.Lock() @@ -151,11 +175,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // SharedInformerFactory provides shared informers for resources in all known // API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + Config() config.Interface } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go index 12aafefacb..326e04676b 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/clientset.go @@ -19,8 +19,7 @@ type Interface interface { OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient operatorV1 *operatorv1.OperatorV1Client diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/doc.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/doc.go deleted file mode 100644 index 0e0c2a8900..0000000000 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go index 302aeafa49..1fba016136 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeAuthentications struct { Fake *FakeOperatorV1 } -var authenticationsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "authentications"} +var authenticationsResource = v1.SchemeGroupVersion.WithResource("authentications") -var authenticationsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Authentication"} +var authenticationsKind = v1.SchemeGroupVersion.WithKind("Authentication") // Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any. -func (c *FakeAuthentications) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(authenticationsResource, name), &operatorv1.Authentication{}) + Invokes(testing.NewRootGetAction(authenticationsResource, name), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // List takes label and field selectors, and returns the list of Authentications that match those selectors. -func (c *FakeAuthentications) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.AuthenticationList, err error) { +func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AuthenticationList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(authenticationsResource, authenticationsKind, opts), &operatorv1.AuthenticationList{}) + Invokes(testing.NewRootListAction(authenticationsResource, authenticationsKind, opts), &v1.AuthenticationList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeAuthentications) List(ctx context.Context, opts v1.ListOptions) (re if label == nil { label = labels.Everything() } - list := &operatorv1.AuthenticationList{ListMeta: obj.(*operatorv1.AuthenticationList).ListMeta} - for _, item := range obj.(*operatorv1.AuthenticationList).Items { + list := &v1.AuthenticationList{ListMeta: obj.(*v1.AuthenticationList).ListMeta} + for _, item := range obj.(*v1.AuthenticationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeAuthentications) List(ctx context.Context, opts v1.ListOptions) (re } // Watch returns a watch.Interface that watches the requested authentications. -func (c *FakeAuthentications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeAuthentications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(authenticationsResource, opts)) } // Create takes the representation of a authentication and creates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Create(ctx context.Context, authentication *operatorv1.Authentication, opts v1.CreateOptions) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (result *v1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(authenticationsResource, authentication), &operatorv1.Authentication{}) + Invokes(testing.NewRootCreateAction(authenticationsResource, authentication), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Update(ctx context.Context, authentication *operatorv1.Authentication, opts v1.UpdateOptions) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(authenticationsResource, authentication), &operatorv1.Authentication{}) + Invokes(testing.NewRootUpdateAction(authenticationsResource, authentication), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *operatorv1.Authentication, opts v1.UpdateOptions) (*operatorv1.Authentication, error) { +func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(authenticationsResource, "status", authentication), &operatorv1.Authentication{}) + Invokes(testing.NewRootUpdateSubresourceAction(authenticationsResource, "status", authentication), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // Delete takes name of the authentication and deletes it. Returns an error if one occurs. -func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &operatorv1.Authentication{}) + Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &v1.Authentication{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(authenticationsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.AuthenticationList{}) + _, err := c.Fake.Invokes(action, &v1.AuthenticationList{}) return err } // Patch applies the patch and returns the patched authentication. -func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, name, pt, data, subresources...), &operatorv1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, name, pt, data, subresources...), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // Apply takes the given apply declarative configuration, applies it and returns the applied authentication. -func (c *FakeAuthentications) Apply(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) Apply(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { if authentication == nil { return nil, fmt.Errorf("authentication provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeAuthentications) Apply(ctx context.Context, authentication *applyco return nil, fmt.Errorf("authentication.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data), &operatorv1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Authentication, err error) { +func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { if authentication == nil { return nil, fmt.Errorf("authentication provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *a return nil, fmt.Errorf("authentication.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data, "status"), &v1.Authentication{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Authentication), err + return obj.(*v1.Authentication), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go index 17e7c2c222..2c21b16579 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeCloudCredentials struct { Fake *FakeOperatorV1 } -var cloudcredentialsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "cloudcredentials"} +var cloudcredentialsResource = v1.SchemeGroupVersion.WithResource("cloudcredentials") -var cloudcredentialsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "CloudCredential"} +var cloudcredentialsKind = v1.SchemeGroupVersion.WithKind("CloudCredential") // Get takes name of the cloudCredential, and returns the corresponding cloudCredential object, and an error if there is any. -func (c *FakeCloudCredentials) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(cloudcredentialsResource, name), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootGetAction(cloudcredentialsResource, name), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // List takes label and field selectors, and returns the list of CloudCredentials that match those selectors. -func (c *FakeCloudCredentials) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.CloudCredentialList, err error) { +func (c *FakeCloudCredentials) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CloudCredentialList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(cloudcredentialsResource, cloudcredentialsKind, opts), &operatorv1.CloudCredentialList{}) + Invokes(testing.NewRootListAction(cloudcredentialsResource, cloudcredentialsKind, opts), &v1.CloudCredentialList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeCloudCredentials) List(ctx context.Context, opts v1.ListOptions) (r if label == nil { label = labels.Everything() } - list := &operatorv1.CloudCredentialList{ListMeta: obj.(*operatorv1.CloudCredentialList).ListMeta} - for _, item := range obj.(*operatorv1.CloudCredentialList).Items { + list := &v1.CloudCredentialList{ListMeta: obj.(*v1.CloudCredentialList).ListMeta} + for _, item := range obj.(*v1.CloudCredentialList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeCloudCredentials) List(ctx context.Context, opts v1.ListOptions) (r } // Watch returns a watch.Interface that watches the requested cloudCredentials. -func (c *FakeCloudCredentials) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCloudCredentials) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(cloudcredentialsResource, opts)) } // Create takes the representation of a cloudCredential and creates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Create(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.CreateOptions) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Create(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.CreateOptions) (result *v1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(cloudcredentialsResource, cloudCredential), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootCreateAction(cloudcredentialsResource, cloudCredential), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // Update takes the representation of a cloudCredential and updates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Update(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.UpdateOptions) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Update(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (result *v1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(cloudcredentialsResource, cloudCredential), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootUpdateAction(cloudcredentialsResource, cloudCredential), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCloudCredentials) UpdateStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.UpdateOptions) (*operatorv1.CloudCredential, error) { +func (c *FakeCloudCredentials) UpdateStatus(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (*v1.CloudCredential, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(cloudcredentialsResource, "status", cloudCredential), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootUpdateSubresourceAction(cloudcredentialsResource, "status", cloudCredential), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // Delete takes name of the cloudCredential and deletes it. Returns an error if one occurs. -func (c *FakeCloudCredentials) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeCloudCredentials) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(cloudcredentialsResource, name, opts), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootDeleteActionWithOptions(cloudcredentialsResource, name, opts), &v1.CloudCredential{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCloudCredentials) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeCloudCredentials) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(cloudcredentialsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.CloudCredentialList{}) + _, err := c.Fake.Invokes(action, &v1.CloudCredentialList{}) return err } // Patch applies the patch and returns the patched cloudCredential. -func (c *FakeCloudCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, name, pt, data, subresources...), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, name, pt, data, subresources...), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // Apply takes the given apply declarative configuration, applies it and returns the applied cloudCredential. -func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { if cloudCredential == nil { return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *apply return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CloudCredential, err error) { +func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { if cloudCredential == nil { return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data, "status"), &v1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CloudCredential), err + return obj.(*v1.CloudCredential), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go index 3d2c0e8087..fc5cb4932e 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeClusterCSIDrivers struct { Fake *FakeOperatorV1 } -var clustercsidriversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "clustercsidrivers"} +var clustercsidriversResource = v1.SchemeGroupVersion.WithResource("clustercsidrivers") -var clustercsidriversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ClusterCSIDriver"} +var clustercsidriversKind = v1.SchemeGroupVersion.WithKind("ClusterCSIDriver") // Get takes name of the clusterCSIDriver, and returns the corresponding clusterCSIDriver object, and an error if there is any. -func (c *FakeClusterCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clustercsidriversResource, name), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootGetAction(clustercsidriversResource, name), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // List takes label and field selectors, and returns the list of ClusterCSIDrivers that match those selectors. -func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ClusterCSIDriverList, err error) { +func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterCSIDriverList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(clustercsidriversResource, clustercsidriversKind, opts), &operatorv1.ClusterCSIDriverList{}) + Invokes(testing.NewRootListAction(clustercsidriversResource, clustercsidriversKind, opts), &v1.ClusterCSIDriverList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts v1.ListOptions) ( if label == nil { label = labels.Everything() } - list := &operatorv1.ClusterCSIDriverList{ListMeta: obj.(*operatorv1.ClusterCSIDriverList).ListMeta} - for _, item := range obj.(*operatorv1.ClusterCSIDriverList).Items { + list := &v1.ClusterCSIDriverList{ListMeta: obj.(*v1.ClusterCSIDriverList).ListMeta} + for _, item := range obj.(*v1.ClusterCSIDriverList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts v1.ListOptions) ( } // Watch returns a watch.Interface that watches the requested clusterCSIDrivers. -func (c *FakeClusterCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterCSIDrivers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clustercsidriversResource, opts)) } // Create takes the representation of a clusterCSIDriver and creates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Create(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.CreateOptions) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Create(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.CreateOptions) (result *v1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clustercsidriversResource, clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootCreateAction(clustercsidriversResource, clusterCSIDriver), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // Update takes the representation of a clusterCSIDriver and updates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Update(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.UpdateOptions) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Update(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (result *v1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clustercsidriversResource, clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootUpdateAction(clustercsidriversResource, clusterCSIDriver), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterCSIDrivers) UpdateStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.UpdateOptions) (*operatorv1.ClusterCSIDriver, error) { +func (c *FakeClusterCSIDrivers) UpdateStatus(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (*v1.ClusterCSIDriver, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(clustercsidriversResource, "status", clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootUpdateSubresourceAction(clustercsidriversResource, "status", clusterCSIDriver), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // Delete takes name of the clusterCSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeClusterCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeClusterCSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clustercsidriversResource, name, opts), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootDeleteActionWithOptions(clustercsidriversResource, name, opts), &v1.ClusterCSIDriver{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeClusterCSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clustercsidriversResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ClusterCSIDriverList{}) + _, err := c.Fake.Invokes(action, &v1.ClusterCSIDriverList{}) return err } // Patch applies the patch and returns the patched clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, name, pt, data, subresources...), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, name, pt, data, subresources...), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // Apply takes the given apply declarative configuration, applies it and returns the applied clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { if clusterCSIDriver == nil { return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *app return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { if clusterCSIDriver == nil { return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDrive return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data, "status"), &v1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ClusterCSIDriver), err + return obj.(*v1.ClusterCSIDriver), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go index dc5edf674e..f6163ad233 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeConfigs struct { Fake *FakeOperatorV1 } -var configsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "configs"} +var configsResource = v1.SchemeGroupVersion.WithResource("configs") -var configsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Config"} +var configsKind = v1.SchemeGroupVersion.WithKind("Config") // Get takes name of the config, and returns the corresponding config object, and an error if there is any. -func (c *FakeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(configsResource, name), &operatorv1.Config{}) + Invokes(testing.NewRootGetAction(configsResource, name), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // List takes label and field selectors, and returns the list of Configs that match those selectors. -func (c *FakeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ConfigList, err error) { +func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(configsResource, configsKind, opts), &operatorv1.ConfigList{}) + Invokes(testing.NewRootListAction(configsResource, configsKind, opts), &v1.ConfigList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *op if label == nil { label = labels.Everything() } - list := &operatorv1.ConfigList{ListMeta: obj.(*operatorv1.ConfigList).ListMeta} - for _, item := range obj.(*operatorv1.ConfigList).Items { + list := &v1.ConfigList{ListMeta: obj.(*v1.ConfigList).ListMeta} + for _, item := range obj.(*v1.ConfigList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *op } // Watch returns a watch.Interface that watches the requested configs. -func (c *FakeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(configsResource, opts)) } // Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Create(ctx context.Context, config *operatorv1.Config, opts v1.CreateOptions) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(configsResource, config), &operatorv1.Config{}) + Invokes(testing.NewRootCreateAction(configsResource, config), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Update(ctx context.Context, config *operatorv1.Config, opts v1.UpdateOptions) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(configsResource, config), &operatorv1.Config{}) + Invokes(testing.NewRootUpdateAction(configsResource, config), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *operatorv1.Config, opts v1.UpdateOptions) (*operatorv1.Config, error) { +func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(configsResource, "status", config), &operatorv1.Config{}) + Invokes(testing.NewRootUpdateSubresourceAction(configsResource, "status", config), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // Delete takes name of the config and deletes it. Returns an error if one occurs. -func (c *FakeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &operatorv1.Config{}) + Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &v1.Config{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(configsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ConfigList{}) + _, err := c.Fake.Invokes(action, &v1.ConfigList{}) return err } // Patch applies the patch and returns the patched config. -func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, name, pt, data, subresources...), &operatorv1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, name, pt, data, subresources...), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // Apply takes the given apply declarative configuration, applies it and returns the applied config. -func (c *FakeConfigs) Apply(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) Apply(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { if config == nil { return nil, fmt.Errorf("config provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeConfigs) Apply(ctx context.Context, config *applyconfigurationsoper return nil, fmt.Errorf("config.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data), &operatorv1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Config, err error) { +func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { if config == nil { return nil, fmt.Errorf("config provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *applyconfiguratio return nil, fmt.Errorf("config.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data, "status"), &v1.Config{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Config), err + return obj.(*v1.Config), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go index 8355153938..fa60532f6f 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeConsoles struct { Fake *FakeOperatorV1 } -var consolesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "consoles"} +var consolesResource = v1.SchemeGroupVersion.WithResource("consoles") -var consolesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Console"} +var consolesKind = v1.SchemeGroupVersion.WithKind("Console") // Get takes name of the console, and returns the corresponding console object, and an error if there is any. -func (c *FakeConsoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(consolesResource, name), &operatorv1.Console{}) + Invokes(testing.NewRootGetAction(consolesResource, name), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // List takes label and field selectors, and returns the list of Consoles that match those selectors. -func (c *FakeConsoles) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ConsoleList, err error) { +func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(consolesResource, consolesKind, opts), &operatorv1.ConsoleList{}) + Invokes(testing.NewRootListAction(consolesResource, consolesKind, opts), &v1.ConsoleList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeConsoles) List(ctx context.Context, opts v1.ListOptions) (result *o if label == nil { label = labels.Everything() } - list := &operatorv1.ConsoleList{ListMeta: obj.(*operatorv1.ConsoleList).ListMeta} - for _, item := range obj.(*operatorv1.ConsoleList).Items { + list := &v1.ConsoleList{ListMeta: obj.(*v1.ConsoleList).ListMeta} + for _, item := range obj.(*v1.ConsoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeConsoles) List(ctx context.Context, opts v1.ListOptions) (result *o } // Watch returns a watch.Interface that watches the requested consoles. -func (c *FakeConsoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeConsoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(consolesResource, opts)) } // Create takes the representation of a console and creates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Create(ctx context.Context, console *operatorv1.Console, opts v1.CreateOptions) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (result *v1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(consolesResource, console), &operatorv1.Console{}) + Invokes(testing.NewRootCreateAction(consolesResource, console), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // Update takes the representation of a console and updates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Update(ctx context.Context, console *operatorv1.Console, opts v1.UpdateOptions) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(consolesResource, console), &operatorv1.Console{}) + Invokes(testing.NewRootUpdateAction(consolesResource, console), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *operatorv1.Console, opts v1.UpdateOptions) (*operatorv1.Console, error) { +func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(consolesResource, "status", console), &operatorv1.Console{}) + Invokes(testing.NewRootUpdateSubresourceAction(consolesResource, "status", console), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // Delete takes name of the console and deletes it. Returns an error if one occurs. -func (c *FakeConsoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeConsoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &operatorv1.Console{}) + Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &v1.Console{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(consolesResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ConsoleList{}) + _, err := c.Fake.Invokes(action, &v1.ConsoleList{}) return err } // Patch applies the patch and returns the patched console. -func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, name, pt, data, subresources...), &operatorv1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, name, pt, data, subresources...), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // Apply takes the given apply declarative configuration, applies it and returns the applied console. -func (c *FakeConsoles) Apply(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) Apply(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { if console == nil { return nil, fmt.Errorf("console provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeConsoles) Apply(ctx context.Context, console *applyconfigurationsop return nil, fmt.Errorf("console.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data), &operatorv1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Console, err error) { +func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { if console == nil { return nil, fmt.Errorf("console provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *applyconfigurat return nil, fmt.Errorf("console.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data, "status"), &v1.Console{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Console), err + return obj.(*v1.Console), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go index a7225c33df..47e16725cf 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeCSISnapshotControllers struct { Fake *FakeOperatorV1 } -var csisnapshotcontrollersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "csisnapshotcontrollers"} +var csisnapshotcontrollersResource = v1.SchemeGroupVersion.WithResource("csisnapshotcontrollers") -var csisnapshotcontrollersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "CSISnapshotController"} +var csisnapshotcontrollersKind = v1.SchemeGroupVersion.WithKind("CSISnapshotController") // Get takes name of the cSISnapshotController, and returns the corresponding cSISnapshotController object, and an error if there is any. -func (c *FakeCSISnapshotControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(csisnapshotcontrollersResource, name), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootGetAction(csisnapshotcontrollersResource, name), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // List takes label and field selectors, and returns the list of CSISnapshotControllers that match those selectors. -func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.CSISnapshotControllerList, err error) { +func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSISnapshotControllerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(csisnapshotcontrollersResource, csisnapshotcontrollersKind, opts), &operatorv1.CSISnapshotControllerList{}) + Invokes(testing.NewRootListAction(csisnapshotcontrollersResource, csisnapshotcontrollersKind, opts), &v1.CSISnapshotControllerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts v1.ListOptio if label == nil { label = labels.Everything() } - list := &operatorv1.CSISnapshotControllerList{ListMeta: obj.(*operatorv1.CSISnapshotControllerList).ListMeta} - for _, item := range obj.(*operatorv1.CSISnapshotControllerList).Items { + list := &v1.CSISnapshotControllerList{ListMeta: obj.(*v1.CSISnapshotControllerList).ListMeta} + for _, item := range obj.(*v1.CSISnapshotControllerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts v1.ListOptio } // Watch returns a watch.Interface that watches the requested cSISnapshotControllers. -func (c *FakeCSISnapshotControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeCSISnapshotControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(csisnapshotcontrollersResource, opts)) } // Create takes the representation of a cSISnapshotController and creates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Create(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.CreateOptions) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Create(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.CreateOptions) (result *v1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(csisnapshotcontrollersResource, cSISnapshotController), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootCreateAction(csisnapshotcontrollersResource, cSISnapshotController), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // Update takes the representation of a cSISnapshotController and updates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Update(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.UpdateOptions) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Update(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (result *v1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(csisnapshotcontrollersResource, cSISnapshotController), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootUpdateAction(csisnapshotcontrollersResource, cSISnapshotController), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCSISnapshotControllers) UpdateStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.UpdateOptions) (*operatorv1.CSISnapshotController, error) { +func (c *FakeCSISnapshotControllers) UpdateStatus(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (*v1.CSISnapshotController, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(csisnapshotcontrollersResource, "status", cSISnapshotController), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootUpdateSubresourceAction(csisnapshotcontrollersResource, "status", cSISnapshotController), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // Delete takes name of the cSISnapshotController and deletes it. Returns an error if one occurs. -func (c *FakeCSISnapshotControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeCSISnapshotControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(csisnapshotcontrollersResource, name, opts), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootDeleteActionWithOptions(csisnapshotcontrollersResource, name, opts), &v1.CSISnapshotController{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSISnapshotControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeCSISnapshotControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(csisnapshotcontrollersResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.CSISnapshotControllerList{}) + _, err := c.Fake.Invokes(action, &v1.CSISnapshotControllerList{}) return err } // Patch applies the patch and returns the patched cSISnapshotController. -func (c *FakeCSISnapshotControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, name, pt, data, subresources...), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, name, pt, data, subresources...), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // Apply takes the given apply declarative configuration, applies it and returns the applied cSISnapshotController. -func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { if cSISnapshotController == nil { return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotContr return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { if cSISnapshotController == nil { return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapsho return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, "status"), &v1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.CSISnapshotController), err + return obj.(*v1.CSISnapshotController), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go index d54d99ec53..47f85e2a5b 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeDNSes struct { Fake *FakeOperatorV1 } -var dnsesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "dnses"} +var dnsesResource = v1.SchemeGroupVersion.WithResource("dnses") -var dnsesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "DNS"} +var dnsesKind = v1.SchemeGroupVersion.WithKind("DNS") // Get takes name of the dNS, and returns the corresponding dNS object, and an error if there is any. -func (c *FakeDNSes) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(dnsesResource, name), &operatorv1.DNS{}) + Invokes(testing.NewRootGetAction(dnsesResource, name), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // List takes label and field selectors, and returns the list of DNSes that match those selectors. -func (c *FakeDNSes) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.DNSList, err error) { +func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DNSList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(dnsesResource, dnsesKind, opts), &operatorv1.DNSList{}) + Invokes(testing.NewRootListAction(dnsesResource, dnsesKind, opts), &v1.DNSList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeDNSes) List(ctx context.Context, opts v1.ListOptions) (result *oper if label == nil { label = labels.Everything() } - list := &operatorv1.DNSList{ListMeta: obj.(*operatorv1.DNSList).ListMeta} - for _, item := range obj.(*operatorv1.DNSList).Items { + list := &v1.DNSList{ListMeta: obj.(*v1.DNSList).ListMeta} + for _, item := range obj.(*v1.DNSList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeDNSes) List(ctx context.Context, opts v1.ListOptions) (result *oper } // Watch returns a watch.Interface that watches the requested dNSes. -func (c *FakeDNSes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeDNSes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(dnsesResource, opts)) } // Create takes the representation of a dNS and creates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Create(ctx context.Context, dNS *operatorv1.DNS, opts v1.CreateOptions) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (result *v1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(dnsesResource, dNS), &operatorv1.DNS{}) + Invokes(testing.NewRootCreateAction(dnsesResource, dNS), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // Update takes the representation of a dNS and updates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Update(ctx context.Context, dNS *operatorv1.DNS, opts v1.UpdateOptions) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(dnsesResource, dNS), &operatorv1.DNS{}) + Invokes(testing.NewRootUpdateAction(dnsesResource, dNS), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *operatorv1.DNS, opts v1.UpdateOptions) (*operatorv1.DNS, error) { +func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(dnsesResource, "status", dNS), &operatorv1.DNS{}) + Invokes(testing.NewRootUpdateSubresourceAction(dnsesResource, "status", dNS), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // Delete takes name of the dNS and deletes it. Returns an error if one occurs. -func (c *FakeDNSes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeDNSes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &operatorv1.DNS{}) + Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &v1.DNS{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(dnsesResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.DNSList{}) + _, err := c.Fake.Invokes(action, &v1.DNSList{}) return err } // Patch applies the patch and returns the patched dNS. -func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, name, pt, data, subresources...), &operatorv1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, name, pt, data, subresources...), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // Apply takes the given apply declarative configuration, applies it and returns the applied dNS. -func (c *FakeDNSes) Apply(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) Apply(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { if dNS == nil { return nil, fmt.Errorf("dNS provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeDNSes) Apply(ctx context.Context, dNS *applyconfigurationsoperatorv return nil, fmt.Errorf("dNS.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data), &operatorv1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.DNS, err error) { +func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { if dNS == nil { return nil, fmt.Errorf("dNS provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *applyconfigurationsope return nil, fmt.Errorf("dNS.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data, "status"), &v1.DNS{}) if obj == nil { return nil, err } - return obj.(*operatorv1.DNS), err + return obj.(*v1.DNS), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go index a0db62e202..c352ce6596 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeEtcds struct { Fake *FakeOperatorV1 } -var etcdsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "etcds"} +var etcdsResource = v1.SchemeGroupVersion.WithResource("etcds") -var etcdsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Etcd"} +var etcdsKind = v1.SchemeGroupVersion.WithKind("Etcd") // Get takes name of the etcd, and returns the corresponding etcd object, and an error if there is any. -func (c *FakeEtcds) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(etcdsResource, name), &operatorv1.Etcd{}) + Invokes(testing.NewRootGetAction(etcdsResource, name), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // List takes label and field selectors, and returns the list of Etcds that match those selectors. -func (c *FakeEtcds) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.EtcdList, err error) { +func (c *FakeEtcds) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EtcdList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(etcdsResource, etcdsKind, opts), &operatorv1.EtcdList{}) + Invokes(testing.NewRootListAction(etcdsResource, etcdsKind, opts), &v1.EtcdList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeEtcds) List(ctx context.Context, opts v1.ListOptions) (result *oper if label == nil { label = labels.Everything() } - list := &operatorv1.EtcdList{ListMeta: obj.(*operatorv1.EtcdList).ListMeta} - for _, item := range obj.(*operatorv1.EtcdList).Items { + list := &v1.EtcdList{ListMeta: obj.(*v1.EtcdList).ListMeta} + for _, item := range obj.(*v1.EtcdList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeEtcds) List(ctx context.Context, opts v1.ListOptions) (result *oper } // Watch returns a watch.Interface that watches the requested etcds. -func (c *FakeEtcds) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeEtcds) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(etcdsResource, opts)) } // Create takes the representation of a etcd and creates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Create(ctx context.Context, etcd *operatorv1.Etcd, opts v1.CreateOptions) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) Create(ctx context.Context, etcd *v1.Etcd, opts metav1.CreateOptions) (result *v1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(etcdsResource, etcd), &operatorv1.Etcd{}) + Invokes(testing.NewRootCreateAction(etcdsResource, etcd), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // Update takes the representation of a etcd and updates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Update(ctx context.Context, etcd *operatorv1.Etcd, opts v1.UpdateOptions) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) Update(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (result *v1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(etcdsResource, etcd), &operatorv1.Etcd{}) + Invokes(testing.NewRootUpdateAction(etcdsResource, etcd), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeEtcds) UpdateStatus(ctx context.Context, etcd *operatorv1.Etcd, opts v1.UpdateOptions) (*operatorv1.Etcd, error) { +func (c *FakeEtcds) UpdateStatus(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (*v1.Etcd, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(etcdsResource, "status", etcd), &operatorv1.Etcd{}) + Invokes(testing.NewRootUpdateSubresourceAction(etcdsResource, "status", etcd), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // Delete takes name of the etcd and deletes it. Returns an error if one occurs. -func (c *FakeEtcds) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeEtcds) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(etcdsResource, name, opts), &operatorv1.Etcd{}) + Invokes(testing.NewRootDeleteActionWithOptions(etcdsResource, name, opts), &v1.Etcd{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeEtcds) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeEtcds) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(etcdsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.EtcdList{}) + _, err := c.Fake.Invokes(action, &v1.EtcdList{}) return err } // Patch applies the patch and returns the patched etcd. -func (c *FakeEtcds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, name, pt, data, subresources...), &operatorv1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, name, pt, data, subresources...), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // Apply takes the given apply declarative configuration, applies it and returns the applied etcd. -func (c *FakeEtcds) Apply(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) Apply(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { if etcd == nil { return nil, fmt.Errorf("etcd provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeEtcds) Apply(ctx context.Context, etcd *applyconfigurationsoperator return nil, fmt.Errorf("etcd.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data), &operatorv1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Etcd, err error) { +func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { if etcd == nil { return nil, fmt.Errorf("etcd provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *applyconfigurationsop return nil, fmt.Errorf("etcd.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data, "status"), &v1.Etcd{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Etcd), err + return obj.(*v1.Etcd), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go index cea7ae3699..6dd0407460 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -23,25 +22,25 @@ type FakeIngressControllers struct { ns string } -var ingresscontrollersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "ingresscontrollers"} +var ingresscontrollersResource = v1.SchemeGroupVersion.WithResource("ingresscontrollers") -var ingresscontrollersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "IngressController"} +var ingresscontrollersKind = v1.SchemeGroupVersion.WithKind("IngressController") // Get takes name of the ingressController, and returns the corresponding ingressController object, and an error if there is any. -func (c *FakeIngressControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(ingresscontrollersResource, c.ns, name), &operatorv1.IngressController{}) + Invokes(testing.NewGetAction(ingresscontrollersResource, c.ns, name), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // List takes label and field selectors, and returns the list of IngressControllers that match those selectors. -func (c *FakeIngressControllers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.IngressControllerList, err error) { +func (c *FakeIngressControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressControllerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), &operatorv1.IngressControllerList{}) + Invokes(testing.NewListAction(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), &v1.IngressControllerList{}) if obj == nil { return nil, err @@ -51,8 +50,8 @@ func (c *FakeIngressControllers) List(ctx context.Context, opts v1.ListOptions) if label == nil { label = labels.Everything() } - list := &operatorv1.IngressControllerList{ListMeta: obj.(*operatorv1.IngressControllerList).ListMeta} - for _, item := range obj.(*operatorv1.IngressControllerList).Items { + list := &v1.IngressControllerList{ListMeta: obj.(*v1.IngressControllerList).ListMeta} + for _, item := range obj.(*v1.IngressControllerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -61,75 +60,75 @@ func (c *FakeIngressControllers) List(ctx context.Context, opts v1.ListOptions) } // Watch returns a watch.Interface that watches the requested ingressControllers. -func (c *FakeIngressControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeIngressControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(ingresscontrollersResource, c.ns, opts)) } // Create takes the representation of a ingressController and creates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Create(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.CreateOptions) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) Create(ctx context.Context, ingressController *v1.IngressController, opts metav1.CreateOptions) (result *v1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(ingresscontrollersResource, c.ns, ingressController), &operatorv1.IngressController{}) + Invokes(testing.NewCreateAction(ingresscontrollersResource, c.ns, ingressController), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // Update takes the representation of a ingressController and updates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Update(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.UpdateOptions) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) Update(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (result *v1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ingresscontrollersResource, c.ns, ingressController), &operatorv1.IngressController{}) + Invokes(testing.NewUpdateAction(ingresscontrollersResource, c.ns, ingressController), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngressControllers) UpdateStatus(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.UpdateOptions) (*operatorv1.IngressController, error) { +func (c *FakeIngressControllers) UpdateStatus(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (*v1.IngressController, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ingresscontrollersResource, "status", c.ns, ingressController), &operatorv1.IngressController{}) + Invokes(testing.NewUpdateSubresourceAction(ingresscontrollersResource, "status", c.ns, ingressController), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // Delete takes name of the ingressController and deletes it. Returns an error if one occurs. -func (c *FakeIngressControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeIngressControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ingresscontrollersResource, c.ns, name, opts), &operatorv1.IngressController{}) + Invokes(testing.NewDeleteActionWithOptions(ingresscontrollersResource, c.ns, name, opts), &v1.IngressController{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeIngressControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeIngressControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewDeleteCollectionAction(ingresscontrollersResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.IngressControllerList{}) + _, err := c.Fake.Invokes(action, &v1.IngressControllerList{}) return err } // Patch applies the patch and returns the patched ingressController. -func (c *FakeIngressControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, name, pt, data, subresources...), &operatorv1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, name, pt, data, subresources...), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // Apply takes the given apply declarative configuration, applies it and returns the applied ingressController. -func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { if ingressController == nil { return nil, fmt.Errorf("ingressController provided to Apply must not be nil") } @@ -142,17 +141,17 @@ func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *a return nil, fmt.Errorf("ingressController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data), &operatorv1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.IngressController, err error) { +func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { if ingressController == nil { return nil, fmt.Errorf("ingressController provided to Apply must not be nil") } @@ -165,10 +164,10 @@ func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressControl return nil, fmt.Errorf("ingressController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &operatorv1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.IngressController{}) if obj == nil { return nil, err } - return obj.(*operatorv1.IngressController), err + return obj.(*v1.IngressController), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go index bd2e9fa371..fa66123777 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeInsightsOperators struct { Fake *FakeOperatorV1 } -var insightsoperatorsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "insightsoperators"} +var insightsoperatorsResource = v1.SchemeGroupVersion.WithResource("insightsoperators") -var insightsoperatorsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "InsightsOperator"} +var insightsoperatorsKind = v1.SchemeGroupVersion.WithKind("InsightsOperator") // Get takes name of the insightsOperator, and returns the corresponding insightsOperator object, and an error if there is any. -func (c *FakeInsightsOperators) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(insightsoperatorsResource, name), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootGetAction(insightsoperatorsResource, name), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // List takes label and field selectors, and returns the list of InsightsOperators that match those selectors. -func (c *FakeInsightsOperators) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.InsightsOperatorList, err error) { +func (c *FakeInsightsOperators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InsightsOperatorList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(insightsoperatorsResource, insightsoperatorsKind, opts), &operatorv1.InsightsOperatorList{}) + Invokes(testing.NewRootListAction(insightsoperatorsResource, insightsoperatorsKind, opts), &v1.InsightsOperatorList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeInsightsOperators) List(ctx context.Context, opts v1.ListOptions) ( if label == nil { label = labels.Everything() } - list := &operatorv1.InsightsOperatorList{ListMeta: obj.(*operatorv1.InsightsOperatorList).ListMeta} - for _, item := range obj.(*operatorv1.InsightsOperatorList).Items { + list := &v1.InsightsOperatorList{ListMeta: obj.(*v1.InsightsOperatorList).ListMeta} + for _, item := range obj.(*v1.InsightsOperatorList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeInsightsOperators) List(ctx context.Context, opts v1.ListOptions) ( } // Watch returns a watch.Interface that watches the requested insightsOperators. -func (c *FakeInsightsOperators) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeInsightsOperators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(insightsoperatorsResource, opts)) } // Create takes the representation of a insightsOperator and creates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Create(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.CreateOptions) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Create(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.CreateOptions) (result *v1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(insightsoperatorsResource, insightsOperator), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootCreateAction(insightsoperatorsResource, insightsOperator), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // Update takes the representation of a insightsOperator and updates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Update(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.UpdateOptions) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Update(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (result *v1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(insightsoperatorsResource, insightsOperator), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootUpdateAction(insightsoperatorsResource, insightsOperator), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInsightsOperators) UpdateStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.UpdateOptions) (*operatorv1.InsightsOperator, error) { +func (c *FakeInsightsOperators) UpdateStatus(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (*v1.InsightsOperator, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(insightsoperatorsResource, "status", insightsOperator), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootUpdateSubresourceAction(insightsoperatorsResource, "status", insightsOperator), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // Delete takes name of the insightsOperator and deletes it. Returns an error if one occurs. -func (c *FakeInsightsOperators) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeInsightsOperators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(insightsoperatorsResource, name, opts), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootDeleteActionWithOptions(insightsoperatorsResource, name, opts), &v1.InsightsOperator{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeInsightsOperators) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeInsightsOperators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(insightsoperatorsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.InsightsOperatorList{}) + _, err := c.Fake.Invokes(action, &v1.InsightsOperatorList{}) return err } // Patch applies the patch and returns the patched insightsOperator. -func (c *FakeInsightsOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, name, pt, data, subresources...), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, name, pt, data, subresources...), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // Apply takes the given apply declarative configuration, applies it and returns the applied insightsOperator. -func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { if insightsOperator == nil { return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *app return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { if insightsOperator == nil { return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperato return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data, "status"), &v1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.InsightsOperator), err + return obj.(*v1.InsightsOperator), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go index 64be20d52b..d34add69bf 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeKubeAPIServers struct { Fake *FakeOperatorV1 } -var kubeapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubeapiservers"} +var kubeapiserversResource = v1.SchemeGroupVersion.WithResource("kubeapiservers") -var kubeapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeAPIServer"} +var kubeapiserversKind = v1.SchemeGroupVersion.WithKind("KubeAPIServer") // Get takes name of the kubeAPIServer, and returns the corresponding kubeAPIServer object, and an error if there is any. -func (c *FakeKubeAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubeapiserversResource, name), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootGetAction(kubeapiserversResource, name), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // List takes label and field selectors, and returns the list of KubeAPIServers that match those selectors. -func (c *FakeKubeAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeAPIServerList, err error) { +func (c *FakeKubeAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubeapiserversResource, kubeapiserversKind, opts), &operatorv1.KubeAPIServerList{}) + Invokes(testing.NewRootListAction(kubeapiserversResource, kubeapiserversKind, opts), &v1.KubeAPIServerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeKubeAPIServers) List(ctx context.Context, opts v1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &operatorv1.KubeAPIServerList{ListMeta: obj.(*operatorv1.KubeAPIServerList).ListMeta} - for _, item := range obj.(*operatorv1.KubeAPIServerList).Items { + list := &v1.KubeAPIServerList{ListMeta: obj.(*v1.KubeAPIServerList).ListMeta} + for _, item := range obj.(*v1.KubeAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeKubeAPIServers) List(ctx context.Context, opts v1.ListOptions) (res } // Watch returns a watch.Interface that watches the requested kubeAPIServers. -func (c *FakeKubeAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubeapiserversResource, opts)) } // Create takes the representation of a kubeAPIServer and creates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Create(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.CreateOptions) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Create(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.CreateOptions) (result *v1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubeapiserversResource, kubeAPIServer), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootCreateAction(kubeapiserversResource, kubeAPIServer), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // Update takes the representation of a kubeAPIServer and updates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Update(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.UpdateOptions) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Update(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (result *v1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubeapiserversResource, kubeAPIServer), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootUpdateAction(kubeapiserversResource, kubeAPIServer), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeAPIServers) UpdateStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.UpdateOptions) (*operatorv1.KubeAPIServer, error) { +func (c *FakeKubeAPIServers) UpdateStatus(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (*v1.KubeAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubeapiserversResource, "status", kubeAPIServer), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubeapiserversResource, "status", kubeAPIServer), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // Delete takes name of the kubeAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeKubeAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeKubeAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeapiserversResource, name, opts), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubeapiserversResource, name, opts), &v1.KubeAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeKubeAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubeapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.KubeAPIServerList{}) + _, err := c.Fake.Invokes(action, &v1.KubeAPIServerList{}) return err } // Patch applies the patch and returns the patched kubeAPIServer. -func (c *FakeKubeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, name, pt, data, subresources...), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, name, pt, data, subresources...), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeAPIServer. -func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { if kubeAPIServer == nil { return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *applyconf return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { if kubeAPIServer == nil { return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *app return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeAPIServer), err + return obj.(*v1.KubeAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go index c3d10b2247..072b82398c 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeKubeControllerManagers struct { Fake *FakeOperatorV1 } -var kubecontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubecontrollermanagers"} +var kubecontrollermanagersResource = v1.SchemeGroupVersion.WithResource("kubecontrollermanagers") -var kubecontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeControllerManager"} +var kubecontrollermanagersKind = v1.SchemeGroupVersion.WithKind("KubeControllerManager") // Get takes name of the kubeControllerManager, and returns the corresponding kubeControllerManager object, and an error if there is any. -func (c *FakeKubeControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubecontrollermanagersResource, name), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootGetAction(kubecontrollermanagersResource, name), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // List takes label and field selectors, and returns the list of KubeControllerManagers that match those selectors. -func (c *FakeKubeControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeControllerManagerList, err error) { +func (c *FakeKubeControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubecontrollermanagersResource, kubecontrollermanagersKind, opts), &operatorv1.KubeControllerManagerList{}) + Invokes(testing.NewRootListAction(kubecontrollermanagersResource, kubecontrollermanagersKind, opts), &v1.KubeControllerManagerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeKubeControllerManagers) List(ctx context.Context, opts v1.ListOptio if label == nil { label = labels.Everything() } - list := &operatorv1.KubeControllerManagerList{ListMeta: obj.(*operatorv1.KubeControllerManagerList).ListMeta} - for _, item := range obj.(*operatorv1.KubeControllerManagerList).Items { + list := &v1.KubeControllerManagerList{ListMeta: obj.(*v1.KubeControllerManagerList).ListMeta} + for _, item := range obj.(*v1.KubeControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeKubeControllerManagers) List(ctx context.Context, opts v1.ListOptio } // Watch returns a watch.Interface that watches the requested kubeControllerManagers. -func (c *FakeKubeControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubecontrollermanagersResource, opts)) } // Create takes the representation of a kubeControllerManager and creates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Create(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.CreateOptions) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Create(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.CreateOptions) (result *v1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubecontrollermanagersResource, kubeControllerManager), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootCreateAction(kubecontrollermanagersResource, kubeControllerManager), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // Update takes the representation of a kubeControllerManager and updates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Update(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.UpdateOptions) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Update(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (result *v1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubecontrollermanagersResource, kubeControllerManager), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootUpdateAction(kubecontrollermanagersResource, kubeControllerManager), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeControllerManagers) UpdateStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.UpdateOptions) (*operatorv1.KubeControllerManager, error) { +func (c *FakeKubeControllerManagers) UpdateStatus(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (*v1.KubeControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubecontrollermanagersResource, "status", kubeControllerManager), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubecontrollermanagersResource, "status", kubeControllerManager), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // Delete takes name of the kubeControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeKubeControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeKubeControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubecontrollermanagersResource, name, opts), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubecontrollermanagersResource, name, opts), &v1.KubeControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeKubeControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubecontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.KubeControllerManagerList{}) + _, err := c.Fake.Invokes(action, &v1.KubeControllerManagerList{}) return err } // Patch applies the patch and returns the patched kubeControllerManager. -func (c *FakeKubeControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, name, pt, data, subresources...), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, name, pt, data, subresources...), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeControllerManager. -func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { if kubeControllerManager == nil { return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerMa return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { if kubeControllerManager == nil { return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeContro return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeControllerManager), err + return obj.(*v1.KubeControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go index d8481f3512..a98a8e0397 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeKubeSchedulers struct { Fake *FakeOperatorV1 } -var kubeschedulersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubeschedulers"} +var kubeschedulersResource = v1.SchemeGroupVersion.WithResource("kubeschedulers") -var kubeschedulersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeScheduler"} +var kubeschedulersKind = v1.SchemeGroupVersion.WithKind("KubeScheduler") // Get takes name of the kubeScheduler, and returns the corresponding kubeScheduler object, and an error if there is any. -func (c *FakeKubeSchedulers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubeschedulersResource, name), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootGetAction(kubeschedulersResource, name), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // List takes label and field selectors, and returns the list of KubeSchedulers that match those selectors. -func (c *FakeKubeSchedulers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeSchedulerList, err error) { +func (c *FakeKubeSchedulers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeSchedulerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubeschedulersResource, kubeschedulersKind, opts), &operatorv1.KubeSchedulerList{}) + Invokes(testing.NewRootListAction(kubeschedulersResource, kubeschedulersKind, opts), &v1.KubeSchedulerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeKubeSchedulers) List(ctx context.Context, opts v1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &operatorv1.KubeSchedulerList{ListMeta: obj.(*operatorv1.KubeSchedulerList).ListMeta} - for _, item := range obj.(*operatorv1.KubeSchedulerList).Items { + list := &v1.KubeSchedulerList{ListMeta: obj.(*v1.KubeSchedulerList).ListMeta} + for _, item := range obj.(*v1.KubeSchedulerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeKubeSchedulers) List(ctx context.Context, opts v1.ListOptions) (res } // Watch returns a watch.Interface that watches the requested kubeSchedulers. -func (c *FakeKubeSchedulers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeSchedulers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubeschedulersResource, opts)) } // Create takes the representation of a kubeScheduler and creates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Create(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.CreateOptions) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Create(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.CreateOptions) (result *v1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubeschedulersResource, kubeScheduler), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootCreateAction(kubeschedulersResource, kubeScheduler), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // Update takes the representation of a kubeScheduler and updates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Update(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.UpdateOptions) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Update(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (result *v1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubeschedulersResource, kubeScheduler), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootUpdateAction(kubeschedulersResource, kubeScheduler), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeSchedulers) UpdateStatus(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.UpdateOptions) (*operatorv1.KubeScheduler, error) { +func (c *FakeKubeSchedulers) UpdateStatus(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (*v1.KubeScheduler, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubeschedulersResource, "status", kubeScheduler), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubeschedulersResource, "status", kubeScheduler), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // Delete takes name of the kubeScheduler and deletes it. Returns an error if one occurs. -func (c *FakeKubeSchedulers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeKubeSchedulers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeschedulersResource, name, opts), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubeschedulersResource, name, opts), &v1.KubeScheduler{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeSchedulers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeKubeSchedulers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubeschedulersResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.KubeSchedulerList{}) + _, err := c.Fake.Invokes(action, &v1.KubeSchedulerList{}) return err } // Patch applies the patch and returns the patched kubeScheduler. -func (c *FakeKubeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, name, pt, data, subresources...), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, name, pt, data, subresources...), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeScheduler. -func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { if kubeScheduler == nil { return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *applyconf return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { if kubeScheduler == nil { return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *app return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeScheduler), err + return obj.(*v1.KubeScheduler), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go index 625e34659f..7ffed25f82 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeKubeStorageVersionMigrators struct { Fake *FakeOperatorV1 } -var kubestorageversionmigratorsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubestorageversionmigrators"} +var kubestorageversionmigratorsResource = v1.SchemeGroupVersion.WithResource("kubestorageversionmigrators") -var kubestorageversionmigratorsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeStorageVersionMigrator"} +var kubestorageversionmigratorsKind = v1.SchemeGroupVersion.WithKind("KubeStorageVersionMigrator") // Get takes name of the kubeStorageVersionMigrator, and returns the corresponding kubeStorageVersionMigrator object, and an error if there is any. -func (c *FakeKubeStorageVersionMigrators) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubestorageversionmigratorsResource, name), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootGetAction(kubestorageversionmigratorsResource, name), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // List takes label and field selectors, and returns the list of KubeStorageVersionMigrators that match those selectors. -func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeStorageVersionMigratorList, err error) { +func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeStorageVersionMigratorList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubestorageversionmigratorsResource, kubestorageversionmigratorsKind, opts), &operatorv1.KubeStorageVersionMigratorList{}) + Invokes(testing.NewRootListAction(kubestorageversionmigratorsResource, kubestorageversionmigratorsKind, opts), &v1.KubeStorageVersionMigratorList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts v1.List if label == nil { label = labels.Everything() } - list := &operatorv1.KubeStorageVersionMigratorList{ListMeta: obj.(*operatorv1.KubeStorageVersionMigratorList).ListMeta} - for _, item := range obj.(*operatorv1.KubeStorageVersionMigratorList).Items { + list := &v1.KubeStorageVersionMigratorList{ListMeta: obj.(*v1.KubeStorageVersionMigratorList).ListMeta} + for _, item := range obj.(*v1.KubeStorageVersionMigratorList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts v1.List } // Watch returns a watch.Interface that watches the requested kubeStorageVersionMigrators. -func (c *FakeKubeStorageVersionMigrators) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeStorageVersionMigrators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubestorageversionmigratorsResource, opts)) } // Create takes the representation of a kubeStorageVersionMigrator and creates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Create(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.CreateOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Create(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.CreateOptions) (result *v1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootCreateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // Update takes the representation of a kubeStorageVersionMigrator and updates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Update(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.UpdateOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Update(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (result *v1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootUpdateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeStorageVersionMigrators) UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.UpdateOptions) (*operatorv1.KubeStorageVersionMigrator, error) { +func (c *FakeKubeStorageVersionMigrators) UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*v1.KubeStorageVersionMigrator, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubestorageversionmigratorsResource, "status", kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubestorageversionmigratorsResource, "status", kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // Delete takes name of the kubeStorageVersionMigrator and deletes it. Returns an error if one occurs. -func (c *FakeKubeStorageVersionMigrators) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeKubeStorageVersionMigrators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubestorageversionmigratorsResource, name, opts), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubestorageversionmigratorsResource, name, opts), &v1.KubeStorageVersionMigrator{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeStorageVersionMigrators) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeKubeStorageVersionMigrators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubestorageversionmigratorsResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.KubeStorageVersionMigratorList{}) + _, err := c.Fake.Invokes(action, &v1.KubeStorageVersionMigratorList{}) return err } // Patch applies the patch and returns the patched kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, name, pt, data, subresources...), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, name, pt, data, subresources...), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { if kubeStorageVersionMigrator == nil { return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorage return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { if kubeStorageVersionMigrator == nil { return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeS return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*operatorv1.KubeStorageVersionMigrator), err + return obj.(*v1.KubeStorageVersionMigrator), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go index f0731bdcc8..a8dc72b78b 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeNetworks struct { Fake *FakeOperatorV1 } -var networksResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "networks"} +var networksResource = v1.SchemeGroupVersion.WithResource("networks") -var networksKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Network"} +var networksKind = v1.SchemeGroupVersion.WithKind("Network") // Get takes name of the network, and returns the corresponding network object, and an error if there is any. -func (c *FakeNetworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(networksResource, name), &operatorv1.Network{}) + Invokes(testing.NewRootGetAction(networksResource, name), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // List takes label and field selectors, and returns the list of Networks that match those selectors. -func (c *FakeNetworks) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.NetworkList, err error) { +func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(networksResource, networksKind, opts), &operatorv1.NetworkList{}) + Invokes(testing.NewRootListAction(networksResource, networksKind, opts), &v1.NetworkList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeNetworks) List(ctx context.Context, opts v1.ListOptions) (result *o if label == nil { label = labels.Everything() } - list := &operatorv1.NetworkList{ListMeta: obj.(*operatorv1.NetworkList).ListMeta} - for _, item := range obj.(*operatorv1.NetworkList).Items { + list := &v1.NetworkList{ListMeta: obj.(*v1.NetworkList).ListMeta} + for _, item := range obj.(*v1.NetworkList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeNetworks) List(ctx context.Context, opts v1.ListOptions) (result *o } // Watch returns a watch.Interface that watches the requested networks. -func (c *FakeNetworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeNetworks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(networksResource, opts)) } // Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Create(ctx context.Context, network *operatorv1.Network, opts v1.CreateOptions) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (result *v1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(networksResource, network), &operatorv1.Network{}) + Invokes(testing.NewRootCreateAction(networksResource, network), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Update(ctx context.Context, network *operatorv1.Network, opts v1.UpdateOptions) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(networksResource, network), &operatorv1.Network{}) + Invokes(testing.NewRootUpdateAction(networksResource, network), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *operatorv1.Network, opts v1.UpdateOptions) (*operatorv1.Network, error) { +func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(networksResource, "status", network), &operatorv1.Network{}) + Invokes(testing.NewRootUpdateSubresourceAction(networksResource, "status", network), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // Delete takes name of the network and deletes it. Returns an error if one occurs. -func (c *FakeNetworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &operatorv1.Network{}) + Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &v1.Network{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(networksResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.NetworkList{}) + _, err := c.Fake.Invokes(action, &v1.NetworkList{}) return err } // Patch applies the patch and returns the patched network. -func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, name, pt, data, subresources...), &operatorv1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, name, pt, data, subresources...), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // Apply takes the given apply declarative configuration, applies it and returns the applied network. -func (c *FakeNetworks) Apply(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) Apply(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { if network == nil { return nil, fmt.Errorf("network provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeNetworks) Apply(ctx context.Context, network *applyconfigurationsop return nil, fmt.Errorf("network.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data), &operatorv1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Network, err error) { +func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { if network == nil { return nil, fmt.Errorf("network provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *applyconfigurat return nil, fmt.Errorf("network.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data, "status"), &v1.Network{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Network), err + return obj.(*v1.Network), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go index 65c392e1bd..0e26df3f90 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeOpenShiftAPIServers struct { Fake *FakeOperatorV1 } -var openshiftapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "openshiftapiservers"} +var openshiftapiserversResource = v1.SchemeGroupVersion.WithResource("openshiftapiservers") -var openshiftapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "OpenShiftAPIServer"} +var openshiftapiserversKind = v1.SchemeGroupVersion.WithKind("OpenShiftAPIServer") // Get takes name of the openShiftAPIServer, and returns the corresponding openShiftAPIServer object, and an error if there is any. -func (c *FakeOpenShiftAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(openshiftapiserversResource, name), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootGetAction(openshiftapiserversResource, name), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // List takes label and field selectors, and returns the list of OpenShiftAPIServers that match those selectors. -func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.OpenShiftAPIServerList, err error) { +func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(openshiftapiserversResource, openshiftapiserversKind, opts), &operatorv1.OpenShiftAPIServerList{}) + Invokes(testing.NewRootListAction(openshiftapiserversResource, openshiftapiserversKind, opts), &v1.OpenShiftAPIServerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts v1.ListOptions) if label == nil { label = labels.Everything() } - list := &operatorv1.OpenShiftAPIServerList{ListMeta: obj.(*operatorv1.OpenShiftAPIServerList).ListMeta} - for _, item := range obj.(*operatorv1.OpenShiftAPIServerList).Items { + list := &v1.OpenShiftAPIServerList{ListMeta: obj.(*v1.OpenShiftAPIServerList).ListMeta} + for _, item := range obj.(*v1.OpenShiftAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts v1.ListOptions) } // Watch returns a watch.Interface that watches the requested openShiftAPIServers. -func (c *FakeOpenShiftAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeOpenShiftAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(openshiftapiserversResource, opts)) } // Create takes the representation of a openShiftAPIServer and creates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Create(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.CreateOptions) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Create(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.CreateOptions) (result *v1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(openshiftapiserversResource, openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootCreateAction(openshiftapiserversResource, openShiftAPIServer), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // Update takes the representation of a openShiftAPIServer and updates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Update(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.UpdateOptions) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Update(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (result *v1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(openshiftapiserversResource, openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootUpdateAction(openshiftapiserversResource, openShiftAPIServer), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftAPIServers) UpdateStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.UpdateOptions) (*operatorv1.OpenShiftAPIServer, error) { +func (c *FakeOpenShiftAPIServers) UpdateStatus(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*v1.OpenShiftAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(openshiftapiserversResource, "status", openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(openshiftapiserversResource, "status", openShiftAPIServer), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // Delete takes name of the openShiftAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeOpenShiftAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftapiserversResource, name, opts), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(openshiftapiserversResource, name, opts), &v1.OpenShiftAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeOpenShiftAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(openshiftapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.OpenShiftAPIServerList{}) + _, err := c.Fake.Invokes(action, &v1.OpenShiftAPIServerList{}) return err } // Patch applies the patch and returns the patched openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, name, pt, data, subresources...), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, name, pt, data, subresources...), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { if openShiftAPIServer == nil { return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { if openShiftAPIServer == nil { return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIS return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftAPIServer), err + return obj.(*v1.OpenShiftAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go index 3f1ee748e4..f8b7a9317b 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeOpenShiftControllerManagers struct { Fake *FakeOperatorV1 } -var openshiftcontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "openshiftcontrollermanagers"} +var openshiftcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("openshiftcontrollermanagers") -var openshiftcontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "OpenShiftControllerManager"} +var openshiftcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("OpenShiftControllerManager") // Get takes name of the openShiftControllerManager, and returns the corresponding openShiftControllerManager object, and an error if there is any. -func (c *FakeOpenShiftControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(openshiftcontrollermanagersResource, name), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootGetAction(openshiftcontrollermanagersResource, name), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // List takes label and field selectors, and returns the list of OpenShiftControllerManagers that match those selectors. -func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.OpenShiftControllerManagerList, err error) { +func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(openshiftcontrollermanagersResource, openshiftcontrollermanagersKind, opts), &operatorv1.OpenShiftControllerManagerList{}) + Invokes(testing.NewRootListAction(openshiftcontrollermanagersResource, openshiftcontrollermanagersKind, opts), &v1.OpenShiftControllerManagerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts v1.List if label == nil { label = labels.Everything() } - list := &operatorv1.OpenShiftControllerManagerList{ListMeta: obj.(*operatorv1.OpenShiftControllerManagerList).ListMeta} - for _, item := range obj.(*operatorv1.OpenShiftControllerManagerList).Items { + list := &v1.OpenShiftControllerManagerList{ListMeta: obj.(*v1.OpenShiftControllerManagerList).ListMeta} + for _, item := range obj.(*v1.OpenShiftControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts v1.List } // Watch returns a watch.Interface that watches the requested openShiftControllerManagers. -func (c *FakeOpenShiftControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeOpenShiftControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(openshiftcontrollermanagersResource, opts)) } // Create takes the representation of a openShiftControllerManager and creates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Create(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.CreateOptions) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Create(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.CreateOptions) (result *v1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootCreateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // Update takes the representation of a openShiftControllerManager and updates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Update(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.UpdateOptions) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Update(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (result *v1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootUpdateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftControllerManagers) UpdateStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.UpdateOptions) (*operatorv1.OpenShiftControllerManager, error) { +func (c *FakeOpenShiftControllerManagers) UpdateStatus(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*v1.OpenShiftControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(openshiftcontrollermanagersResource, "status", openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(openshiftcontrollermanagersResource, "status", openShiftControllerManager), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // Delete takes name of the openShiftControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeOpenShiftControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftcontrollermanagersResource, name, opts), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(openshiftcontrollermanagersResource, name, opts), &v1.OpenShiftControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeOpenShiftControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(openshiftcontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.OpenShiftControllerManagerList{}) + _, err := c.Fake.Invokes(action, &v1.OpenShiftControllerManagerList{}) return err } // Patch applies the patch and returns the patched openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, name, pt, data, subresources...), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, name, pt, data, subresources...), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { if openShiftControllerManager == nil { return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftCo return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { if openShiftControllerManager == nil { return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openS return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.OpenShiftControllerManager), err + return obj.(*v1.OpenShiftControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go index f587d8b72a..0d0cb6bcd8 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeServiceCAs struct { Fake *FakeOperatorV1 } -var servicecasResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecas"} +var servicecasResource = v1.SchemeGroupVersion.WithResource("servicecas") -var servicecasKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCA"} +var servicecasKind = v1.SchemeGroupVersion.WithKind("ServiceCA") // Get takes name of the serviceCA, and returns the corresponding serviceCA object, and an error if there is any. -func (c *FakeServiceCAs) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecasResource, name), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootGetAction(servicecasResource, name), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // List takes label and field selectors, and returns the list of ServiceCAs that match those selectors. -func (c *FakeServiceCAs) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCAList, err error) { +func (c *FakeServiceCAs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCAList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecasResource, servicecasKind, opts), &operatorv1.ServiceCAList{}) + Invokes(testing.NewRootListAction(servicecasResource, servicecasKind, opts), &v1.ServiceCAList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeServiceCAs) List(ctx context.Context, opts v1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &operatorv1.ServiceCAList{ListMeta: obj.(*operatorv1.ServiceCAList).ListMeta} - for _, item := range obj.(*operatorv1.ServiceCAList).Items { + list := &v1.ServiceCAList{ListMeta: obj.(*v1.ServiceCAList).ListMeta} + for _, item := range obj.(*v1.ServiceCAList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeServiceCAs) List(ctx context.Context, opts v1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested serviceCAs. -func (c *FakeServiceCAs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCAs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecasResource, opts)) } // Create takes the representation of a serviceCA and creates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Create(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.CreateOptions) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) Create(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.CreateOptions) (result *v1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecasResource, serviceCA), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootCreateAction(servicecasResource, serviceCA), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // Update takes the representation of a serviceCA and updates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Update(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.UpdateOptions) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) Update(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (result *v1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecasResource, serviceCA), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootUpdateAction(servicecasResource, serviceCA), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCAs) UpdateStatus(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.UpdateOptions) (*operatorv1.ServiceCA, error) { +func (c *FakeServiceCAs) UpdateStatus(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (*v1.ServiceCA, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecasResource, "status", serviceCA), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecasResource, "status", serviceCA), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // Delete takes name of the serviceCA and deletes it. Returns an error if one occurs. -func (c *FakeServiceCAs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeServiceCAs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecasResource, name, opts), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecasResource, name, opts), &v1.ServiceCA{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCAs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeServiceCAs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecasResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ServiceCAList{}) + _, err := c.Fake.Invokes(action, &v1.ServiceCAList{}) return err } // Patch applies the patch and returns the patched serviceCA. -func (c *FakeServiceCAs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, name, pt, data, subresources...), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, name, pt, data, subresources...), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCA. -func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { if serviceCA == nil { return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *applyconfiguratio return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCA, err error) { +func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { if serviceCA == nil { return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *applyconfig return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCA), err + return obj.(*v1.ServiceCA), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go index 7d6f0eff11..66ec551a3a 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeServiceCatalogAPIServers struct { Fake *FakeOperatorV1 } -var servicecatalogapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecatalogapiservers"} +var servicecatalogapiserversResource = v1.SchemeGroupVersion.WithResource("servicecatalogapiservers") -var servicecatalogapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCatalogAPIServer"} +var servicecatalogapiserversKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogAPIServer") // Get takes name of the serviceCatalogAPIServer, and returns the corresponding serviceCatalogAPIServer object, and an error if there is any. -func (c *FakeServiceCatalogAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecatalogapiserversResource, name), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootGetAction(servicecatalogapiserversResource, name), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // List takes label and field selectors, and returns the list of ServiceCatalogAPIServers that match those selectors. -func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCatalogAPIServerList, err error) { +func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecatalogapiserversResource, servicecatalogapiserversKind, opts), &operatorv1.ServiceCatalogAPIServerList{}) + Invokes(testing.NewRootListAction(servicecatalogapiserversResource, servicecatalogapiserversKind, opts), &v1.ServiceCatalogAPIServerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts v1.ListOpt if label == nil { label = labels.Everything() } - list := &operatorv1.ServiceCatalogAPIServerList{ListMeta: obj.(*operatorv1.ServiceCatalogAPIServerList).ListMeta} - for _, item := range obj.(*operatorv1.ServiceCatalogAPIServerList).Items { + list := &v1.ServiceCatalogAPIServerList{ListMeta: obj.(*v1.ServiceCatalogAPIServerList).ListMeta} + for _, item := range obj.(*v1.ServiceCatalogAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts v1.ListOpt } // Watch returns a watch.Interface that watches the requested serviceCatalogAPIServers. -func (c *FakeServiceCatalogAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCatalogAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecatalogapiserversResource, opts)) } // Create takes the representation of a serviceCatalogAPIServer and creates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Create(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.CreateOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Create(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.CreateOptions) (result *v1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootCreateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // Update takes the representation of a serviceCatalogAPIServer and updates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Update(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.UpdateOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Update(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (result *v1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootUpdateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogAPIServers) UpdateStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.UpdateOptions) (*operatorv1.ServiceCatalogAPIServer, error) { +func (c *FakeServiceCatalogAPIServers) UpdateStatus(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*v1.ServiceCatalogAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogapiserversResource, "status", serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogapiserversResource, "status", serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // Delete takes name of the serviceCatalogAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeServiceCatalogAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogapiserversResource, name, opts), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogapiserversResource, name, opts), &v1.ServiceCatalogAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeServiceCatalogAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecatalogapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ServiceCatalogAPIServerList{}) + _, err := c.Fake.Invokes(action, &v1.ServiceCatalogAPIServerList{}) return err } // Patch applies the patch and returns the patched serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, name, pt, data, subresources...), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, name, pt, data, subresources...), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { if serviceCatalogAPIServer == nil { return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalog return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { if serviceCatalogAPIServer == nil { return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceC return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogAPIServer), err + return obj.(*v1.ServiceCatalogAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go index cc383a4399..82b7d62ac3 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeServiceCatalogControllerManagers struct { Fake *FakeOperatorV1 } -var servicecatalogcontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecatalogcontrollermanagers"} +var servicecatalogcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers") -var servicecatalogcontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCatalogControllerManager"} +var servicecatalogcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogControllerManager") // Get takes name of the serviceCatalogControllerManager, and returns the corresponding serviceCatalogControllerManager object, and an error if there is any. -func (c *FakeServiceCatalogControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecatalogcontrollermanagersResource, name), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootGetAction(servicecatalogcontrollermanagersResource, name), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // List takes label and field selectors, and returns the list of ServiceCatalogControllerManagers that match those selectors. -func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCatalogControllerManagerList, err error) { +func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecatalogcontrollermanagersResource, servicecatalogcontrollermanagersKind, opts), &operatorv1.ServiceCatalogControllerManagerList{}) + Invokes(testing.NewRootListAction(servicecatalogcontrollermanagersResource, servicecatalogcontrollermanagersKind, opts), &v1.ServiceCatalogControllerManagerList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts v1 if label == nil { label = labels.Everything() } - list := &operatorv1.ServiceCatalogControllerManagerList{ListMeta: obj.(*operatorv1.ServiceCatalogControllerManagerList).ListMeta} - for _, item := range obj.(*operatorv1.ServiceCatalogControllerManagerList).Items { + list := &v1.ServiceCatalogControllerManagerList{ListMeta: obj.(*v1.ServiceCatalogControllerManagerList).ListMeta} + for _, item := range obj.(*v1.ServiceCatalogControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts v1 } // Watch returns a watch.Interface that watches the requested serviceCatalogControllerManagers. -func (c *FakeServiceCatalogControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCatalogControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecatalogcontrollermanagersResource, opts)) } // Create takes the representation of a serviceCatalogControllerManager and creates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Create(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.CreateOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Create(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.CreateOptions) (result *v1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootCreateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // Update takes the representation of a serviceCatalogControllerManager and updates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Update(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.UpdateOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Update(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (result *v1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootUpdateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogControllerManagers) UpdateStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.UpdateOptions) (*operatorv1.ServiceCatalogControllerManager, error) { +func (c *FakeServiceCatalogControllerManagers) UpdateStatus(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*v1.ServiceCatalogControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogcontrollermanagersResource, "status", serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogcontrollermanagersResource, "status", serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // Delete takes name of the serviceCatalogControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeServiceCatalogControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogcontrollermanagersResource, name, opts), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogcontrollermanagersResource, name, opts), &v1.ServiceCatalogControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeServiceCatalogControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecatalogcontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.ServiceCatalogControllerManagerList{}) + _, err := c.Fake.Invokes(action, &v1.ServiceCatalogControllerManagerList{}) return err } // Patch applies the patch and returns the patched serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, name, pt, data, subresources...), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, name, pt, data, subresources...), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { if serviceCatalogControllerManager == nil { return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, servic return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { if serviceCatalogControllerManager == nil { return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*operatorv1.ServiceCatalogControllerManager), err + return obj.(*v1.ServiceCatalogControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go index 9cc8d784db..2476a30b5d 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go @@ -7,11 +7,10 @@ import ( json "encoding/json" "fmt" - operatorv1 "github.com/openshift/api/operator/v1" - applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,24 +21,24 @@ type FakeStorages struct { Fake *FakeOperatorV1 } -var storagesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "storages"} +var storagesResource = v1.SchemeGroupVersion.WithResource("storages") -var storagesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Storage"} +var storagesKind = v1.SchemeGroupVersion.WithKind("Storage") // Get takes name of the storage, and returns the corresponding storage object, and an error if there is any. -func (c *FakeStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(storagesResource, name), &operatorv1.Storage{}) + Invokes(testing.NewRootGetAction(storagesResource, name), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // List takes label and field selectors, and returns the list of Storages that match those selectors. -func (c *FakeStorages) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.StorageList, err error) { +func (c *FakeStorages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(storagesResource, storagesKind, opts), &operatorv1.StorageList{}) + Invokes(testing.NewRootListAction(storagesResource, storagesKind, opts), &v1.StorageList{}) if obj == nil { return nil, err } @@ -48,8 +47,8 @@ func (c *FakeStorages) List(ctx context.Context, opts v1.ListOptions) (result *o if label == nil { label = labels.Everything() } - list := &operatorv1.StorageList{ListMeta: obj.(*operatorv1.StorageList).ListMeta} - for _, item := range obj.(*operatorv1.StorageList).Items { + list := &v1.StorageList{ListMeta: obj.(*v1.StorageList).ListMeta} + for _, item := range obj.(*v1.StorageList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -58,69 +57,69 @@ func (c *FakeStorages) List(ctx context.Context, opts v1.ListOptions) (result *o } // Watch returns a watch.Interface that watches the requested storages. -func (c *FakeStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeStorages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(storagesResource, opts)) } // Create takes the representation of a storage and creates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Create(ctx context.Context, storage *operatorv1.Storage, opts v1.CreateOptions) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) Create(ctx context.Context, storage *v1.Storage, opts metav1.CreateOptions) (result *v1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(storagesResource, storage), &operatorv1.Storage{}) + Invokes(testing.NewRootCreateAction(storagesResource, storage), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // Update takes the representation of a storage and updates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Update(ctx context.Context, storage *operatorv1.Storage, opts v1.UpdateOptions) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) Update(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (result *v1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(storagesResource, storage), &operatorv1.Storage{}) + Invokes(testing.NewRootUpdateAction(storagesResource, storage), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStorages) UpdateStatus(ctx context.Context, storage *operatorv1.Storage, opts v1.UpdateOptions) (*operatorv1.Storage, error) { +func (c *FakeStorages) UpdateStatus(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (*v1.Storage, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(storagesResource, "status", storage), &operatorv1.Storage{}) + Invokes(testing.NewRootUpdateSubresourceAction(storagesResource, "status", storage), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // Delete takes name of the storage and deletes it. Returns an error if one occurs. -func (c *FakeStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { +func (c *FakeStorages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(storagesResource, name, opts), &operatorv1.Storage{}) + Invokes(testing.NewRootDeleteActionWithOptions(storagesResource, name, opts), &v1.Storage{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { +func (c *FakeStorages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(storagesResource, listOpts) - _, err := c.Fake.Invokes(action, &operatorv1.StorageList{}) + _, err := c.Fake.Invokes(action, &v1.StorageList{}) return err } // Patch applies the patch and returns the patched storage. -func (c *FakeStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, name, pt, data, subresources...), &operatorv1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, name, pt, data, subresources...), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // Apply takes the given apply declarative configuration, applies it and returns the applied storage. -func (c *FakeStorages) Apply(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) Apply(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { if storage == nil { return nil, fmt.Errorf("storage provided to Apply must not be nil") } @@ -133,16 +132,16 @@ func (c *FakeStorages) Apply(ctx context.Context, storage *applyconfigurationsop return nil, fmt.Errorf("storage.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data), &operatorv1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Storage, err error) { +func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { if storage == nil { return nil, fmt.Errorf("storage provided to Apply must not be nil") } @@ -155,9 +154,9 @@ func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *applyconfigurat return nil, fmt.Errorf("storage.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data, "status"), &v1.Storage{}) if obj == nil { return nil, err } - return obj.(*operatorv1.Storage), err + return obj.(*v1.Storage), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go index 5790e27415..b34784efe3 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go @@ -11,7 +11,6 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,9 +21,9 @@ type FakeEtcdBackups struct { Fake *FakeOperatorV1alpha1 } -var etcdbackupsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "etcdbackups"} +var etcdbackupsResource = v1alpha1.SchemeGroupVersion.WithResource("etcdbackups") -var etcdbackupsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "EtcdBackup"} +var etcdbackupsKind = v1alpha1.SchemeGroupVersion.WithKind("EtcdBackup") // Get takes name of the etcdBackup, and returns the corresponding etcdBackup object, and an error if there is any. func (c *FakeEtcdBackups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EtcdBackup, err error) { diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go index 859f7b38cc..a3f5fd4c09 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go @@ -11,7 +11,6 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,9 +21,9 @@ type FakeImageContentSourcePolicies struct { Fake *FakeOperatorV1alpha1 } -var imagecontentsourcepoliciesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "imagecontentsourcepolicies"} +var imagecontentsourcepoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies") -var imagecontentsourcepoliciesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "ImageContentSourcePolicy"} +var imagecontentsourcepoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("ImageContentSourcePolicy") // Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. func (c *FakeImageContentSourcePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go index e584693314..ac07845d9d 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go @@ -11,7 +11,6 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,9 +21,9 @@ type FakeOLMs struct { Fake *FakeOperatorV1alpha1 } -var olmsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "olms"} +var olmsResource = v1alpha1.SchemeGroupVersion.WithResource("olms") -var olmsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "OLM"} +var olmsKind = v1alpha1.SchemeGroupVersion.WithKind("OLM") // Get takes name of the oLM, and returns the corresponding oLM object, and an error if there is any. func (c *FakeOLMs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OLM, err error) { diff --git a/vendor/github.com/openshift/client-go/operator/informers/externalversions/factory.go b/vendor/github.com/openshift/client-go/operator/informers/externalversions/factory.go index 0ef02e9eee..c32274316c 100644 --- a/vendor/github.com/openshift/client-go/operator/informers/externalversions/factory.go +++ b/vendor/github.com/openshift/client-go/operator/informers/externalversions/factory.go @@ -31,6 +31,11 @@ type sharedInformerFactory struct { // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool } // WithCustomResyncConfig sets a custom resync period for the specified informer types. @@ -91,20 +96,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() + if f.shuttingDown { + return + } + for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - go informer.Run(stopCh) + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() f.startedInformers[informerType] = true } } } -// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() @@ -126,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref return res } -// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// InformerFor returns the SharedIndexInformer for obj using an internal // client. func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { f.lock.Lock() @@ -151,11 +175,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // SharedInformerFactory provides shared informers for resources in all known // API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + Operator() operator.Interface } diff --git a/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/clientset.go index dc3d5b8d04..0a03d2e182 100644 --- a/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/clientset.go +++ b/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/clientset.go @@ -17,8 +17,7 @@ type Interface interface { ControlplaneV1alpha1() controlplanev1alpha1.ControlplaneV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient controlplaneV1alpha1 *controlplanev1alpha1.ControlplaneV1alpha1Client diff --git a/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/doc.go b/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/doc.go deleted file mode 100644 index 0e0c2a8900..0000000000 --- a/vendor/github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/vendor/github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/factory.go b/vendor/github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/factory.go index 97ab0b5963..1f7bb2f5c9 100644 --- a/vendor/github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/factory.go +++ b/vendor/github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/factory.go @@ -31,6 +31,11 @@ type sharedInformerFactory struct { // startedInformers is used for tracking which informers have been started. // This allows Start() to be called multiple times safely. startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool } // WithCustomResyncConfig sets a custom resync period for the specified informer types. @@ -91,20 +96,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() + if f.shuttingDown { + return + } + for informerType, informer := range f.informers { if !f.startedInformers[informerType] { - go informer.Run(stopCh) + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() f.startedInformers[informerType] = true } } } -// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]cache.SharedIndexInformer { f.lock.Lock() @@ -126,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref return res } -// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// InformerFor returns the SharedIndexInformer for obj using an internal // client. func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { f.lock.Lock() @@ -151,11 +175,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // SharedInformerFactory provides shared informers for resources in all known // API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) type SharedInformerFactory interface { internalinterfaces.SharedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + Controlplane() operatorcontrolplane.Interface } diff --git a/vendor/modules.txt b/vendor/modules.txt index 3ea6549c0d..5cb21c5709 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -284,7 +284,7 @@ github.com/openshift/build-machinery-go/make/targets/golang github.com/openshift/build-machinery-go/make/targets/openshift github.com/openshift/build-machinery-go/make/targets/openshift/operator github.com/openshift/build-machinery-go/scripts -# github.com/openshift/client-go v0.0.0-20230915115245-53bd8980dfb7 +# github.com/openshift/client-go v0.0.0-20230926161409-848405da69e1 ## explicit; go 1.20 github.com/openshift/client-go/config/applyconfigurations/config/v1 github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1 @@ -327,7 +327,7 @@ github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/i github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/operatorcontrolplane github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/operatorcontrolplane/v1alpha1 github.com/openshift/client-go/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1 -# github.com/openshift/library-go v0.0.0-20230921140650-cf7c1f73089c +# github.com/openshift/library-go v0.0.0-20230927113136-405c34317fa4 ## explicit; go 1.20 github.com/openshift/library-go/pkg/assets github.com/openshift/library-go/pkg/authorization/hardcodedauthorizer