diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go deleted file mode 100644 index acfe859b..00000000 --- a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go +++ /dev/null @@ -1,1740 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package fakes - -import ( - context "context" - sync "sync" - - controller "github.com/rancher/norman/controller" - objectclient "github.com/rancher/norman/objectclient" - v3 "github.com/rancher/types/apis/management.cattle.io/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -var ( - lockRKEK8sWindowsSystemImageListerMockGet sync.RWMutex - lockRKEK8sWindowsSystemImageListerMockList sync.RWMutex -) - -// Ensure, that RKEK8sWindowsSystemImageListerMock does implement RKEK8sWindowsSystemImageLister. -// If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sWindowsSystemImageLister = &RKEK8sWindowsSystemImageListerMock{} - -// RKEK8sWindowsSystemImageListerMock is a mock implementation of RKEK8sWindowsSystemImageLister. -// -// func TestSomethingThatUsesRKEK8sWindowsSystemImageLister(t *testing.T) { -// -// // make and configure a mocked RKEK8sWindowsSystemImageLister -// mockedRKEK8sWindowsSystemImageLister := &RKEK8sWindowsSystemImageListerMock{ -// GetFunc: func(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the Get method") -// }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the List method") -// }, -// } -// -// // use mockedRKEK8sWindowsSystemImageLister in code that requires RKEK8sWindowsSystemImageLister -// // and then make assertions. -// -// } -type RKEK8sWindowsSystemImageListerMock struct { - // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) - - // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) - - // calls tracks calls to the methods. - calls struct { - // Get holds details about calls to the Get method. - Get []struct { - // Namespace is the namespace argument value. - Namespace string - // Name is the name argument value. - Name string - } - // List holds details about calls to the List method. - List []struct { - // Namespace is the namespace argument value. - Namespace string - // Selector is the selector argument value. - Selector labels.Selector - } - } -} - -// Get calls GetFunc. -func (mock *RKEK8sWindowsSystemImageListerMock) Get(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) { - if mock.GetFunc == nil { - panic("RKEK8sWindowsSystemImageListerMock.GetFunc: method is nil but RKEK8sWindowsSystemImageLister.Get was just called") - } - callInfo := struct { - Namespace string - Name string - }{ - Namespace: namespace, - Name: name, - } - lockRKEK8sWindowsSystemImageListerMockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sWindowsSystemImageListerMockGet.Unlock() - return mock.GetFunc(namespace, name) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageLister.GetCalls()) -func (mock *RKEK8sWindowsSystemImageListerMock) GetCalls() []struct { - Namespace string - Name string -} { - var calls []struct { - Namespace string - Name string - } - lockRKEK8sWindowsSystemImageListerMockGet.RLock() - calls = mock.calls.Get - lockRKEK8sWindowsSystemImageListerMockGet.RUnlock() - return calls -} - -// List calls ListFunc. -func (mock *RKEK8sWindowsSystemImageListerMock) List(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) { - if mock.ListFunc == nil { - panic("RKEK8sWindowsSystemImageListerMock.ListFunc: method is nil but RKEK8sWindowsSystemImageLister.List was just called") - } - callInfo := struct { - Namespace string - Selector labels.Selector - }{ - Namespace: namespace, - Selector: selector, - } - lockRKEK8sWindowsSystemImageListerMockList.Lock() - mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sWindowsSystemImageListerMockList.Unlock() - return mock.ListFunc(namespace, selector) -} - -// ListCalls gets all the calls that were made to List. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageLister.ListCalls()) -func (mock *RKEK8sWindowsSystemImageListerMock) ListCalls() []struct { - Namespace string - Selector labels.Selector -} { - var calls []struct { - Namespace string - Selector labels.Selector - } - lockRKEK8sWindowsSystemImageListerMockList.RLock() - calls = mock.calls.List - lockRKEK8sWindowsSystemImageListerMockList.RUnlock() - return calls -} - -var ( - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockAddHandler sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockEnqueue sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockGeneric sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockInformer sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockLister sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockStart sync.RWMutex - lockRKEK8sWindowsSystemImageControllerMockSync sync.RWMutex -) - -// Ensure, that RKEK8sWindowsSystemImageControllerMock does implement RKEK8sWindowsSystemImageController. -// If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sWindowsSystemImageController = &RKEK8sWindowsSystemImageControllerMock{} - -// RKEK8sWindowsSystemImageControllerMock is a mock implementation of RKEK8sWindowsSystemImageController. -// -// func TestSomethingThatUsesRKEK8sWindowsSystemImageController(t *testing.T) { -// -// // make and configure a mocked RKEK8sWindowsSystemImageController -// mockedRKEK8sWindowsSystemImageController := &RKEK8sWindowsSystemImageControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddClusterScopedFeatureHandler method") -// }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddClusterScopedHandler method") -// }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddFeatureHandler method") -// }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddHandler method") -// }, -// EnqueueFunc: func(namespace string, name string) { -// panic("mock out the Enqueue method") -// }, -// GenericFunc: func() controller.GenericController { -// panic("mock out the Generic method") -// }, -// InformerFunc: func() cache.SharedIndexInformer { -// panic("mock out the Informer method") -// }, -// ListerFunc: func() v3.RKEK8sWindowsSystemImageLister { -// panic("mock out the Lister method") -// }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, -// } -// -// // use mockedRKEK8sWindowsSystemImageController in code that requires RKEK8sWindowsSystemImageController -// // and then make assertions. -// -// } -type RKEK8sWindowsSystemImageControllerMock struct { - // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) - - // EnqueueFunc mocks the Enqueue method. - EnqueueFunc func(namespace string, name string) - - // GenericFunc mocks the Generic method. - GenericFunc func() controller.GenericController - - // InformerFunc mocks the Informer method. - InformerFunc func() cache.SharedIndexInformer - - // ListerFunc mocks the Lister method. - ListerFunc func() v3.RKEK8sWindowsSystemImageLister - - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - - // calls tracks calls to the methods. - calls struct { - // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Handler is the handler argument value. - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. - AddClusterScopedHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Handler is the handler argument value. - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddFeatureHandler holds details about calls to the AddFeatureHandler method. - AddFeatureHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // Sync is the sync argument value. - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddHandler holds details about calls to the AddHandler method. - AddHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // Handler is the handler argument value. - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - // Enqueue holds details about calls to the Enqueue method. - Enqueue []struct { - // Namespace is the namespace argument value. - Namespace string - // Name is the name argument value. - Name string - } - // Generic holds details about calls to the Generic method. - Generic []struct { - } - // Informer holds details about calls to the Informer method. - Informer []struct { - } - // Lister holds details about calls to the Lister method. - Lister []struct { - } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } - } -} - -// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddClusterScopedFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Handler: handler, - } - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.Lock() - mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.Unlock() - mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) -} - -// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.RLock() - calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.RUnlock() - return calls -} - -// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddClusterScopedHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Handler: handler, - } - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.Lock() - mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.Unlock() - mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) -} - -// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedHandlerCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.RLock() - calls = mock.calls.AddClusterScopedHandler - lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.RUnlock() - return calls -} - -// AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.AddFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Sync: sync, - } - lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.Lock() - mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.Unlock() - mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) -} - -// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.AddFeatureHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) AddFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.RLock() - calls = mock.calls.AddFeatureHandler - lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.RUnlock() - return calls -} - -// AddHandler calls AddHandlerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) AddHandler(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.AddHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Name: name, - Handler: handler, - } - lockRKEK8sWindowsSystemImageControllerMockAddHandler.Lock() - mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sWindowsSystemImageControllerMockAddHandler.Unlock() - mock.AddHandlerFunc(ctx, name, handler) -} - -// AddHandlerCalls gets all the calls that were made to AddHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.AddHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) AddHandlerCalls() []struct { - Ctx context.Context - Name string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - Handler v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageControllerMockAddHandler.RLock() - calls = mock.calls.AddHandler - lockRKEK8sWindowsSystemImageControllerMockAddHandler.RUnlock() - return calls -} - -// Enqueue calls EnqueueFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Enqueue(namespace string, name string) { - if mock.EnqueueFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.EnqueueFunc: method is nil but RKEK8sWindowsSystemImageController.Enqueue was just called") - } - callInfo := struct { - Namespace string - Name string - }{ - Namespace: namespace, - Name: name, - } - lockRKEK8sWindowsSystemImageControllerMockEnqueue.Lock() - mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockRKEK8sWindowsSystemImageControllerMockEnqueue.Unlock() - mock.EnqueueFunc(namespace, name) -} - -// EnqueueCalls gets all the calls that were made to Enqueue. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.EnqueueCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) EnqueueCalls() []struct { - Namespace string - Name string -} { - var calls []struct { - Namespace string - Name string - } - lockRKEK8sWindowsSystemImageControllerMockEnqueue.RLock() - calls = mock.calls.Enqueue - lockRKEK8sWindowsSystemImageControllerMockEnqueue.RUnlock() - return calls -} - -// Generic calls GenericFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Generic() controller.GenericController { - if mock.GenericFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.GenericFunc: method is nil but RKEK8sWindowsSystemImageController.Generic was just called") - } - callInfo := struct { - }{} - lockRKEK8sWindowsSystemImageControllerMockGeneric.Lock() - mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockRKEK8sWindowsSystemImageControllerMockGeneric.Unlock() - return mock.GenericFunc() -} - -// GenericCalls gets all the calls that were made to Generic. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.GenericCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) GenericCalls() []struct { -} { - var calls []struct { - } - lockRKEK8sWindowsSystemImageControllerMockGeneric.RLock() - calls = mock.calls.Generic - lockRKEK8sWindowsSystemImageControllerMockGeneric.RUnlock() - return calls -} - -// Informer calls InformerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Informer() cache.SharedIndexInformer { - if mock.InformerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.InformerFunc: method is nil but RKEK8sWindowsSystemImageController.Informer was just called") - } - callInfo := struct { - }{} - lockRKEK8sWindowsSystemImageControllerMockInformer.Lock() - mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockRKEK8sWindowsSystemImageControllerMockInformer.Unlock() - return mock.InformerFunc() -} - -// InformerCalls gets all the calls that were made to Informer. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.InformerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) InformerCalls() []struct { -} { - var calls []struct { - } - lockRKEK8sWindowsSystemImageControllerMockInformer.RLock() - calls = mock.calls.Informer - lockRKEK8sWindowsSystemImageControllerMockInformer.RUnlock() - return calls -} - -// Lister calls ListerFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Lister() v3.RKEK8sWindowsSystemImageLister { - if mock.ListerFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.ListerFunc: method is nil but RKEK8sWindowsSystemImageController.Lister was just called") - } - callInfo := struct { - }{} - lockRKEK8sWindowsSystemImageControllerMockLister.Lock() - mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockRKEK8sWindowsSystemImageControllerMockLister.Unlock() - return mock.ListerFunc() -} - -// ListerCalls gets all the calls that were made to Lister. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.ListerCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) ListerCalls() []struct { -} { - var calls []struct { - } - lockRKEK8sWindowsSystemImageControllerMockLister.RLock() - calls = mock.calls.Lister - lockRKEK8sWindowsSystemImageControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.StartFunc: method is nil but RKEK8sWindowsSystemImageController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRKEK8sWindowsSystemImageControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRKEK8sWindowsSystemImageControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.StartCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRKEK8sWindowsSystemImageControllerMockStart.RLock() - calls = mock.calls.Start - lockRKEK8sWindowsSystemImageControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RKEK8sWindowsSystemImageControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RKEK8sWindowsSystemImageControllerMock.SyncFunc: method is nil but RKEK8sWindowsSystemImageController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRKEK8sWindowsSystemImageControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRKEK8sWindowsSystemImageControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageController.SyncCalls()) -func (mock *RKEK8sWindowsSystemImageControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRKEK8sWindowsSystemImageControllerMockSync.RLock() - calls = mock.calls.Sync - lockRKEK8sWindowsSystemImageControllerMockSync.RUnlock() - return calls -} - -var ( - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddHandler sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockController sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockCreate sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockDelete sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockGet sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockList sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockObjectClient sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockUpdate sync.RWMutex - lockRKEK8sWindowsSystemImageInterfaceMockWatch sync.RWMutex -) - -// Ensure, that RKEK8sWindowsSystemImageInterfaceMock does implement RKEK8sWindowsSystemImageInterface. -// If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sWindowsSystemImageInterface = &RKEK8sWindowsSystemImageInterfaceMock{} - -// RKEK8sWindowsSystemImageInterfaceMock is a mock implementation of RKEK8sWindowsSystemImageInterface. -// -// func TestSomethingThatUsesRKEK8sWindowsSystemImageInterface(t *testing.T) { -// -// // make and configure a mocked RKEK8sWindowsSystemImageInterface -// mockedRKEK8sWindowsSystemImageInterface := &RKEK8sWindowsSystemImageInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddClusterScopedFeatureHandler method") -// }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { -// panic("mock out the AddClusterScopedFeatureLifecycle method") -// }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddClusterScopedHandler method") -// }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { -// panic("mock out the AddClusterScopedLifecycle method") -// }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddFeatureHandler method") -// }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { -// panic("mock out the AddFeatureLifecycle method") -// }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { -// panic("mock out the AddHandler method") -// }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { -// panic("mock out the AddLifecycle method") -// }, -// ControllerFunc: func() v3.RKEK8sWindowsSystemImageController { -// panic("mock out the Controller method") -// }, -// CreateFunc: func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the Create method") -// }, -// DeleteFunc: func(name string, options *v1.DeleteOptions) error { -// panic("mock out the Delete method") -// }, -// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { -// panic("mock out the DeleteCollection method") -// }, -// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { -// panic("mock out the DeleteNamespaced method") -// }, -// GetFunc: func(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the Get method") -// }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the GetNamespaced method") -// }, -// ListFunc: func(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) { -// panic("mock out the List method") -// }, -// ObjectClientFunc: func() *objectclient.ObjectClient { -// panic("mock out the ObjectClient method") -// }, -// UpdateFunc: func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { -// panic("mock out the Update method") -// }, -// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { -// panic("mock out the Watch method") -// }, -// } -// -// // use mockedRKEK8sWindowsSystemImageInterface in code that requires RKEK8sWindowsSystemImageInterface -// // and then make assertions. -// -// } -type RKEK8sWindowsSystemImageInterfaceMock struct { - // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) - - // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) - - // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) - - // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) - - // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) - - // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.RKEK8sWindowsSystemImageController - - // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) - - // DeleteFunc mocks the Delete method. - DeleteFunc func(name string, options *v1.DeleteOptions) error - - // DeleteCollectionFunc mocks the DeleteCollection method. - DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error - - // DeleteNamespacedFunc mocks the DeleteNamespaced method. - DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error - - // GetFunc mocks the Get method. - GetFunc func(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) - - // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) - - // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) - - // ObjectClientFunc mocks the ObjectClient method. - ObjectClientFunc func() *objectclient.ObjectClient - - // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) - - // WatchFunc mocks the Watch method. - WatchFunc func(opts v1.ListOptions) (watch.Interface, error) - - // calls tracks calls to the methods. - calls struct { - // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Sync is the sync argument value. - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycle []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. - AddClusterScopedHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Sync is the sync argument value. - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. - AddClusterScopedLifecycle []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // ClusterName is the clusterName argument value. - ClusterName string - // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - // AddFeatureHandler holds details about calls to the AddFeatureHandler method. - AddFeatureHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // Sync is the sync argument value. - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. - AddFeatureLifecycle []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Enabled is the enabled argument value. - Enabled func() bool - // Name is the name argument value. - Name string - // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - // AddHandler holds details about calls to the AddHandler method. - AddHandler []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // Sync is the sync argument value. - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - // AddLifecycle holds details about calls to the AddLifecycle method. - AddLifecycle []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Name is the name argument value. - Name string - // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - // Controller holds details about calls to the Controller method. - Controller []struct { - } - // Create holds details about calls to the Create method. - Create []struct { - // In1 is the in1 argument value. - In1 *v3.RKEK8sWindowsSystemImage - } - // Delete holds details about calls to the Delete method. - Delete []struct { - // Name is the name argument value. - Name string - // Options is the options argument value. - Options *v1.DeleteOptions - } - // DeleteCollection holds details about calls to the DeleteCollection method. - DeleteCollection []struct { - // DeleteOpts is the deleteOpts argument value. - DeleteOpts *v1.DeleteOptions - // ListOpts is the listOpts argument value. - ListOpts v1.ListOptions - } - // DeleteNamespaced holds details about calls to the DeleteNamespaced method. - DeleteNamespaced []struct { - // Namespace is the namespace argument value. - Namespace string - // Name is the name argument value. - Name string - // Options is the options argument value. - Options *v1.DeleteOptions - } - // Get holds details about calls to the Get method. - Get []struct { - // Name is the name argument value. - Name string - // Opts is the opts argument value. - Opts v1.GetOptions - } - // GetNamespaced holds details about calls to the GetNamespaced method. - GetNamespaced []struct { - // Namespace is the namespace argument value. - Namespace string - // Name is the name argument value. - Name string - // Opts is the opts argument value. - Opts v1.GetOptions - } - // List holds details about calls to the List method. - List []struct { - // Opts is the opts argument value. - Opts v1.ListOptions - } - // ObjectClient holds details about calls to the ObjectClient method. - ObjectClient []struct { - } - // Update holds details about calls to the Update method. - Update []struct { - // In1 is the in1 argument value. - In1 *v3.RKEK8sWindowsSystemImage - } - // Watch holds details about calls to the Watch method. - Watch []struct { - // Opts is the opts argument value. - Opts v1.ListOptions - } - } -} - -// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Sync: sync, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.Lock() - mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.Unlock() - mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) -} - -// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.RLock() - calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.RUnlock() - return calls -} - -// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { - if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Lifecycle: lifecycle, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Lock() - mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() - mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) -} - -// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RLock() - calls = mock.calls.AddClusterScopedFeatureLifecycle - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() - return calls -} - -// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Sync: sync, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.Lock() - mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.Unlock() - mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) -} - -// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedHandlerCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.RLock() - calls = mock.calls.AddClusterScopedHandler - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.RUnlock() - return calls -} - -// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { - if mock.AddClusterScopedLifecycleFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Lifecycle: lifecycle, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.Lock() - mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.Unlock() - mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) -} - -// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedLifecycleCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedLifecycleCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.RLock() - calls = mock.calls.AddClusterScopedLifecycle - lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.RUnlock() - return calls -} - -// AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Sync: sync, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.Lock() - mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.Unlock() - mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) -} - -// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddFeatureHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.RLock() - calls = mock.calls.AddFeatureHandler - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.RUnlock() - return calls -} - -// AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { - if mock.AddFeatureLifecycleFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddFeatureLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddFeatureLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Lifecycle: lifecycle, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.Lock() - mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.Unlock() - mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) -} - -// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddFeatureLifecycleCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureLifecycleCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.RLock() - calls = mock.calls.AddFeatureLifecycle - lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.RUnlock() - return calls -} - -// AddHandler calls AddHandlerFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { - if mock.AddHandlerFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - }{ - Ctx: ctx, - Name: name, - Sync: sync, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.Lock() - mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.Unlock() - mock.AddHandlerFunc(ctx, name, sync) -} - -// AddHandlerCalls gets all the calls that were made to AddHandler. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddHandlerCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddHandlerCalls() []struct { - Ctx context.Context - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - Sync v3.RKEK8sWindowsSystemImageHandlerFunc - } - lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.RLock() - calls = mock.calls.AddHandler - lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.RUnlock() - return calls -} - -// AddLifecycle calls AddLifecycleFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { - if mock.AddLifecycleFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.AddLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - }{ - Ctx: ctx, - Name: name, - Lifecycle: lifecycle, - } - lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.Lock() - mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.Unlock() - mock.AddLifecycleFunc(ctx, name, lifecycle) -} - -// AddLifecycleCalls gets all the calls that were made to AddLifecycle. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.AddLifecycleCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddLifecycleCalls() []struct { - Ctx context.Context - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle -} { - var calls []struct { - Ctx context.Context - Name string - Lifecycle v3.RKEK8sWindowsSystemImageLifecycle - } - lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.RLock() - calls = mock.calls.AddLifecycle - lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.RUnlock() - return calls -} - -// Controller calls ControllerFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Controller() v3.RKEK8sWindowsSystemImageController { - if mock.ControllerFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.ControllerFunc: method is nil but RKEK8sWindowsSystemImageInterface.Controller was just called") - } - callInfo := struct { - }{} - lockRKEK8sWindowsSystemImageInterfaceMockController.Lock() - mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockController.Unlock() - return mock.ControllerFunc() -} - -// ControllerCalls gets all the calls that were made to Controller. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.ControllerCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) ControllerCalls() []struct { -} { - var calls []struct { - } - lockRKEK8sWindowsSystemImageInterfaceMockController.RLock() - calls = mock.calls.Controller - lockRKEK8sWindowsSystemImageInterfaceMockController.RUnlock() - return calls -} - -// Create calls CreateFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Create(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { - if mock.CreateFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.CreateFunc: method is nil but RKEK8sWindowsSystemImageInterface.Create was just called") - } - callInfo := struct { - In1 *v3.RKEK8sWindowsSystemImage - }{ - In1: in1, - } - lockRKEK8sWindowsSystemImageInterfaceMockCreate.Lock() - mock.calls.Create = append(mock.calls.Create, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockCreate.Unlock() - return mock.CreateFunc(in1) -} - -// CreateCalls gets all the calls that were made to Create. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.CreateCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) CreateCalls() []struct { - In1 *v3.RKEK8sWindowsSystemImage -} { - var calls []struct { - In1 *v3.RKEK8sWindowsSystemImage - } - lockRKEK8sWindowsSystemImageInterfaceMockCreate.RLock() - calls = mock.calls.Create - lockRKEK8sWindowsSystemImageInterfaceMockCreate.RUnlock() - return calls -} - -// Delete calls DeleteFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { - if mock.DeleteFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteFunc: method is nil but RKEK8sWindowsSystemImageInterface.Delete was just called") - } - callInfo := struct { - Name string - Options *v1.DeleteOptions - }{ - Name: name, - Options: options, - } - lockRKEK8sWindowsSystemImageInterfaceMockDelete.Lock() - mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockDelete.Unlock() - return mock.DeleteFunc(name, options) -} - -// DeleteCalls gets all the calls that were made to Delete. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.DeleteCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCalls() []struct { - Name string - Options *v1.DeleteOptions -} { - var calls []struct { - Name string - Options *v1.DeleteOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockDelete.RLock() - calls = mock.calls.Delete - lockRKEK8sWindowsSystemImageInterfaceMockDelete.RUnlock() - return calls -} - -// DeleteCollection calls DeleteCollectionFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { - if mock.DeleteCollectionFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteCollectionFunc: method is nil but RKEK8sWindowsSystemImageInterface.DeleteCollection was just called") - } - callInfo := struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions - }{ - DeleteOpts: deleteOpts, - ListOpts: listOpts, - } - lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.Lock() - mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.Unlock() - return mock.DeleteCollectionFunc(deleteOpts, listOpts) -} - -// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.DeleteCollectionCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCollectionCalls() []struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions -} { - var calls []struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.RLock() - calls = mock.calls.DeleteCollection - lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.RUnlock() - return calls -} - -// DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { - if mock.DeleteNamespacedFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteNamespacedFunc: method is nil but RKEK8sWindowsSystemImageInterface.DeleteNamespaced was just called") - } - callInfo := struct { - Namespace string - Name string - Options *v1.DeleteOptions - }{ - Namespace: namespace, - Name: name, - Options: options, - } - lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.Lock() - mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.Unlock() - return mock.DeleteNamespacedFunc(namespace, name, options) -} - -// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.DeleteNamespacedCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteNamespacedCalls() []struct { - Namespace string - Name string - Options *v1.DeleteOptions -} { - var calls []struct { - Namespace string - Name string - Options *v1.DeleteOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.RLock() - calls = mock.calls.DeleteNamespaced - lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.RUnlock() - return calls -} - -// Get calls GetFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { - if mock.GetFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.GetFunc: method is nil but RKEK8sWindowsSystemImageInterface.Get was just called") - } - callInfo := struct { - Name string - Opts v1.GetOptions - }{ - Name: name, - Opts: opts, - } - lockRKEK8sWindowsSystemImageInterfaceMockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockGet.Unlock() - return mock.GetFunc(name, opts) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.GetCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetCalls() []struct { - Name string - Opts v1.GetOptions -} { - var calls []struct { - Name string - Opts v1.GetOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockGet.RLock() - calls = mock.calls.Get - lockRKEK8sWindowsSystemImageInterfaceMockGet.RUnlock() - return calls -} - -// GetNamespaced calls GetNamespacedFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { - if mock.GetNamespacedFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.GetNamespacedFunc: method is nil but RKEK8sWindowsSystemImageInterface.GetNamespaced was just called") - } - callInfo := struct { - Namespace string - Name string - Opts v1.GetOptions - }{ - Namespace: namespace, - Name: name, - Opts: opts, - } - lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.Lock() - mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.Unlock() - return mock.GetNamespacedFunc(namespace, name, opts) -} - -// GetNamespacedCalls gets all the calls that were made to GetNamespaced. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.GetNamespacedCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetNamespacedCalls() []struct { - Namespace string - Name string - Opts v1.GetOptions -} { - var calls []struct { - Namespace string - Name string - Opts v1.GetOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.RLock() - calls = mock.calls.GetNamespaced - lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.RUnlock() - return calls -} - -// List calls ListFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) List(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) { - if mock.ListFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.ListFunc: method is nil but RKEK8sWindowsSystemImageInterface.List was just called") - } - callInfo := struct { - Opts v1.ListOptions - }{ - Opts: opts, - } - lockRKEK8sWindowsSystemImageInterfaceMockList.Lock() - mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockList.Unlock() - return mock.ListFunc(opts) -} - -// ListCalls gets all the calls that were made to List. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.ListCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) ListCalls() []struct { - Opts v1.ListOptions -} { - var calls []struct { - Opts v1.ListOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockList.RLock() - calls = mock.calls.List - lockRKEK8sWindowsSystemImageInterfaceMockList.RUnlock() - return calls -} - -// ObjectClient calls ObjectClientFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) ObjectClient() *objectclient.ObjectClient { - if mock.ObjectClientFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.ObjectClientFunc: method is nil but RKEK8sWindowsSystemImageInterface.ObjectClient was just called") - } - callInfo := struct { - }{} - lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.Lock() - mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.Unlock() - return mock.ObjectClientFunc() -} - -// ObjectClientCalls gets all the calls that were made to ObjectClient. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.ObjectClientCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) ObjectClientCalls() []struct { -} { - var calls []struct { - } - lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.RLock() - calls = mock.calls.ObjectClient - lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.RUnlock() - return calls -} - -// Update calls UpdateFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Update(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { - if mock.UpdateFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.UpdateFunc: method is nil but RKEK8sWindowsSystemImageInterface.Update was just called") - } - callInfo := struct { - In1 *v3.RKEK8sWindowsSystemImage - }{ - In1: in1, - } - lockRKEK8sWindowsSystemImageInterfaceMockUpdate.Lock() - mock.calls.Update = append(mock.calls.Update, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockUpdate.Unlock() - return mock.UpdateFunc(in1) -} - -// UpdateCalls gets all the calls that were made to Update. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.UpdateCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) UpdateCalls() []struct { - In1 *v3.RKEK8sWindowsSystemImage -} { - var calls []struct { - In1 *v3.RKEK8sWindowsSystemImage - } - lockRKEK8sWindowsSystemImageInterfaceMockUpdate.RLock() - calls = mock.calls.Update - lockRKEK8sWindowsSystemImageInterfaceMockUpdate.RUnlock() - return calls -} - -// Watch calls WatchFunc. -func (mock *RKEK8sWindowsSystemImageInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { - if mock.WatchFunc == nil { - panic("RKEK8sWindowsSystemImageInterfaceMock.WatchFunc: method is nil but RKEK8sWindowsSystemImageInterface.Watch was just called") - } - callInfo := struct { - Opts v1.ListOptions - }{ - Opts: opts, - } - lockRKEK8sWindowsSystemImageInterfaceMockWatch.Lock() - mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockRKEK8sWindowsSystemImageInterfaceMockWatch.Unlock() - return mock.WatchFunc(opts) -} - -// WatchCalls gets all the calls that were made to Watch. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImageInterface.WatchCalls()) -func (mock *RKEK8sWindowsSystemImageInterfaceMock) WatchCalls() []struct { - Opts v1.ListOptions -} { - var calls []struct { - Opts v1.ListOptions - } - lockRKEK8sWindowsSystemImageInterfaceMockWatch.RLock() - calls = mock.calls.Watch - lockRKEK8sWindowsSystemImageInterfaceMockWatch.RUnlock() - return calls -} - -var ( - lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages sync.RWMutex -) - -// Ensure, that RKEK8sWindowsSystemImagesGetterMock does implement RKEK8sWindowsSystemImagesGetter. -// If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sWindowsSystemImagesGetter = &RKEK8sWindowsSystemImagesGetterMock{} - -// RKEK8sWindowsSystemImagesGetterMock is a mock implementation of RKEK8sWindowsSystemImagesGetter. -// -// func TestSomethingThatUsesRKEK8sWindowsSystemImagesGetter(t *testing.T) { -// -// // make and configure a mocked RKEK8sWindowsSystemImagesGetter -// mockedRKEK8sWindowsSystemImagesGetter := &RKEK8sWindowsSystemImagesGetterMock{ -// RKEK8sWindowsSystemImagesFunc: func(namespace string) v3.RKEK8sWindowsSystemImageInterface { -// panic("mock out the RKEK8sWindowsSystemImages method") -// }, -// } -// -// // use mockedRKEK8sWindowsSystemImagesGetter in code that requires RKEK8sWindowsSystemImagesGetter -// // and then make assertions. -// -// } -type RKEK8sWindowsSystemImagesGetterMock struct { - // RKEK8sWindowsSystemImagesFunc mocks the RKEK8sWindowsSystemImages method. - RKEK8sWindowsSystemImagesFunc func(namespace string) v3.RKEK8sWindowsSystemImageInterface - - // calls tracks calls to the methods. - calls struct { - // RKEK8sWindowsSystemImages holds details about calls to the RKEK8sWindowsSystemImages method. - RKEK8sWindowsSystemImages []struct { - // Namespace is the namespace argument value. - Namespace string - } - } -} - -// RKEK8sWindowsSystemImages calls RKEK8sWindowsSystemImagesFunc. -func (mock *RKEK8sWindowsSystemImagesGetterMock) RKEK8sWindowsSystemImages(namespace string) v3.RKEK8sWindowsSystemImageInterface { - if mock.RKEK8sWindowsSystemImagesFunc == nil { - panic("RKEK8sWindowsSystemImagesGetterMock.RKEK8sWindowsSystemImagesFunc: method is nil but RKEK8sWindowsSystemImagesGetter.RKEK8sWindowsSystemImages was just called") - } - callInfo := struct { - Namespace string - }{ - Namespace: namespace, - } - lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.Lock() - mock.calls.RKEK8sWindowsSystemImages = append(mock.calls.RKEK8sWindowsSystemImages, callInfo) - lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.Unlock() - return mock.RKEK8sWindowsSystemImagesFunc(namespace) -} - -// RKEK8sWindowsSystemImagesCalls gets all the calls that were made to RKEK8sWindowsSystemImages. -// Check the length with: -// len(mockedRKEK8sWindowsSystemImagesGetter.RKEK8sWindowsSystemImagesCalls()) -func (mock *RKEK8sWindowsSystemImagesGetterMock) RKEK8sWindowsSystemImagesCalls() []struct { - Namespace string -} { - var calls []struct { - Namespace string - } - lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.RLock() - calls = mock.calls.RKEK8sWindowsSystemImages - lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.RUnlock() - return calls -} diff --git a/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/apis/management.cattle.io/v3/zz_generated_deepcopy.go index 2d5706fb..6f22a23b 100644 --- a/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -7940,67 +7940,6 @@ func (in *RKEK8sSystemImageList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sWindowsSystemImage) DeepCopyInto(out *RKEK8sWindowsSystemImage) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SystemImages = in.SystemImages - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sWindowsSystemImage. -func (in *RKEK8sWindowsSystemImage) DeepCopy() *RKEK8sWindowsSystemImage { - if in == nil { - return nil - } - out := new(RKEK8sWindowsSystemImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sWindowsSystemImage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sWindowsSystemImageList) DeepCopyInto(out *RKEK8sWindowsSystemImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEK8sWindowsSystemImage, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sWindowsSystemImageList. -func (in *RKEK8sWindowsSystemImageList) DeepCopy() *RKEK8sWindowsSystemImageList { - if in == nil { - return nil - } - out := new(RKEK8sWindowsSystemImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sWindowsSystemImageList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEPlan) DeepCopyInto(out *RKEPlan) { *out = *in diff --git a/apis/management.cattle.io/v3/zz_generated_k8s_client.go b/apis/management.cattle.io/v3/zz_generated_k8s_client.go index 4d455f75..bae1b2b0 100644 --- a/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -82,7 +82,6 @@ type Interface interface { RKEK8sSystemImagesGetter RKEK8sServiceOptionsGetter RKEAddonsGetter - RKEK8sWindowsSystemImagesGetter } type Clients struct { @@ -150,7 +149,6 @@ type Clients struct { RKEK8sSystemImage RKEK8sSystemImageClient RKEK8sServiceOption RKEK8sServiceOptionClient RKEAddon RKEAddonClient - RKEK8sWindowsSystemImage RKEK8sWindowsSystemImageClient } type Client struct { @@ -220,7 +218,6 @@ type Client struct { rkeK8sSystemImageControllers map[string]RKEK8sSystemImageController rkeK8sServiceOptionControllers map[string]RKEK8sServiceOptionController rkeAddonControllers map[string]RKEAddonController - rkeK8sWindowsSystemImageControllers map[string]RKEK8sWindowsSystemImageController } func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) { @@ -442,9 +439,6 @@ func NewClientsFromInterface(iface Interface) *Clients { RKEAddon: &rkeAddonClient2{ iface: iface.RKEAddons(""), }, - RKEK8sWindowsSystemImage: &rkeK8sWindowsSystemImageClient2{ - iface: iface.RKEK8sWindowsSystemImages(""), - }, } } @@ -523,7 +517,6 @@ func NewForConfig(config rest.Config) (Interface, error) { rkeK8sSystemImageControllers: map[string]RKEK8sSystemImageController{}, rkeK8sServiceOptionControllers: map[string]RKEK8sServiceOptionController{}, rkeAddonControllers: map[string]RKEAddonController{}, - rkeK8sWindowsSystemImageControllers: map[string]RKEK8sWindowsSystemImageController{}, }, nil } @@ -1344,16 +1337,3 @@ func (c *Client) RKEAddons(namespace string) RKEAddonInterface { objectClient: objectClient, } } - -type RKEK8sWindowsSystemImagesGetter interface { - RKEK8sWindowsSystemImages(namespace string) RKEK8sWindowsSystemImageInterface -} - -func (c *Client) RKEK8sWindowsSystemImages(namespace string) RKEK8sWindowsSystemImageInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sWindowsSystemImageResource, RKEK8sWindowsSystemImageGroupVersionKind, rkeK8sWindowsSystemImageFactory{}) - return &rkeK8sWindowsSystemImageClient{ - ns: namespace, - client: c, - objectClient: objectClient, - } -} diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go deleted file mode 100644 index 50090c75..00000000 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go +++ /dev/null @@ -1,503 +0,0 @@ -package v3 - -import ( - "context" - - "github.com/rancher/norman/controller" - "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/resource" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" -) - -var ( - RKEK8sWindowsSystemImageGroupVersionKind = schema.GroupVersionKind{ - Version: Version, - Group: GroupName, - Kind: "RKEK8sWindowsSystemImage", - } - RKEK8sWindowsSystemImageResource = metav1.APIResource{ - Name: "rkek8swindowssystemimages", - SingularName: "rkek8swindowssystemimage", - Namespaced: true, - - Kind: RKEK8sWindowsSystemImageGroupVersionKind.Kind, - } - - RKEK8sWindowsSystemImageGroupVersionResource = schema.GroupVersionResource{ - Group: GroupName, - Version: Version, - Resource: "rkek8swindowssystemimages", - } -) - -func init() { - resource.Put(RKEK8sWindowsSystemImageGroupVersionResource) -} - -func NewRKEK8sWindowsSystemImage(namespace, name string, obj RKEK8sWindowsSystemImage) *RKEK8sWindowsSystemImage { - obj.APIVersion, obj.Kind = RKEK8sWindowsSystemImageGroupVersionKind.ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -type RKEK8sWindowsSystemImageList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEK8sWindowsSystemImage `json:"items"` -} - -type RKEK8sWindowsSystemImageHandlerFunc func(key string, obj *RKEK8sWindowsSystemImage) (runtime.Object, error) - -type RKEK8sWindowsSystemImageChangeHandlerFunc func(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) - -type RKEK8sWindowsSystemImageLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEK8sWindowsSystemImage, err error) - Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) -} - -type RKEK8sWindowsSystemImageController interface { - Generic() controller.GenericController - Informer() cache.SharedIndexInformer - Lister() RKEK8sWindowsSystemImageLister - AddHandler(ctx context.Context, name string, handler RKEK8sWindowsSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sWindowsSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sWindowsSystemImageHandlerFunc) - Enqueue(namespace, name string) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error -} - -type RKEK8sWindowsSystemImageInterface interface { - ObjectClient() *objectclient.ObjectClient - Create(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) - Get(name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) - Update(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEK8sWindowsSystemImageController - AddHandler(ctx context.Context, name string, sync RKEK8sWindowsSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) -} - -type rkeK8sWindowsSystemImageLister struct { - controller *rkeK8sWindowsSystemImageController -} - -func (l *rkeK8sWindowsSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sWindowsSystemImage, err error) { - err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEK8sWindowsSystemImage)) - }) - return -} - -func (l *rkeK8sWindowsSystemImageLister) Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) { - var key string - if namespace != "" { - key = namespace + "/" + name - } else { - key = name - } - obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEK8sWindowsSystemImageGroupVersionKind.Group, - Resource: "rkeK8sWindowsSystemImage", - }, key) - } - return obj.(*RKEK8sWindowsSystemImage), nil -} - -type rkeK8sWindowsSystemImageController struct { - controller.GenericController -} - -func (c *rkeK8sWindowsSystemImageController) Generic() controller.GenericController { - return c.GenericController -} - -func (c *rkeK8sWindowsSystemImageController) Lister() RKEK8sWindowsSystemImageLister { - return &rkeK8sWindowsSystemImageLister{ - controller: c, - } -} - -func (c *rkeK8sWindowsSystemImageController) AddHandler(ctx context.Context, name string, handler RKEK8sWindowsSystemImageHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *rkeK8sWindowsSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sWindowsSystemImageHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if !enabled() { - return nil, nil - } else if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *rkeK8sWindowsSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sWindowsSystemImageHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok && controller.ObjectInCluster(cluster, obj) { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *rkeK8sWindowsSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sWindowsSystemImageHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if !enabled() { - return nil, nil - } else if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok && controller.ObjectInCluster(cluster, obj) { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -type rkeK8sWindowsSystemImageFactory struct { -} - -func (c rkeK8sWindowsSystemImageFactory) Object() runtime.Object { - return &RKEK8sWindowsSystemImage{} -} - -func (c rkeK8sWindowsSystemImageFactory) List() runtime.Object { - return &RKEK8sWindowsSystemImageList{} -} - -func (s *rkeK8sWindowsSystemImageClient) Controller() RKEK8sWindowsSystemImageController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.rkeK8sWindowsSystemImageControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEK8sWindowsSystemImageGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeK8sWindowsSystemImageController{ - GenericController: genericController, - } - - s.client.rkeK8sWindowsSystemImageControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c -} - -type rkeK8sWindowsSystemImageClient struct { - client *Client - ns string - objectClient *objectclient.ObjectClient - controller RKEK8sWindowsSystemImageController -} - -func (s *rkeK8sWindowsSystemImageClient) ObjectClient() *objectclient.ObjectClient { - return s.objectClient -} - -func (s *rkeK8sWindowsSystemImageClient) Create(o *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - obj, err := s.objectClient.Create(o) - return obj.(*RKEK8sWindowsSystemImage), err -} - -func (s *rkeK8sWindowsSystemImageClient) Get(name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { - obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEK8sWindowsSystemImage), err -} - -func (s *rkeK8sWindowsSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { - obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEK8sWindowsSystemImage), err -} - -func (s *rkeK8sWindowsSystemImageClient) Update(o *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEK8sWindowsSystemImage), err -} - -func (s *rkeK8sWindowsSystemImageClient) Delete(name string, options *metav1.DeleteOptions) error { - return s.objectClient.Delete(name, options) -} - -func (s *rkeK8sWindowsSystemImageClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { - return s.objectClient.DeleteNamespaced(namespace, name, options) -} - -func (s *rkeK8sWindowsSystemImageClient) List(opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) { - obj, err := s.objectClient.List(opts) - return obj.(*RKEK8sWindowsSystemImageList), err -} - -func (s *rkeK8sWindowsSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return s.objectClient.Watch(opts) -} - -// Patch applies the patch and returns the patched deployment. -func (s *rkeK8sWindowsSystemImageClient) Patch(o *RKEK8sWindowsSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sWindowsSystemImage, error) { - obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEK8sWindowsSystemImage), err -} - -func (s *rkeK8sWindowsSystemImageClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { - return s.objectClient.DeleteCollection(deleteOpts, listOpts) -} - -func (s *rkeK8sWindowsSystemImageClient) AddHandler(ctx context.Context, name string, sync RKEK8sWindowsSystemImageHandlerFunc) { - s.Controller().AddHandler(ctx, name, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) { - s.Controller().AddFeatureHandler(ctx, enabled, name, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) { - sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name, false, s, lifecycle) - s.Controller().AddHandler(ctx, name, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) { - sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name, false, s, lifecycle) - s.Controller().AddFeatureHandler(ctx, enabled, name, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) { - s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) { - s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) { - sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) - s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) -} - -func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) { - sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) - s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) -} - -type RKEK8sWindowsSystemImageIndexer func(obj *RKEK8sWindowsSystemImage) ([]string, error) - -type RKEK8sWindowsSystemImageClientCache interface { - Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) - List(namespace string, selector labels.Selector) ([]*RKEK8sWindowsSystemImage, error) - - Index(name string, indexer RKEK8sWindowsSystemImageIndexer) - GetIndexed(name, key string) ([]*RKEK8sWindowsSystemImage, error) -} - -type RKEK8sWindowsSystemImageClient interface { - Create(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) - Update(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - Delete(namespace, name string, options *metav1.DeleteOptions) error - List(namespace string, opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - - Cache() RKEK8sWindowsSystemImageClientCache - - OnCreate(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) - OnChange(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) - OnRemove(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) - Enqueue(namespace, name string) - - Generic() controller.GenericController - ObjectClient() *objectclient.ObjectClient - Interface() RKEK8sWindowsSystemImageInterface -} - -type rkeK8sWindowsSystemImageClientCache struct { - client *rkeK8sWindowsSystemImageClient2 -} - -type rkeK8sWindowsSystemImageClient2 struct { - iface RKEK8sWindowsSystemImageInterface - controller RKEK8sWindowsSystemImageController -} - -func (n *rkeK8sWindowsSystemImageClient2) Interface() RKEK8sWindowsSystemImageInterface { - return n.iface -} - -func (n *rkeK8sWindowsSystemImageClient2) Generic() controller.GenericController { - return n.iface.Controller().Generic() -} - -func (n *rkeK8sWindowsSystemImageClient2) ObjectClient() *objectclient.ObjectClient { - return n.Interface().ObjectClient() -} - -func (n *rkeK8sWindowsSystemImageClient2) Enqueue(namespace, name string) { - n.iface.Controller().Enqueue(namespace, name) -} - -func (n *rkeK8sWindowsSystemImageClient2) Create(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - return n.iface.Create(obj) -} - -func (n *rkeK8sWindowsSystemImageClient2) Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { - return n.iface.GetNamespaced(namespace, name, opts) -} - -func (n *rkeK8sWindowsSystemImageClient2) Update(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - return n.iface.Update(obj) -} - -func (n *rkeK8sWindowsSystemImageClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { - return n.iface.DeleteNamespaced(namespace, name, options) -} - -func (n *rkeK8sWindowsSystemImageClient2) List(namespace string, opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) { - return n.iface.List(opts) -} - -func (n *rkeK8sWindowsSystemImageClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return n.iface.Watch(opts) -} - -func (n *rkeK8sWindowsSystemImageClientCache) Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) { - return n.client.controller.Lister().Get(namespace, name) -} - -func (n *rkeK8sWindowsSystemImageClientCache) List(namespace string, selector labels.Selector) ([]*RKEK8sWindowsSystemImage, error) { - return n.client.controller.Lister().List(namespace, selector) -} - -func (n *rkeK8sWindowsSystemImageClient2) Cache() RKEK8sWindowsSystemImageClientCache { - n.loadController() - return &rkeK8sWindowsSystemImageClientCache{ - client: n, - } -} - -func (n *rkeK8sWindowsSystemImageClient2) OnCreate(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name+"-create", &rkeK8sWindowsSystemImageLifecycleDelegate{create: sync}) -} - -func (n *rkeK8sWindowsSystemImageClient2) OnChange(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name+"-change", &rkeK8sWindowsSystemImageLifecycleDelegate{update: sync}) -} - -func (n *rkeK8sWindowsSystemImageClient2) OnRemove(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name, &rkeK8sWindowsSystemImageLifecycleDelegate{remove: sync}) -} - -func (n *rkeK8sWindowsSystemImageClientCache) Index(name string, indexer RKEK8sWindowsSystemImageIndexer) { - err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ - name: func(obj interface{}) ([]string, error) { - if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { - return indexer(v) - } - return nil, nil - }, - }) - - if err != nil { - panic(err) - } -} - -func (n *rkeK8sWindowsSystemImageClientCache) GetIndexed(name, key string) ([]*RKEK8sWindowsSystemImage, error) { - var result []*RKEK8sWindowsSystemImage - objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) - if err != nil { - return nil, err - } - for _, obj := range objs { - if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { - result = append(result, v) - } - } - - return result, nil -} - -func (n *rkeK8sWindowsSystemImageClient2) loadController() { - if n.controller == nil { - n.controller = n.iface.Controller() - } -} - -type rkeK8sWindowsSystemImageLifecycleDelegate struct { - create RKEK8sWindowsSystemImageChangeHandlerFunc - update RKEK8sWindowsSystemImageChangeHandlerFunc - remove RKEK8sWindowsSystemImageChangeHandlerFunc -} - -func (n *rkeK8sWindowsSystemImageLifecycleDelegate) HasCreate() bool { - return n.create != nil -} - -func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Create(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { - if n.create == nil { - return obj, nil - } - return n.create(obj) -} - -func (n *rkeK8sWindowsSystemImageLifecycleDelegate) HasFinalize() bool { - return n.remove != nil -} - -func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Remove(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { - if n.remove == nil { - return obj, nil - } - return n.remove(obj) -} - -func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Updated(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { - if n.update == nil { - return obj, nil - } - return n.update(obj) -} diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go deleted file mode 100644 index 20d9a37b..00000000 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go +++ /dev/null @@ -1,66 +0,0 @@ -package v3 - -import ( - "github.com/rancher/norman/lifecycle" - "github.com/rancher/norman/resource" - "k8s.io/apimachinery/pkg/runtime" -) - -type RKEK8sWindowsSystemImageLifecycle interface { - Create(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) - Remove(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) - Updated(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) -} - -type rkeK8sWindowsSystemImageLifecycleAdapter struct { - lifecycle RKEK8sWindowsSystemImageLifecycle -} - -func (w *rkeK8sWindowsSystemImageLifecycleAdapter) HasCreate() bool { - o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) - return !ok || o.HasCreate() -} - -func (w *rkeK8sWindowsSystemImageLifecycleAdapter) HasFinalize() bool { - o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) - return !ok || o.HasFinalize() -} - -func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEK8sWindowsSystemImage)) - if o == nil { - return nil, err - } - return o, err -} - -func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEK8sWindowsSystemImage)) - if o == nil { - return nil, err - } - return o, err -} - -func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEK8sWindowsSystemImage)) - if o == nil { - return nil, err - } - return o, err -} - -func NewRKEK8sWindowsSystemImageLifecycleAdapter(name string, clusterScoped bool, client RKEK8sWindowsSystemImageInterface, l RKEK8sWindowsSystemImageLifecycle) RKEK8sWindowsSystemImageHandlerFunc { - if clusterScoped { - resource.PutClusterScoped(RKEK8sWindowsSystemImageGroupVersionResource) - } - adapter := &rkeK8sWindowsSystemImageLifecycleAdapter{lifecycle: l} - syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { - newObj, err := syncFn(key, obj) - if o, ok := newObj.(runtime.Object); ok { - return o, err - } - return nil, err - } -} diff --git a/apis/management.cattle.io/v3/zz_generated_scheme.go b/apis/management.cattle.io/v3/zz_generated_scheme.go index 235240cd..801357bf 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -157,8 +157,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &RKEK8sServiceOptionList{}, &RKEAddon{}, &RKEAddonList{}, - &RKEK8sWindowsSystemImage{}, - &RKEK8sWindowsSystemImageList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/client/management/v3/zz_generated_client.go b/client/management/v3/zz_generated_client.go index b2765bb6..95362fe5 100644 --- a/client/management/v3/zz_generated_client.go +++ b/client/management/v3/zz_generated_client.go @@ -69,7 +69,6 @@ type Client struct { RKEK8sSystemImage RKEK8sSystemImageOperations RKEK8sServiceOption RKEK8sServiceOptionOperations RKEAddon RKEAddonOperations - RKEK8sWindowsSystemImage RKEK8sWindowsSystemImageOperations } func NewClient(opts *clientbase.ClientOpts) (*Client, error) { @@ -144,7 +143,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.RKEK8sSystemImage = newRKEK8sSystemImageClient(client) client.RKEK8sServiceOption = newRKEK8sServiceOptionClient(client) client.RKEAddon = newRKEAddonClient(client) - client.RKEK8sWindowsSystemImage = newRKEK8sWindowsSystemImageClient(client) return client, nil } diff --git a/client/management/v3/zz_generated_rke_k8s_windows_system_image.go b/client/management/v3/zz_generated_rke_k8s_windows_system_image.go deleted file mode 100644 index 4a4a5b49..00000000 --- a/client/management/v3/zz_generated_rke_k8s_windows_system_image.go +++ /dev/null @@ -1,101 +0,0 @@ -package client - -import ( - "github.com/rancher/norman/types" -) - -const ( - RKEK8sWindowsSystemImageType = "rkeK8sWindowsSystemImage" - RKEK8sWindowsSystemImageFieldAnnotations = "annotations" - RKEK8sWindowsSystemImageFieldCreated = "created" - RKEK8sWindowsSystemImageFieldCreatorID = "creatorId" - RKEK8sWindowsSystemImageFieldLabels = "labels" - RKEK8sWindowsSystemImageFieldName = "name" - RKEK8sWindowsSystemImageFieldOwnerReferences = "ownerReferences" - RKEK8sWindowsSystemImageFieldRemoved = "removed" - RKEK8sWindowsSystemImageFieldSystemImages = "windowsSystemImages" - RKEK8sWindowsSystemImageFieldUUID = "uuid" -) - -type RKEK8sWindowsSystemImage struct { - types.Resource - Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` - Created string `json:"created,omitempty" yaml:"created,omitempty"` - CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` - Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` - Name string `json:"name,omitempty" yaml:"name,omitempty"` - OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` - Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` - SystemImages *WindowsSystemImages `json:"windowsSystemImages,omitempty" yaml:"windowsSystemImages,omitempty"` - UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` -} - -type RKEK8sWindowsSystemImageCollection struct { - types.Collection - Data []RKEK8sWindowsSystemImage `json:"data,omitempty"` - client *RKEK8sWindowsSystemImageClient -} - -type RKEK8sWindowsSystemImageClient struct { - apiClient *Client -} - -type RKEK8sWindowsSystemImageOperations interface { - List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error) - Create(opts *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error) - Replace(existing *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) - ByID(id string) (*RKEK8sWindowsSystemImage, error) - Delete(container *RKEK8sWindowsSystemImage) error -} - -func newRKEK8sWindowsSystemImageClient(apiClient *Client) *RKEK8sWindowsSystemImageClient { - return &RKEK8sWindowsSystemImageClient{ - apiClient: apiClient, - } -} - -func (c *RKEK8sWindowsSystemImageClient) Create(container *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - resp := &RKEK8sWindowsSystemImage{} - err := c.apiClient.Ops.DoCreate(RKEK8sWindowsSystemImageType, container, resp) - return resp, err -} - -func (c *RKEK8sWindowsSystemImageClient) Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error) { - resp := &RKEK8sWindowsSystemImage{} - err := c.apiClient.Ops.DoUpdate(RKEK8sWindowsSystemImageType, &existing.Resource, updates, resp) - return resp, err -} - -func (c *RKEK8sWindowsSystemImageClient) Replace(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { - resp := &RKEK8sWindowsSystemImage{} - err := c.apiClient.Ops.DoReplace(RKEK8sWindowsSystemImageType, &obj.Resource, obj, resp) - return resp, err -} - -func (c *RKEK8sWindowsSystemImageClient) List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error) { - resp := &RKEK8sWindowsSystemImageCollection{} - err := c.apiClient.Ops.DoList(RKEK8sWindowsSystemImageType, opts, resp) - resp.client = c - return resp, err -} - -func (cc *RKEK8sWindowsSystemImageCollection) Next() (*RKEK8sWindowsSystemImageCollection, error) { - if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &RKEK8sWindowsSystemImageCollection{} - err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) - resp.client = cc.client - return resp, err - } - return nil, nil -} - -func (c *RKEK8sWindowsSystemImageClient) ByID(id string) (*RKEK8sWindowsSystemImage, error) { - resp := &RKEK8sWindowsSystemImage{} - err := c.apiClient.Ops.DoByID(RKEK8sWindowsSystemImageType, id, resp) - return resp, err -} - -func (c *RKEK8sWindowsSystemImageClient) Delete(container *RKEK8sWindowsSystemImage) error { - return c.apiClient.Ops.DoResourceDelete(RKEK8sWindowsSystemImageType, &container.Resource) -} diff --git a/client/management/v3/zz_generated_rke_system_images.go b/client/management/v3/zz_generated_rke_system_images.go index 7f4ec3d9..dce407de 100644 --- a/client/management/v3/zz_generated_rke_system_images.go +++ b/client/management/v3/zz_generated_rke_system_images.go @@ -31,6 +31,7 @@ const ( RKESystemImagesFieldPodInfraContainer = "podInfraContainer" RKESystemImagesFieldWeaveCNI = "weaveCni" RKESystemImagesFieldWeaveNode = "weaveNode" + RKESystemImagesFieldWindowsPodInfraContainer = "podInfraWindowsContainer" ) type RKESystemImages struct { @@ -63,4 +64,5 @@ type RKESystemImages struct { PodInfraContainer string `json:"podInfraContainer,omitempty" yaml:"podInfraContainer,omitempty"` WeaveCNI string `json:"weaveCni,omitempty" yaml:"weaveCni,omitempty"` WeaveNode string `json:"weaveNode,omitempty" yaml:"weaveNode,omitempty"` + WindowsPodInfraContainer string `json:"podInfraWindowsContainer,omitempty" yaml:"podInfraWindowsContainer,omitempty"` } diff --git a/client/management/v3/zz_generated_windows_system_images.go b/client/management/v3/zz_generated_windows_system_images.go deleted file mode 100644 index 7af6a264..00000000 --- a/client/management/v3/zz_generated_windows_system_images.go +++ /dev/null @@ -1,20 +0,0 @@ -package client - -const ( - WindowsSystemImagesType = "windowsSystemImages" - WindowsSystemImagesFieldCalicoCNIBinaries = "calicoCniBinaries" - WindowsSystemImagesFieldCanalCNIBinaries = "canalCniBinaries" - WindowsSystemImagesFieldFlannelCNIBinaries = "flannelCniBinaries" - WindowsSystemImagesFieldKubeletPause = "kubeletPause" - WindowsSystemImagesFieldKubernetesBinaries = "kubernetesBinaries" - WindowsSystemImagesFieldNginxProxy = "nginxProxy" -) - -type WindowsSystemImages struct { - CalicoCNIBinaries string `json:"calicoCniBinaries,omitempty" yaml:"calicoCniBinaries,omitempty"` - CanalCNIBinaries string `json:"canalCniBinaries,omitempty" yaml:"canalCniBinaries,omitempty"` - FlannelCNIBinaries string `json:"flannelCniBinaries,omitempty" yaml:"flannelCniBinaries,omitempty"` - KubeletPause string `json:"kubeletPause,omitempty" yaml:"kubeletPause,omitempty"` - KubernetesBinaries string `json:"kubernetesBinaries,omitempty" yaml:"kubernetesBinaries,omitempty"` - NginxProxy string `json:"nginxProxy,omitempty" yaml:"nginxProxy,omitempty"` -} diff --git a/compose/zz_generated_compose.go b/compose/zz_generated_compose.go index cbaff78f..30a456bd 100644 --- a/compose/zz_generated_compose.go +++ b/compose/zz_generated_compose.go @@ -67,7 +67,6 @@ type Config struct { RKEK8sSystemImages map[string]managementClient.RKEK8sSystemImage `json:"rkeK8sSystemImages,omitempty" yaml:"rkeK8sSystemImages,omitempty"` RKEK8sServiceOptions map[string]managementClient.RKEK8sServiceOption `json:"rkeK8sServiceOptions,omitempty" yaml:"rkeK8sServiceOptions,omitempty"` RKEAddons map[string]managementClient.RKEAddon `json:"rkeAddons,omitempty" yaml:"rkeAddons,omitempty"` - RKEK8sWindowsSystemImages map[string]managementClient.RKEK8sWindowsSystemImage `json:"rkeK8sWindowsSystemImages,omitempty" yaml:"rkeK8sWindowsSystemImages,omitempty"` // Cluster Client Namespaces map[string]clusterClient.Namespace `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`