diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go index ef812f52da..00a9497fd3 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go @@ -145,6 +145,13 @@ type AzureMachineProviderSpec struct { // This is useful for debugging software based launch issues. // +optional Diagnostics AzureDiagnostics `json:"diagnostics,omitempty"` + // capacityReservationGroupID specifies the capacity reservation group resource id that should be + // used for allocating the virtual machine. + // The field size should be greater than 0 and the field input must start with '/'. + // The input for capacityReservationGroupID must be similar to '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'. + // The keys which are used should be among 'subscriptions', 'providers' and 'resourcegroups' followed by valid ID or names respectively. + // +optional + CapacityReservationGroupID string `json:"capacityReservationGroupID,omitempty"` } // SpotVMOptions defines the options relevant to running the Machine on Spot VMs diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go index 1fba016136..302aeafa49 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeAuthentications struct { Fake *FakeOperatorV1 } -var authenticationsResource = v1.SchemeGroupVersion.WithResource("authentications") +var authenticationsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "authentications"} -var authenticationsKind = v1.SchemeGroupVersion.WithKind("Authentication") +var authenticationsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Authentication"} // Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any. -func (c *FakeAuthentications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(authenticationsResource, name), &v1.Authentication{}) + Invokes(testing.NewRootGetAction(authenticationsResource, name), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // List takes label and field selectors, and returns the list of Authentications that match those selectors. -func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AuthenticationList, err error) { +func (c *FakeAuthentications) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.AuthenticationList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(authenticationsResource, authenticationsKind, opts), &v1.AuthenticationList{}) + Invokes(testing.NewRootListAction(authenticationsResource, authenticationsKind, opts), &operatorv1.AuthenticationList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) if label == nil { label = labels.Everything() } - list := &v1.AuthenticationList{ListMeta: obj.(*v1.AuthenticationList).ListMeta} - for _, item := range obj.(*v1.AuthenticationList).Items { + list := &operatorv1.AuthenticationList{ListMeta: obj.(*operatorv1.AuthenticationList).ListMeta} + for _, item := range obj.(*operatorv1.AuthenticationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) } // Watch returns a watch.Interface that watches the requested authentications. -func (c *FakeAuthentications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeAuthentications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(authenticationsResource, opts)) } // Create takes the representation of a authentication and creates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) Create(ctx context.Context, authentication *operatorv1.Authentication, opts v1.CreateOptions) (result *operatorv1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(authenticationsResource, authentication), &v1.Authentication{}) + Invokes(testing.NewRootCreateAction(authenticationsResource, authentication), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) Update(ctx context.Context, authentication *operatorv1.Authentication, opts v1.UpdateOptions) (result *operatorv1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(authenticationsResource, authentication), &v1.Authentication{}) + Invokes(testing.NewRootUpdateAction(authenticationsResource, authentication), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) { +func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *operatorv1.Authentication, opts v1.UpdateOptions) (*operatorv1.Authentication, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(authenticationsResource, "status", authentication), &v1.Authentication{}) + Invokes(testing.NewRootUpdateSubresourceAction(authenticationsResource, "status", authentication), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // Delete takes name of the authentication and deletes it. Returns an error if one occurs. -func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &v1.Authentication{}) + Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &operatorv1.Authentication{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(authenticationsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.AuthenticationList{}) + _, err := c.Fake.Invokes(action, &operatorv1.AuthenticationList{}) return err } // Patch applies the patch and returns the patched authentication. -func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Authentication, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, name, pt, data, subresources...), &v1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, name, pt, data, subresources...), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // Apply takes the given apply declarative configuration, applies it and returns the applied authentication. -func (c *FakeAuthentications) Apply(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) Apply(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Authentication, err error) { if authentication == nil { return nil, fmt.Errorf("authentication provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeAuthentications) Apply(ctx context.Context, authentication *operato return nil, fmt.Errorf("authentication.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data), &v1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { +func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Authentication, err error) { if authentication == nil { return nil, fmt.Errorf("authentication provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *o return nil, fmt.Errorf("authentication.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data, "status"), &v1.Authentication{}) + Invokes(testing.NewRootPatchSubresourceAction(authenticationsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Authentication{}) if obj == nil { return nil, err } - return obj.(*v1.Authentication), err + return obj.(*operatorv1.Authentication), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go index 2c21b16579..17e7c2c222 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeCloudCredentials struct { Fake *FakeOperatorV1 } -var cloudcredentialsResource = v1.SchemeGroupVersion.WithResource("cloudcredentials") +var cloudcredentialsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "cloudcredentials"} -var cloudcredentialsKind = v1.SchemeGroupVersion.WithKind("CloudCredential") +var cloudcredentialsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "CloudCredential"} // Get takes name of the cloudCredential, and returns the corresponding cloudCredential object, and an error if there is any. -func (c *FakeCloudCredentials) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(cloudcredentialsResource, name), &v1.CloudCredential{}) + Invokes(testing.NewRootGetAction(cloudcredentialsResource, name), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // List takes label and field selectors, and returns the list of CloudCredentials that match those selectors. -func (c *FakeCloudCredentials) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CloudCredentialList, err error) { +func (c *FakeCloudCredentials) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.CloudCredentialList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(cloudcredentialsResource, cloudcredentialsKind, opts), &v1.CloudCredentialList{}) + Invokes(testing.NewRootListAction(cloudcredentialsResource, cloudcredentialsKind, opts), &operatorv1.CloudCredentialList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeCloudCredentials) List(ctx context.Context, opts metav1.ListOptions if label == nil { label = labels.Everything() } - list := &v1.CloudCredentialList{ListMeta: obj.(*v1.CloudCredentialList).ListMeta} - for _, item := range obj.(*v1.CloudCredentialList).Items { + list := &operatorv1.CloudCredentialList{ListMeta: obj.(*operatorv1.CloudCredentialList).ListMeta} + for _, item := range obj.(*operatorv1.CloudCredentialList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeCloudCredentials) List(ctx context.Context, opts metav1.ListOptions } // Watch returns a watch.Interface that watches the requested cloudCredentials. -func (c *FakeCloudCredentials) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeCloudCredentials) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(cloudcredentialsResource, opts)) } // Create takes the representation of a cloudCredential and creates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Create(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.CreateOptions) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Create(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.CreateOptions) (result *operatorv1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(cloudcredentialsResource, cloudCredential), &v1.CloudCredential{}) + Invokes(testing.NewRootCreateAction(cloudcredentialsResource, cloudCredential), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // Update takes the representation of a cloudCredential and updates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Update(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Update(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.UpdateOptions) (result *operatorv1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(cloudcredentialsResource, cloudCredential), &v1.CloudCredential{}) + Invokes(testing.NewRootUpdateAction(cloudcredentialsResource, cloudCredential), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCloudCredentials) UpdateStatus(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (*v1.CloudCredential, error) { +func (c *FakeCloudCredentials) UpdateStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts v1.UpdateOptions) (*operatorv1.CloudCredential, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(cloudcredentialsResource, "status", cloudCredential), &v1.CloudCredential{}) + Invokes(testing.NewRootUpdateSubresourceAction(cloudcredentialsResource, "status", cloudCredential), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // Delete takes name of the cloudCredential and deletes it. Returns an error if one occurs. -func (c *FakeCloudCredentials) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeCloudCredentials) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(cloudcredentialsResource, name, opts), &v1.CloudCredential{}) + Invokes(testing.NewRootDeleteActionWithOptions(cloudcredentialsResource, name, opts), &operatorv1.CloudCredential{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCloudCredentials) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeCloudCredentials) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(cloudcredentialsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.CloudCredentialList{}) + _, err := c.Fake.Invokes(action, &operatorv1.CloudCredentialList{}) return err } // Patch applies the patch and returns the patched cloudCredential. -func (c *FakeCloudCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.CloudCredential, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, name, pt, data, subresources...), &v1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, name, pt, data, subresources...), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // Apply takes the given apply declarative configuration, applies it and returns the applied cloudCredential. -func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CloudCredential, err error) { if cloudCredential == nil { return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *opera return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data), &v1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { +func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CloudCredential, err error) { if cloudCredential == nil { return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data, "status"), &v1.CloudCredential{}) + Invokes(testing.NewRootPatchSubresourceAction(cloudcredentialsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.CloudCredential{}) if obj == nil { return nil, err } - return obj.(*v1.CloudCredential), err + return obj.(*operatorv1.CloudCredential), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go index fc5cb4932e..3d2c0e8087 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeClusterCSIDrivers struct { Fake *FakeOperatorV1 } -var clustercsidriversResource = v1.SchemeGroupVersion.WithResource("clustercsidrivers") +var clustercsidriversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "clustercsidrivers"} -var clustercsidriversKind = v1.SchemeGroupVersion.WithKind("ClusterCSIDriver") +var clustercsidriversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ClusterCSIDriver"} // Get takes name of the clusterCSIDriver, and returns the corresponding clusterCSIDriver object, and an error if there is any. -func (c *FakeClusterCSIDrivers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clustercsidriversResource, name), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootGetAction(clustercsidriversResource, name), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // List takes label and field selectors, and returns the list of ClusterCSIDrivers that match those selectors. -func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterCSIDriverList, err error) { +func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ClusterCSIDriverList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(clustercsidriversResource, clustercsidriversKind, opts), &v1.ClusterCSIDriverList{}) + Invokes(testing.NewRootListAction(clustercsidriversResource, clustercsidriversKind, opts), &operatorv1.ClusterCSIDriverList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts metav1.ListOption if label == nil { label = labels.Everything() } - list := &v1.ClusterCSIDriverList{ListMeta: obj.(*v1.ClusterCSIDriverList).ListMeta} - for _, item := range obj.(*v1.ClusterCSIDriverList).Items { + list := &operatorv1.ClusterCSIDriverList{ListMeta: obj.(*operatorv1.ClusterCSIDriverList).ListMeta} + for _, item := range obj.(*operatorv1.ClusterCSIDriverList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts metav1.ListOption } // Watch returns a watch.Interface that watches the requested clusterCSIDrivers. -func (c *FakeClusterCSIDrivers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeClusterCSIDrivers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(clustercsidriversResource, opts)) } // Create takes the representation of a clusterCSIDriver and creates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Create(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.CreateOptions) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Create(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.CreateOptions) (result *operatorv1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clustercsidriversResource, clusterCSIDriver), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootCreateAction(clustercsidriversResource, clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // Update takes the representation of a clusterCSIDriver and updates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Update(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Update(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.UpdateOptions) (result *operatorv1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clustercsidriversResource, clusterCSIDriver), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootUpdateAction(clustercsidriversResource, clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterCSIDrivers) UpdateStatus(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (*v1.ClusterCSIDriver, error) { +func (c *FakeClusterCSIDrivers) UpdateStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts v1.UpdateOptions) (*operatorv1.ClusterCSIDriver, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(clustercsidriversResource, "status", clusterCSIDriver), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootUpdateSubresourceAction(clustercsidriversResource, "status", clusterCSIDriver), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // Delete takes name of the clusterCSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeClusterCSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeClusterCSIDrivers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clustercsidriversResource, name, opts), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootDeleteActionWithOptions(clustercsidriversResource, name, opts), &operatorv1.ClusterCSIDriver{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeClusterCSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeClusterCSIDrivers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clustercsidriversResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ClusterCSIDriverList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ClusterCSIDriverList{}) return err } // Patch applies the patch and returns the patched clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ClusterCSIDriver, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, name, pt, data, subresources...), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, name, pt, data, subresources...), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // Apply takes the given apply declarative configuration, applies it and returns the applied clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) { if clusterCSIDriver == nil { return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *ope return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { +func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) { if clusterCSIDriver == nil { return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDrive return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data, "status"), &v1.ClusterCSIDriver{}) + Invokes(testing.NewRootPatchSubresourceAction(clustercsidriversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ClusterCSIDriver{}) if obj == nil { return nil, err } - return obj.(*v1.ClusterCSIDriver), err + return obj.(*operatorv1.ClusterCSIDriver), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go index f6163ad233..dc5edf674e 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeConfigs struct { Fake *FakeOperatorV1 } -var configsResource = v1.SchemeGroupVersion.WithResource("configs") +var configsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "configs"} -var configsKind = v1.SchemeGroupVersion.WithKind("Config") +var configsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Config"} // Get takes name of the config, and returns the corresponding config object, and an error if there is any. -func (c *FakeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { +func (c *FakeConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(configsResource, name), &v1.Config{}) + Invokes(testing.NewRootGetAction(configsResource, name), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // List takes label and field selectors, and returns the list of Configs that match those selectors. -func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { +func (c *FakeConfigs) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ConfigList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(configsResource, configsKind, opts), &v1.ConfigList{}) + Invokes(testing.NewRootListAction(configsResource, configsKind, opts), &operatorv1.ConfigList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &v1.ConfigList{ListMeta: obj.(*v1.ConfigList).ListMeta} - for _, item := range obj.(*v1.ConfigList).Items { + list := &operatorv1.ConfigList{ListMeta: obj.(*operatorv1.ConfigList).ListMeta} + for _, item := range obj.(*operatorv1.ConfigList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result } // Watch returns a watch.Interface that watches the requested configs. -func (c *FakeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(configsResource, opts)) } // Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { +func (c *FakeConfigs) Create(ctx context.Context, config *operatorv1.Config, opts v1.CreateOptions) (result *operatorv1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(configsResource, config), &v1.Config{}) + Invokes(testing.NewRootCreateAction(configsResource, config), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { +func (c *FakeConfigs) Update(ctx context.Context, config *operatorv1.Config, opts v1.UpdateOptions) (result *operatorv1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(configsResource, config), &v1.Config{}) + Invokes(testing.NewRootUpdateAction(configsResource, config), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) { +func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *operatorv1.Config, opts v1.UpdateOptions) (*operatorv1.Config, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(configsResource, "status", config), &v1.Config{}) + Invokes(testing.NewRootUpdateSubresourceAction(configsResource, "status", config), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // Delete takes name of the config and deletes it. Returns an error if one occurs. -func (c *FakeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &v1.Config{}) + Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &operatorv1.Config{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(configsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ConfigList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ConfigList{}) return err } // Patch applies the patch and returns the patched config. -func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { +func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Config, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, name, pt, data, subresources...), &v1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, name, pt, data, subresources...), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // Apply takes the given apply declarative configuration, applies it and returns the applied config. -func (c *FakeConfigs) Apply(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { +func (c *FakeConfigs) Apply(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Config, err error) { if config == nil { return nil, fmt.Errorf("config provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeConfigs) Apply(ctx context.Context, config *operatorv1.ConfigApplyC return nil, fmt.Errorf("config.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data), &v1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { +func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Config, err error) { if config == nil { return nil, fmt.Errorf("config provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *operatorv1.Config return nil, fmt.Errorf("config.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data, "status"), &v1.Config{}) + Invokes(testing.NewRootPatchSubresourceAction(configsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Config{}) if obj == nil { return nil, err } - return obj.(*v1.Config), err + return obj.(*operatorv1.Config), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go index fa60532f6f..8355153938 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeConsoles struct { Fake *FakeOperatorV1 } -var consolesResource = v1.SchemeGroupVersion.WithResource("consoles") +var consolesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "consoles"} -var consolesKind = v1.SchemeGroupVersion.WithKind("Console") +var consolesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Console"} // Get takes name of the console, and returns the corresponding console object, and an error if there is any. -func (c *FakeConsoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Console, err error) { +func (c *FakeConsoles) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(consolesResource, name), &v1.Console{}) + Invokes(testing.NewRootGetAction(consolesResource, name), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // List takes label and field selectors, and returns the list of Consoles that match those selectors. -func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleList, err error) { +func (c *FakeConsoles) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ConsoleList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(consolesResource, consolesKind, opts), &v1.ConsoleList{}) + Invokes(testing.NewRootListAction(consolesResource, consolesKind, opts), &operatorv1.ConsoleList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (resul if label == nil { label = labels.Everything() } - list := &v1.ConsoleList{ListMeta: obj.(*v1.ConsoleList).ListMeta} - for _, item := range obj.(*v1.ConsoleList).Items { + list := &operatorv1.ConsoleList{ListMeta: obj.(*operatorv1.ConsoleList).ListMeta} + for _, item := range obj.(*operatorv1.ConsoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (resul } // Watch returns a watch.Interface that watches the requested consoles. -func (c *FakeConsoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeConsoles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(consolesResource, opts)) } // Create takes the representation of a console and creates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (result *v1.Console, err error) { +func (c *FakeConsoles) Create(ctx context.Context, console *operatorv1.Console, opts v1.CreateOptions) (result *operatorv1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(consolesResource, console), &v1.Console{}) + Invokes(testing.NewRootCreateAction(consolesResource, console), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // Update takes the representation of a console and updates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { +func (c *FakeConsoles) Update(ctx context.Context, console *operatorv1.Console, opts v1.UpdateOptions) (result *operatorv1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(consolesResource, console), &v1.Console{}) + Invokes(testing.NewRootUpdateAction(consolesResource, console), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) { +func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *operatorv1.Console, opts v1.UpdateOptions) (*operatorv1.Console, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(consolesResource, "status", console), &v1.Console{}) + Invokes(testing.NewRootUpdateSubresourceAction(consolesResource, "status", console), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // Delete takes name of the console and deletes it. Returns an error if one occurs. -func (c *FakeConsoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeConsoles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &v1.Console{}) + Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &operatorv1.Console{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(consolesResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ConsoleList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ConsoleList{}) return err } // Patch applies the patch and returns the patched console. -func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) { +func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Console, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, name, pt, data, subresources...), &v1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, name, pt, data, subresources...), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // Apply takes the given apply declarative configuration, applies it and returns the applied console. -func (c *FakeConsoles) Apply(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { +func (c *FakeConsoles) Apply(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Console, err error) { if console == nil { return nil, fmt.Errorf("console provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeConsoles) Apply(ctx context.Context, console *operatorv1.ConsoleApp return nil, fmt.Errorf("console.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data), &v1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { +func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Console, err error) { if console == nil { return nil, fmt.Errorf("console provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *operatorv1.Cons return nil, fmt.Errorf("console.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data, "status"), &v1.Console{}) + Invokes(testing.NewRootPatchSubresourceAction(consolesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Console{}) if obj == nil { return nil, err } - return obj.(*v1.Console), err + return obj.(*operatorv1.Console), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go index 47e16725cf..a7225c33df 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeCSISnapshotControllers struct { Fake *FakeOperatorV1 } -var csisnapshotcontrollersResource = v1.SchemeGroupVersion.WithResource("csisnapshotcontrollers") +var csisnapshotcontrollersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "csisnapshotcontrollers"} -var csisnapshotcontrollersKind = v1.SchemeGroupVersion.WithKind("CSISnapshotController") +var csisnapshotcontrollersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "CSISnapshotController"} // Get takes name of the cSISnapshotController, and returns the corresponding cSISnapshotController object, and an error if there is any. -func (c *FakeCSISnapshotControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(csisnapshotcontrollersResource, name), &v1.CSISnapshotController{}) + Invokes(testing.NewRootGetAction(csisnapshotcontrollersResource, name), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // List takes label and field selectors, and returns the list of CSISnapshotControllers that match those selectors. -func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSISnapshotControllerList, err error) { +func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.CSISnapshotControllerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(csisnapshotcontrollersResource, csisnapshotcontrollersKind, opts), &v1.CSISnapshotControllerList{}) + Invokes(testing.NewRootListAction(csisnapshotcontrollersResource, csisnapshotcontrollersKind, opts), &operatorv1.CSISnapshotControllerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts metav1.ListO if label == nil { label = labels.Everything() } - list := &v1.CSISnapshotControllerList{ListMeta: obj.(*v1.CSISnapshotControllerList).ListMeta} - for _, item := range obj.(*v1.CSISnapshotControllerList).Items { + list := &operatorv1.CSISnapshotControllerList{ListMeta: obj.(*operatorv1.CSISnapshotControllerList).ListMeta} + for _, item := range obj.(*operatorv1.CSISnapshotControllerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts metav1.ListO } // Watch returns a watch.Interface that watches the requested cSISnapshotControllers. -func (c *FakeCSISnapshotControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeCSISnapshotControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(csisnapshotcontrollersResource, opts)) } // Create takes the representation of a cSISnapshotController and creates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Create(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.CreateOptions) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Create(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.CreateOptions) (result *operatorv1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(csisnapshotcontrollersResource, cSISnapshotController), &v1.CSISnapshotController{}) + Invokes(testing.NewRootCreateAction(csisnapshotcontrollersResource, cSISnapshotController), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // Update takes the representation of a cSISnapshotController and updates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Update(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Update(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.UpdateOptions) (result *operatorv1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(csisnapshotcontrollersResource, cSISnapshotController), &v1.CSISnapshotController{}) + Invokes(testing.NewRootUpdateAction(csisnapshotcontrollersResource, cSISnapshotController), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCSISnapshotControllers) UpdateStatus(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (*v1.CSISnapshotController, error) { +func (c *FakeCSISnapshotControllers) UpdateStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts v1.UpdateOptions) (*operatorv1.CSISnapshotController, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(csisnapshotcontrollersResource, "status", cSISnapshotController), &v1.CSISnapshotController{}) + Invokes(testing.NewRootUpdateSubresourceAction(csisnapshotcontrollersResource, "status", cSISnapshotController), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // Delete takes name of the cSISnapshotController and deletes it. Returns an error if one occurs. -func (c *FakeCSISnapshotControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeCSISnapshotControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(csisnapshotcontrollersResource, name, opts), &v1.CSISnapshotController{}) + Invokes(testing.NewRootDeleteActionWithOptions(csisnapshotcontrollersResource, name, opts), &operatorv1.CSISnapshotController{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeCSISnapshotControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeCSISnapshotControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(csisnapshotcontrollersResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.CSISnapshotControllerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.CSISnapshotControllerList{}) return err } // Patch applies the patch and returns the patched cSISnapshotController. -func (c *FakeCSISnapshotControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.CSISnapshotController, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, name, pt, data, subresources...), &v1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, name, pt, data, subresources...), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // Apply takes the given apply declarative configuration, applies it and returns the applied cSISnapshotController. -func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) { if cSISnapshotController == nil { return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotContr return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data), &v1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { +func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) { if cSISnapshotController == nil { return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapsho return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, "status"), &v1.CSISnapshotController{}) + Invokes(testing.NewRootPatchSubresourceAction(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.CSISnapshotController{}) if obj == nil { return nil, err } - return obj.(*v1.CSISnapshotController), err + return obj.(*operatorv1.CSISnapshotController), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go index 47f85e2a5b..d54d99ec53 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeDNSes struct { Fake *FakeOperatorV1 } -var dnsesResource = v1.SchemeGroupVersion.WithResource("dnses") +var dnsesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "dnses"} -var dnsesKind = v1.SchemeGroupVersion.WithKind("DNS") +var dnsesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "DNS"} // Get takes name of the dNS, and returns the corresponding dNS object, and an error if there is any. -func (c *FakeDNSes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DNS, err error) { +func (c *FakeDNSes) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(dnsesResource, name), &v1.DNS{}) + Invokes(testing.NewRootGetAction(dnsesResource, name), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // List takes label and field selectors, and returns the list of DNSes that match those selectors. -func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DNSList, err error) { +func (c *FakeDNSes) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.DNSList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(dnsesResource, dnsesKind, opts), &v1.DNSList{}) + Invokes(testing.NewRootListAction(dnsesResource, dnsesKind, opts), &operatorv1.DNSList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result * if label == nil { label = labels.Everything() } - list := &v1.DNSList{ListMeta: obj.(*v1.DNSList).ListMeta} - for _, item := range obj.(*v1.DNSList).Items { + list := &operatorv1.DNSList{ListMeta: obj.(*operatorv1.DNSList).ListMeta} + for _, item := range obj.(*operatorv1.DNSList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result * } // Watch returns a watch.Interface that watches the requested dNSes. -func (c *FakeDNSes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeDNSes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(dnsesResource, opts)) } // Create takes the representation of a dNS and creates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (result *v1.DNS, err error) { +func (c *FakeDNSes) Create(ctx context.Context, dNS *operatorv1.DNS, opts v1.CreateOptions) (result *operatorv1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(dnsesResource, dNS), &v1.DNS{}) + Invokes(testing.NewRootCreateAction(dnsesResource, dNS), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // Update takes the representation of a dNS and updates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { +func (c *FakeDNSes) Update(ctx context.Context, dNS *operatorv1.DNS, opts v1.UpdateOptions) (result *operatorv1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(dnsesResource, dNS), &v1.DNS{}) + Invokes(testing.NewRootUpdateAction(dnsesResource, dNS), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) { +func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *operatorv1.DNS, opts v1.UpdateOptions) (*operatorv1.DNS, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(dnsesResource, "status", dNS), &v1.DNS{}) + Invokes(testing.NewRootUpdateSubresourceAction(dnsesResource, "status", dNS), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // Delete takes name of the dNS and deletes it. Returns an error if one occurs. -func (c *FakeDNSes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeDNSes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &v1.DNS{}) + Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &operatorv1.DNS{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(dnsesResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.DNSList{}) + _, err := c.Fake.Invokes(action, &operatorv1.DNSList{}) return err } // Patch applies the patch and returns the patched dNS. -func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) { +func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.DNS, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, name, pt, data, subresources...), &v1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, name, pt, data, subresources...), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // Apply takes the given apply declarative configuration, applies it and returns the applied dNS. -func (c *FakeDNSes) Apply(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { +func (c *FakeDNSes) Apply(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.DNS, err error) { if dNS == nil { return nil, fmt.Errorf("dNS provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeDNSes) Apply(ctx context.Context, dNS *operatorv1.DNSApplyConfigura return nil, fmt.Errorf("dNS.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data), &v1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { +func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.DNS, err error) { if dNS == nil { return nil, fmt.Errorf("dNS provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *operatorv1.DNSApplyCon return nil, fmt.Errorf("dNS.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data, "status"), &v1.DNS{}) + Invokes(testing.NewRootPatchSubresourceAction(dnsesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.DNS{}) if obj == nil { return nil, err } - return obj.(*v1.DNS), err + return obj.(*operatorv1.DNS), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go index c352ce6596..a0db62e202 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeEtcds struct { Fake *FakeOperatorV1 } -var etcdsResource = v1.SchemeGroupVersion.WithResource("etcds") +var etcdsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "etcds"} -var etcdsKind = v1.SchemeGroupVersion.WithKind("Etcd") +var etcdsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Etcd"} // Get takes name of the etcd, and returns the corresponding etcd object, and an error if there is any. -func (c *FakeEtcds) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Etcd, err error) { +func (c *FakeEtcds) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(etcdsResource, name), &v1.Etcd{}) + Invokes(testing.NewRootGetAction(etcdsResource, name), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // List takes label and field selectors, and returns the list of Etcds that match those selectors. -func (c *FakeEtcds) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EtcdList, err error) { +func (c *FakeEtcds) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.EtcdList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(etcdsResource, etcdsKind, opts), &v1.EtcdList{}) + Invokes(testing.NewRootListAction(etcdsResource, etcdsKind, opts), &operatorv1.EtcdList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeEtcds) List(ctx context.Context, opts metav1.ListOptions) (result * if label == nil { label = labels.Everything() } - list := &v1.EtcdList{ListMeta: obj.(*v1.EtcdList).ListMeta} - for _, item := range obj.(*v1.EtcdList).Items { + list := &operatorv1.EtcdList{ListMeta: obj.(*operatorv1.EtcdList).ListMeta} + for _, item := range obj.(*operatorv1.EtcdList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeEtcds) List(ctx context.Context, opts metav1.ListOptions) (result * } // Watch returns a watch.Interface that watches the requested etcds. -func (c *FakeEtcds) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeEtcds) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(etcdsResource, opts)) } // Create takes the representation of a etcd and creates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Create(ctx context.Context, etcd *v1.Etcd, opts metav1.CreateOptions) (result *v1.Etcd, err error) { +func (c *FakeEtcds) Create(ctx context.Context, etcd *operatorv1.Etcd, opts v1.CreateOptions) (result *operatorv1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(etcdsResource, etcd), &v1.Etcd{}) + Invokes(testing.NewRootCreateAction(etcdsResource, etcd), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // Update takes the representation of a etcd and updates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Update(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (result *v1.Etcd, err error) { +func (c *FakeEtcds) Update(ctx context.Context, etcd *operatorv1.Etcd, opts v1.UpdateOptions) (result *operatorv1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(etcdsResource, etcd), &v1.Etcd{}) + Invokes(testing.NewRootUpdateAction(etcdsResource, etcd), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeEtcds) UpdateStatus(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (*v1.Etcd, error) { +func (c *FakeEtcds) UpdateStatus(ctx context.Context, etcd *operatorv1.Etcd, opts v1.UpdateOptions) (*operatorv1.Etcd, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(etcdsResource, "status", etcd), &v1.Etcd{}) + Invokes(testing.NewRootUpdateSubresourceAction(etcdsResource, "status", etcd), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // Delete takes name of the etcd and deletes it. Returns an error if one occurs. -func (c *FakeEtcds) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeEtcds) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(etcdsResource, name, opts), &v1.Etcd{}) + Invokes(testing.NewRootDeleteActionWithOptions(etcdsResource, name, opts), &operatorv1.Etcd{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeEtcds) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeEtcds) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(etcdsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.EtcdList{}) + _, err := c.Fake.Invokes(action, &operatorv1.EtcdList{}) return err } // Patch applies the patch and returns the patched etcd. -func (c *FakeEtcds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Etcd, err error) { +func (c *FakeEtcds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Etcd, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, name, pt, data, subresources...), &v1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, name, pt, data, subresources...), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // Apply takes the given apply declarative configuration, applies it and returns the applied etcd. -func (c *FakeEtcds) Apply(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { +func (c *FakeEtcds) Apply(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Etcd, err error) { if etcd == nil { return nil, fmt.Errorf("etcd provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeEtcds) Apply(ctx context.Context, etcd *operatorv1.EtcdApplyConfigu return nil, fmt.Errorf("etcd.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data), &v1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { +func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Etcd, err error) { if etcd == nil { return nil, fmt.Errorf("etcd provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *operatorv1.EtcdApplyC return nil, fmt.Errorf("etcd.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data, "status"), &v1.Etcd{}) + Invokes(testing.NewRootPatchSubresourceAction(etcdsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Etcd{}) if obj == nil { return nil, err } - return obj.(*v1.Etcd), err + return obj.(*operatorv1.Etcd), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go index 6dd0407460..cea7ae3699 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -22,25 +23,25 @@ type FakeIngressControllers struct { ns string } -var ingresscontrollersResource = v1.SchemeGroupVersion.WithResource("ingresscontrollers") +var ingresscontrollersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "ingresscontrollers"} -var ingresscontrollersKind = v1.SchemeGroupVersion.WithKind("IngressController") +var ingresscontrollersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "IngressController"} // Get takes name of the ingressController, and returns the corresponding ingressController object, and an error if there is any. -func (c *FakeIngressControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(ingresscontrollersResource, c.ns, name), &v1.IngressController{}) + Invokes(testing.NewGetAction(ingresscontrollersResource, c.ns, name), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // List takes label and field selectors, and returns the list of IngressControllers that match those selectors. -func (c *FakeIngressControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressControllerList, err error) { +func (c *FakeIngressControllers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.IngressControllerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), &v1.IngressControllerList{}) + Invokes(testing.NewListAction(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), &operatorv1.IngressControllerList{}) if obj == nil { return nil, err @@ -50,8 +51,8 @@ func (c *FakeIngressControllers) List(ctx context.Context, opts metav1.ListOptio if label == nil { label = labels.Everything() } - list := &v1.IngressControllerList{ListMeta: obj.(*v1.IngressControllerList).ListMeta} - for _, item := range obj.(*v1.IngressControllerList).Items { + list := &operatorv1.IngressControllerList{ListMeta: obj.(*operatorv1.IngressControllerList).ListMeta} + for _, item := range obj.(*operatorv1.IngressControllerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -60,75 +61,75 @@ func (c *FakeIngressControllers) List(ctx context.Context, opts metav1.ListOptio } // Watch returns a watch.Interface that watches the requested ingressControllers. -func (c *FakeIngressControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeIngressControllers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(ingresscontrollersResource, c.ns, opts)) } // Create takes the representation of a ingressController and creates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Create(ctx context.Context, ingressController *v1.IngressController, opts metav1.CreateOptions) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) Create(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.CreateOptions) (result *operatorv1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(ingresscontrollersResource, c.ns, ingressController), &v1.IngressController{}) + Invokes(testing.NewCreateAction(ingresscontrollersResource, c.ns, ingressController), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // Update takes the representation of a ingressController and updates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Update(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) Update(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.UpdateOptions) (result *operatorv1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(ingresscontrollersResource, c.ns, ingressController), &v1.IngressController{}) + Invokes(testing.NewUpdateAction(ingresscontrollersResource, c.ns, ingressController), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngressControllers) UpdateStatus(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (*v1.IngressController, error) { +func (c *FakeIngressControllers) UpdateStatus(ctx context.Context, ingressController *operatorv1.IngressController, opts v1.UpdateOptions) (*operatorv1.IngressController, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(ingresscontrollersResource, "status", c.ns, ingressController), &v1.IngressController{}) + Invokes(testing.NewUpdateSubresourceAction(ingresscontrollersResource, "status", c.ns, ingressController), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // Delete takes name of the ingressController and deletes it. Returns an error if one occurs. -func (c *FakeIngressControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeIngressControllers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ingresscontrollersResource, c.ns, name, opts), &v1.IngressController{}) + Invokes(testing.NewDeleteActionWithOptions(ingresscontrollersResource, c.ns, name, opts), &operatorv1.IngressController{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeIngressControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeIngressControllers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionAction(ingresscontrollersResource, c.ns, listOpts) - _, err := c.Fake.Invokes(action, &v1.IngressControllerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.IngressControllerList{}) return err } // Patch applies the patch and returns the patched ingressController. -func (c *FakeIngressControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.IngressController, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, name, pt, data, subresources...), &v1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, name, pt, data, subresources...), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // Apply takes the given apply declarative configuration, applies it and returns the applied ingressController. -func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.IngressController, err error) { if ingressController == nil { return nil, fmt.Errorf("ingressController provided to Apply must not be nil") } @@ -141,17 +142,17 @@ func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *o return nil, fmt.Errorf("ingressController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data), &v1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { +func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.IngressController, err error) { if ingressController == nil { return nil, fmt.Errorf("ingressController provided to Apply must not be nil") } @@ -164,10 +165,10 @@ func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressControl return nil, fmt.Errorf("ingressController.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.IngressController{}) + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &operatorv1.IngressController{}) if obj == nil { return nil, err } - return obj.(*v1.IngressController), err + return obj.(*operatorv1.IngressController), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go index fa66123777..bd2e9fa371 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeInsightsOperators struct { Fake *FakeOperatorV1 } -var insightsoperatorsResource = v1.SchemeGroupVersion.WithResource("insightsoperators") +var insightsoperatorsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "insightsoperators"} -var insightsoperatorsKind = v1.SchemeGroupVersion.WithKind("InsightsOperator") +var insightsoperatorsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "InsightsOperator"} // Get takes name of the insightsOperator, and returns the corresponding insightsOperator object, and an error if there is any. -func (c *FakeInsightsOperators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(insightsoperatorsResource, name), &v1.InsightsOperator{}) + Invokes(testing.NewRootGetAction(insightsoperatorsResource, name), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // List takes label and field selectors, and returns the list of InsightsOperators that match those selectors. -func (c *FakeInsightsOperators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InsightsOperatorList, err error) { +func (c *FakeInsightsOperators) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.InsightsOperatorList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(insightsoperatorsResource, insightsoperatorsKind, opts), &v1.InsightsOperatorList{}) + Invokes(testing.NewRootListAction(insightsoperatorsResource, insightsoperatorsKind, opts), &operatorv1.InsightsOperatorList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeInsightsOperators) List(ctx context.Context, opts metav1.ListOption if label == nil { label = labels.Everything() } - list := &v1.InsightsOperatorList{ListMeta: obj.(*v1.InsightsOperatorList).ListMeta} - for _, item := range obj.(*v1.InsightsOperatorList).Items { + list := &operatorv1.InsightsOperatorList{ListMeta: obj.(*operatorv1.InsightsOperatorList).ListMeta} + for _, item := range obj.(*operatorv1.InsightsOperatorList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeInsightsOperators) List(ctx context.Context, opts metav1.ListOption } // Watch returns a watch.Interface that watches the requested insightsOperators. -func (c *FakeInsightsOperators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeInsightsOperators) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(insightsoperatorsResource, opts)) } // Create takes the representation of a insightsOperator and creates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Create(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.CreateOptions) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Create(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.CreateOptions) (result *operatorv1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(insightsoperatorsResource, insightsOperator), &v1.InsightsOperator{}) + Invokes(testing.NewRootCreateAction(insightsoperatorsResource, insightsOperator), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // Update takes the representation of a insightsOperator and updates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Update(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Update(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.UpdateOptions) (result *operatorv1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(insightsoperatorsResource, insightsOperator), &v1.InsightsOperator{}) + Invokes(testing.NewRootUpdateAction(insightsoperatorsResource, insightsOperator), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInsightsOperators) UpdateStatus(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (*v1.InsightsOperator, error) { +func (c *FakeInsightsOperators) UpdateStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts v1.UpdateOptions) (*operatorv1.InsightsOperator, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(insightsoperatorsResource, "status", insightsOperator), &v1.InsightsOperator{}) + Invokes(testing.NewRootUpdateSubresourceAction(insightsoperatorsResource, "status", insightsOperator), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // Delete takes name of the insightsOperator and deletes it. Returns an error if one occurs. -func (c *FakeInsightsOperators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeInsightsOperators) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(insightsoperatorsResource, name, opts), &v1.InsightsOperator{}) + Invokes(testing.NewRootDeleteActionWithOptions(insightsoperatorsResource, name, opts), &operatorv1.InsightsOperator{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeInsightsOperators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeInsightsOperators) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(insightsoperatorsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.InsightsOperatorList{}) + _, err := c.Fake.Invokes(action, &operatorv1.InsightsOperatorList{}) return err } // Patch applies the patch and returns the patched insightsOperator. -func (c *FakeInsightsOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.InsightsOperator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, name, pt, data, subresources...), &v1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, name, pt, data, subresources...), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // Apply takes the given apply declarative configuration, applies it and returns the applied insightsOperator. -func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) { if insightsOperator == nil { return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *ope return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data), &v1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { +func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) { if insightsOperator == nil { return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperato return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data, "status"), &v1.InsightsOperator{}) + Invokes(testing.NewRootPatchSubresourceAction(insightsoperatorsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.InsightsOperator{}) if obj == nil { return nil, err } - return obj.(*v1.InsightsOperator), err + return obj.(*operatorv1.InsightsOperator), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go index d34add69bf..64be20d52b 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeKubeAPIServers struct { Fake *FakeOperatorV1 } -var kubeapiserversResource = v1.SchemeGroupVersion.WithResource("kubeapiservers") +var kubeapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubeapiservers"} -var kubeapiserversKind = v1.SchemeGroupVersion.WithKind("KubeAPIServer") +var kubeapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeAPIServer"} // Get takes name of the kubeAPIServer, and returns the corresponding kubeAPIServer object, and an error if there is any. -func (c *FakeKubeAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubeapiserversResource, name), &v1.KubeAPIServer{}) + Invokes(testing.NewRootGetAction(kubeapiserversResource, name), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // List takes label and field selectors, and returns the list of KubeAPIServers that match those selectors. -func (c *FakeKubeAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeAPIServerList, err error) { +func (c *FakeKubeAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubeapiserversResource, kubeapiserversKind, opts), &v1.KubeAPIServerList{}) + Invokes(testing.NewRootListAction(kubeapiserversResource, kubeapiserversKind, opts), &operatorv1.KubeAPIServerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeKubeAPIServers) List(ctx context.Context, opts metav1.ListOptions) if label == nil { label = labels.Everything() } - list := &v1.KubeAPIServerList{ListMeta: obj.(*v1.KubeAPIServerList).ListMeta} - for _, item := range obj.(*v1.KubeAPIServerList).Items { + list := &operatorv1.KubeAPIServerList{ListMeta: obj.(*operatorv1.KubeAPIServerList).ListMeta} + for _, item := range obj.(*operatorv1.KubeAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeKubeAPIServers) List(ctx context.Context, opts metav1.ListOptions) } // Watch returns a watch.Interface that watches the requested kubeAPIServers. -func (c *FakeKubeAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubeapiserversResource, opts)) } // Create takes the representation of a kubeAPIServer and creates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Create(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.CreateOptions) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Create(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.CreateOptions) (result *operatorv1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubeapiserversResource, kubeAPIServer), &v1.KubeAPIServer{}) + Invokes(testing.NewRootCreateAction(kubeapiserversResource, kubeAPIServer), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // Update takes the representation of a kubeAPIServer and updates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Update(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Update(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.UpdateOptions) (result *operatorv1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubeapiserversResource, kubeAPIServer), &v1.KubeAPIServer{}) + Invokes(testing.NewRootUpdateAction(kubeapiserversResource, kubeAPIServer), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeAPIServers) UpdateStatus(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (*v1.KubeAPIServer, error) { +func (c *FakeKubeAPIServers) UpdateStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts v1.UpdateOptions) (*operatorv1.KubeAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubeapiserversResource, "status", kubeAPIServer), &v1.KubeAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubeapiserversResource, "status", kubeAPIServer), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // Delete takes name of the kubeAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeKubeAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeKubeAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeapiserversResource, name, opts), &v1.KubeAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubeapiserversResource, name, opts), &operatorv1.KubeAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeKubeAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubeapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.KubeAPIServerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.KubeAPIServerList{}) return err } // Patch applies the patch and returns the patched kubeAPIServer. -func (c *FakeKubeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, name, pt, data, subresources...), &v1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, name, pt, data, subresources...), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeAPIServer. -func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) { if kubeAPIServer == nil { return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *operatorv return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data), &v1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { +func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) { if kubeAPIServer == nil { return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *ope return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.KubeAPIServer), err + return obj.(*operatorv1.KubeAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go index 072b82398c..c3d10b2247 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeKubeControllerManagers struct { Fake *FakeOperatorV1 } -var kubecontrollermanagersResource = v1.SchemeGroupVersion.WithResource("kubecontrollermanagers") +var kubecontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubecontrollermanagers"} -var kubecontrollermanagersKind = v1.SchemeGroupVersion.WithKind("KubeControllerManager") +var kubecontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeControllerManager"} // Get takes name of the kubeControllerManager, and returns the corresponding kubeControllerManager object, and an error if there is any. -func (c *FakeKubeControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubecontrollermanagersResource, name), &v1.KubeControllerManager{}) + Invokes(testing.NewRootGetAction(kubecontrollermanagersResource, name), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // List takes label and field selectors, and returns the list of KubeControllerManagers that match those selectors. -func (c *FakeKubeControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeControllerManagerList, err error) { +func (c *FakeKubeControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubecontrollermanagersResource, kubecontrollermanagersKind, opts), &v1.KubeControllerManagerList{}) + Invokes(testing.NewRootListAction(kubecontrollermanagersResource, kubecontrollermanagersKind, opts), &operatorv1.KubeControllerManagerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeKubeControllerManagers) List(ctx context.Context, opts metav1.ListO if label == nil { label = labels.Everything() } - list := &v1.KubeControllerManagerList{ListMeta: obj.(*v1.KubeControllerManagerList).ListMeta} - for _, item := range obj.(*v1.KubeControllerManagerList).Items { + list := &operatorv1.KubeControllerManagerList{ListMeta: obj.(*operatorv1.KubeControllerManagerList).ListMeta} + for _, item := range obj.(*operatorv1.KubeControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeKubeControllerManagers) List(ctx context.Context, opts metav1.ListO } // Watch returns a watch.Interface that watches the requested kubeControllerManagers. -func (c *FakeKubeControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubecontrollermanagersResource, opts)) } // Create takes the representation of a kubeControllerManager and creates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Create(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.CreateOptions) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Create(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.CreateOptions) (result *operatorv1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubecontrollermanagersResource, kubeControllerManager), &v1.KubeControllerManager{}) + Invokes(testing.NewRootCreateAction(kubecontrollermanagersResource, kubeControllerManager), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // Update takes the representation of a kubeControllerManager and updates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Update(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Update(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.UpdateOptions) (result *operatorv1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubecontrollermanagersResource, kubeControllerManager), &v1.KubeControllerManager{}) + Invokes(testing.NewRootUpdateAction(kubecontrollermanagersResource, kubeControllerManager), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeControllerManagers) UpdateStatus(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (*v1.KubeControllerManager, error) { +func (c *FakeKubeControllerManagers) UpdateStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts v1.UpdateOptions) (*operatorv1.KubeControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubecontrollermanagersResource, "status", kubeControllerManager), &v1.KubeControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubecontrollermanagersResource, "status", kubeControllerManager), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // Delete takes name of the kubeControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeKubeControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeKubeControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubecontrollermanagersResource, name, opts), &v1.KubeControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubecontrollermanagersResource, name, opts), &operatorv1.KubeControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeKubeControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubecontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.KubeControllerManagerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.KubeControllerManagerList{}) return err } // Patch applies the patch and returns the patched kubeControllerManager. -func (c *FakeKubeControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, name, pt, data, subresources...), &v1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, name, pt, data, subresources...), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeControllerManager. -func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) { if kubeControllerManager == nil { return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerMa return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { +func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) { if kubeControllerManager == nil { return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeContro return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.KubeControllerManager), err + return obj.(*operatorv1.KubeControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go index a98a8e0397..d8481f3512 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeKubeSchedulers struct { Fake *FakeOperatorV1 } -var kubeschedulersResource = v1.SchemeGroupVersion.WithResource("kubeschedulers") +var kubeschedulersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubeschedulers"} -var kubeschedulersKind = v1.SchemeGroupVersion.WithKind("KubeScheduler") +var kubeschedulersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeScheduler"} // Get takes name of the kubeScheduler, and returns the corresponding kubeScheduler object, and an error if there is any. -func (c *FakeKubeSchedulers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubeschedulersResource, name), &v1.KubeScheduler{}) + Invokes(testing.NewRootGetAction(kubeschedulersResource, name), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // List takes label and field selectors, and returns the list of KubeSchedulers that match those selectors. -func (c *FakeKubeSchedulers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeSchedulerList, err error) { +func (c *FakeKubeSchedulers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeSchedulerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubeschedulersResource, kubeschedulersKind, opts), &v1.KubeSchedulerList{}) + Invokes(testing.NewRootListAction(kubeschedulersResource, kubeschedulersKind, opts), &operatorv1.KubeSchedulerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeKubeSchedulers) List(ctx context.Context, opts metav1.ListOptions) if label == nil { label = labels.Everything() } - list := &v1.KubeSchedulerList{ListMeta: obj.(*v1.KubeSchedulerList).ListMeta} - for _, item := range obj.(*v1.KubeSchedulerList).Items { + list := &operatorv1.KubeSchedulerList{ListMeta: obj.(*operatorv1.KubeSchedulerList).ListMeta} + for _, item := range obj.(*operatorv1.KubeSchedulerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeKubeSchedulers) List(ctx context.Context, opts metav1.ListOptions) } // Watch returns a watch.Interface that watches the requested kubeSchedulers. -func (c *FakeKubeSchedulers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeSchedulers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubeschedulersResource, opts)) } // Create takes the representation of a kubeScheduler and creates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Create(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.CreateOptions) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Create(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.CreateOptions) (result *operatorv1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubeschedulersResource, kubeScheduler), &v1.KubeScheduler{}) + Invokes(testing.NewRootCreateAction(kubeschedulersResource, kubeScheduler), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // Update takes the representation of a kubeScheduler and updates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Update(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Update(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.UpdateOptions) (result *operatorv1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubeschedulersResource, kubeScheduler), &v1.KubeScheduler{}) + Invokes(testing.NewRootUpdateAction(kubeschedulersResource, kubeScheduler), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeSchedulers) UpdateStatus(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (*v1.KubeScheduler, error) { +func (c *FakeKubeSchedulers) UpdateStatus(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts v1.UpdateOptions) (*operatorv1.KubeScheduler, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubeschedulersResource, "status", kubeScheduler), &v1.KubeScheduler{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubeschedulersResource, "status", kubeScheduler), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // Delete takes name of the kubeScheduler and deletes it. Returns an error if one occurs. -func (c *FakeKubeSchedulers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeKubeSchedulers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeschedulersResource, name, opts), &v1.KubeScheduler{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubeschedulersResource, name, opts), &operatorv1.KubeScheduler{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeSchedulers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeKubeSchedulers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubeschedulersResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.KubeSchedulerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.KubeSchedulerList{}) return err } // Patch applies the patch and returns the patched kubeScheduler. -func (c *FakeKubeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeScheduler, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, name, pt, data, subresources...), &v1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, name, pt, data, subresources...), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeScheduler. -func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) { if kubeScheduler == nil { return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *operatorv return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data), &v1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { +func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) { if kubeScheduler == nil { return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *ope return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeScheduler{}) + Invokes(testing.NewRootPatchSubresourceAction(kubeschedulersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeScheduler{}) if obj == nil { return nil, err } - return obj.(*v1.KubeScheduler), err + return obj.(*operatorv1.KubeScheduler), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go index 7ffed25f82..625e34659f 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeKubeStorageVersionMigrators struct { Fake *FakeOperatorV1 } -var kubestorageversionmigratorsResource = v1.SchemeGroupVersion.WithResource("kubestorageversionmigrators") +var kubestorageversionmigratorsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "kubestorageversionmigrators"} -var kubestorageversionmigratorsKind = v1.SchemeGroupVersion.WithKind("KubeStorageVersionMigrator") +var kubestorageversionmigratorsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "KubeStorageVersionMigrator"} // Get takes name of the kubeStorageVersionMigrator, and returns the corresponding kubeStorageVersionMigrator object, and an error if there is any. -func (c *FakeKubeStorageVersionMigrators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(kubestorageversionmigratorsResource, name), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootGetAction(kubestorageversionmigratorsResource, name), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // List takes label and field selectors, and returns the list of KubeStorageVersionMigrators that match those selectors. -func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeStorageVersionMigratorList, err error) { +func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KubeStorageVersionMigratorList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(kubestorageversionmigratorsResource, kubestorageversionmigratorsKind, opts), &v1.KubeStorageVersionMigratorList{}) + Invokes(testing.NewRootListAction(kubestorageversionmigratorsResource, kubestorageversionmigratorsKind, opts), &operatorv1.KubeStorageVersionMigratorList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts metav1. if label == nil { label = labels.Everything() } - list := &v1.KubeStorageVersionMigratorList{ListMeta: obj.(*v1.KubeStorageVersionMigratorList).ListMeta} - for _, item := range obj.(*v1.KubeStorageVersionMigratorList).Items { + list := &operatorv1.KubeStorageVersionMigratorList{ListMeta: obj.(*operatorv1.KubeStorageVersionMigratorList).ListMeta} + for _, item := range obj.(*operatorv1.KubeStorageVersionMigratorList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts metav1. } // Watch returns a watch.Interface that watches the requested kubeStorageVersionMigrators. -func (c *FakeKubeStorageVersionMigrators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeKubeStorageVersionMigrators) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(kubestorageversionmigratorsResource, opts)) } // Create takes the representation of a kubeStorageVersionMigrator and creates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Create(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.CreateOptions) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Create(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.CreateOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootCreateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // Update takes the representation of a kubeStorageVersionMigrator and updates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Update(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Update(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.UpdateOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootUpdateAction(kubestorageversionmigratorsResource, kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeStorageVersionMigrators) UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*v1.KubeStorageVersionMigrator, error) { +func (c *FakeKubeStorageVersionMigrators) UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts v1.UpdateOptions) (*operatorv1.KubeStorageVersionMigrator, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(kubestorageversionmigratorsResource, "status", kubeStorageVersionMigrator), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootUpdateSubresourceAction(kubestorageversionmigratorsResource, "status", kubeStorageVersionMigrator), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // Delete takes name of the kubeStorageVersionMigrator and deletes it. Returns an error if one occurs. -func (c *FakeKubeStorageVersionMigrators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeKubeStorageVersionMigrators) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubestorageversionmigratorsResource, name, opts), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootDeleteActionWithOptions(kubestorageversionmigratorsResource, name, opts), &operatorv1.KubeStorageVersionMigrator{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeKubeStorageVersionMigrators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeKubeStorageVersionMigrators) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(kubestorageversionmigratorsResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.KubeStorageVersionMigratorList{}) + _, err := c.Fake.Invokes(action, &operatorv1.KubeStorageVersionMigratorList{}) return err } // Patch applies the patch and returns the patched kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.KubeStorageVersionMigrator, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, name, pt, data, subresources...), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, name, pt, data, subresources...), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // Apply takes the given apply declarative configuration, applies it and returns the applied kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { if kubeStorageVersionMigrator == nil { return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorage return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { +func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) { if kubeStorageVersionMigrator == nil { return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeS return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, "status"), &v1.KubeStorageVersionMigrator{}) + Invokes(testing.NewRootPatchSubresourceAction(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.KubeStorageVersionMigrator{}) if obj == nil { return nil, err } - return obj.(*v1.KubeStorageVersionMigrator), err + return obj.(*operatorv1.KubeStorageVersionMigrator), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go index a8dc72b78b..f0731bdcc8 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeNetworks struct { Fake *FakeOperatorV1 } -var networksResource = v1.SchemeGroupVersion.WithResource("networks") +var networksResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "networks"} -var networksKind = v1.SchemeGroupVersion.WithKind("Network") +var networksKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Network"} // Get takes name of the network, and returns the corresponding network object, and an error if there is any. -func (c *FakeNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Network, err error) { +func (c *FakeNetworks) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(networksResource, name), &v1.Network{}) + Invokes(testing.NewRootGetAction(networksResource, name), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // List takes label and field selectors, and returns the list of Networks that match those selectors. -func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkList, err error) { +func (c *FakeNetworks) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.NetworkList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(networksResource, networksKind, opts), &v1.NetworkList{}) + Invokes(testing.NewRootListAction(networksResource, networksKind, opts), &operatorv1.NetworkList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (resul if label == nil { label = labels.Everything() } - list := &v1.NetworkList{ListMeta: obj.(*v1.NetworkList).ListMeta} - for _, item := range obj.(*v1.NetworkList).Items { + list := &operatorv1.NetworkList{ListMeta: obj.(*operatorv1.NetworkList).ListMeta} + for _, item := range obj.(*operatorv1.NetworkList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (resul } // Watch returns a watch.Interface that watches the requested networks. -func (c *FakeNetworks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeNetworks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(networksResource, opts)) } // Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (result *v1.Network, err error) { +func (c *FakeNetworks) Create(ctx context.Context, network *operatorv1.Network, opts v1.CreateOptions) (result *operatorv1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(networksResource, network), &v1.Network{}) + Invokes(testing.NewRootCreateAction(networksResource, network), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { +func (c *FakeNetworks) Update(ctx context.Context, network *operatorv1.Network, opts v1.UpdateOptions) (result *operatorv1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(networksResource, network), &v1.Network{}) + Invokes(testing.NewRootUpdateAction(networksResource, network), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) { +func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *operatorv1.Network, opts v1.UpdateOptions) (*operatorv1.Network, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(networksResource, "status", network), &v1.Network{}) + Invokes(testing.NewRootUpdateSubresourceAction(networksResource, "status", network), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // Delete takes name of the network and deletes it. Returns an error if one occurs. -func (c *FakeNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeNetworks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &v1.Network{}) + Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &operatorv1.Network{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(networksResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.NetworkList{}) + _, err := c.Fake.Invokes(action, &operatorv1.NetworkList{}) return err } // Patch applies the patch and returns the patched network. -func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) { +func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Network, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, name, pt, data, subresources...), &v1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, name, pt, data, subresources...), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // Apply takes the given apply declarative configuration, applies it and returns the applied network. -func (c *FakeNetworks) Apply(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { +func (c *FakeNetworks) Apply(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Network, err error) { if network == nil { return nil, fmt.Errorf("network provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeNetworks) Apply(ctx context.Context, network *operatorv1.NetworkApp return nil, fmt.Errorf("network.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data), &v1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { +func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Network, err error) { if network == nil { return nil, fmt.Errorf("network provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *operatorv1.Netw return nil, fmt.Errorf("network.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data, "status"), &v1.Network{}) + Invokes(testing.NewRootPatchSubresourceAction(networksResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Network{}) if obj == nil { return nil, err } - return obj.(*v1.Network), err + return obj.(*operatorv1.Network), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go index 0e26df3f90..65c392e1bd 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeOpenShiftAPIServers struct { Fake *FakeOperatorV1 } -var openshiftapiserversResource = v1.SchemeGroupVersion.WithResource("openshiftapiservers") +var openshiftapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "openshiftapiservers"} -var openshiftapiserversKind = v1.SchemeGroupVersion.WithKind("OpenShiftAPIServer") +var openshiftapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "OpenShiftAPIServer"} // Get takes name of the openShiftAPIServer, and returns the corresponding openShiftAPIServer object, and an error if there is any. -func (c *FakeOpenShiftAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(openshiftapiserversResource, name), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootGetAction(openshiftapiserversResource, name), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // List takes label and field selectors, and returns the list of OpenShiftAPIServers that match those selectors. -func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftAPIServerList, err error) { +func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.OpenShiftAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(openshiftapiserversResource, openshiftapiserversKind, opts), &v1.OpenShiftAPIServerList{}) + Invokes(testing.NewRootListAction(openshiftapiserversResource, openshiftapiserversKind, opts), &operatorv1.OpenShiftAPIServerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts metav1.ListOpti if label == nil { label = labels.Everything() } - list := &v1.OpenShiftAPIServerList{ListMeta: obj.(*v1.OpenShiftAPIServerList).ListMeta} - for _, item := range obj.(*v1.OpenShiftAPIServerList).Items { + list := &operatorv1.OpenShiftAPIServerList{ListMeta: obj.(*operatorv1.OpenShiftAPIServerList).ListMeta} + for _, item := range obj.(*operatorv1.OpenShiftAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts metav1.ListOpti } // Watch returns a watch.Interface that watches the requested openShiftAPIServers. -func (c *FakeOpenShiftAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeOpenShiftAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(openshiftapiserversResource, opts)) } // Create takes the representation of a openShiftAPIServer and creates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Create(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.CreateOptions) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Create(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.CreateOptions) (result *operatorv1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(openshiftapiserversResource, openShiftAPIServer), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootCreateAction(openshiftapiserversResource, openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // Update takes the representation of a openShiftAPIServer and updates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Update(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Update(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.UpdateOptions) (result *operatorv1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(openshiftapiserversResource, openShiftAPIServer), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootUpdateAction(openshiftapiserversResource, openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftAPIServers) UpdateStatus(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*v1.OpenShiftAPIServer, error) { +func (c *FakeOpenShiftAPIServers) UpdateStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts v1.UpdateOptions) (*operatorv1.OpenShiftAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(openshiftapiserversResource, "status", openShiftAPIServer), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(openshiftapiserversResource, "status", openShiftAPIServer), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // Delete takes name of the openShiftAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeOpenShiftAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftapiserversResource, name, opts), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(openshiftapiserversResource, name, opts), &operatorv1.OpenShiftAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeOpenShiftAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(openshiftapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.OpenShiftAPIServerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.OpenShiftAPIServerList{}) return err } // Patch applies the patch and returns the patched openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, name, pt, data, subresources...), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, name, pt, data, subresources...), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) { if openShiftAPIServer == nil { return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { +func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) { if openShiftAPIServer == nil { return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIS return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.OpenShiftAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.OpenShiftAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftAPIServer), err + return obj.(*operatorv1.OpenShiftAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go index f8b7a9317b..3f1ee748e4 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeOpenShiftControllerManagers struct { Fake *FakeOperatorV1 } -var openshiftcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("openshiftcontrollermanagers") +var openshiftcontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "openshiftcontrollermanagers"} -var openshiftcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("OpenShiftControllerManager") +var openshiftcontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "OpenShiftControllerManager"} // Get takes name of the openShiftControllerManager, and returns the corresponding openShiftControllerManager object, and an error if there is any. -func (c *FakeOpenShiftControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(openshiftcontrollermanagersResource, name), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootGetAction(openshiftcontrollermanagersResource, name), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // List takes label and field selectors, and returns the list of OpenShiftControllerManagers that match those selectors. -func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftControllerManagerList, err error) { +func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.OpenShiftControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(openshiftcontrollermanagersResource, openshiftcontrollermanagersKind, opts), &v1.OpenShiftControllerManagerList{}) + Invokes(testing.NewRootListAction(openshiftcontrollermanagersResource, openshiftcontrollermanagersKind, opts), &operatorv1.OpenShiftControllerManagerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts metav1. if label == nil { label = labels.Everything() } - list := &v1.OpenShiftControllerManagerList{ListMeta: obj.(*v1.OpenShiftControllerManagerList).ListMeta} - for _, item := range obj.(*v1.OpenShiftControllerManagerList).Items { + list := &operatorv1.OpenShiftControllerManagerList{ListMeta: obj.(*operatorv1.OpenShiftControllerManagerList).ListMeta} + for _, item := range obj.(*operatorv1.OpenShiftControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts metav1. } // Watch returns a watch.Interface that watches the requested openShiftControllerManagers. -func (c *FakeOpenShiftControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeOpenShiftControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(openshiftcontrollermanagersResource, opts)) } // Create takes the representation of a openShiftControllerManager and creates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Create(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.CreateOptions) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Create(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.CreateOptions) (result *operatorv1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootCreateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // Update takes the representation of a openShiftControllerManager and updates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Update(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Update(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.UpdateOptions) (result *operatorv1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootUpdateAction(openshiftcontrollermanagersResource, openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftControllerManagers) UpdateStatus(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*v1.OpenShiftControllerManager, error) { +func (c *FakeOpenShiftControllerManagers) UpdateStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts v1.UpdateOptions) (*operatorv1.OpenShiftControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(openshiftcontrollermanagersResource, "status", openShiftControllerManager), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(openshiftcontrollermanagersResource, "status", openShiftControllerManager), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // Delete takes name of the openShiftControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeOpenShiftControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftcontrollermanagersResource, name, opts), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(openshiftcontrollermanagersResource, name, opts), &operatorv1.OpenShiftControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeOpenShiftControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(openshiftcontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.OpenShiftControllerManagerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.OpenShiftControllerManagerList{}) return err } // Patch applies the patch and returns the patched openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, name, pt, data, subresources...), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, name, pt, data, subresources...), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) { if openShiftControllerManager == nil { return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftCo return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { +func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) { if openShiftControllerManager == nil { return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openS return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.OpenShiftControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.OpenShiftControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.OpenShiftControllerManager), err + return obj.(*operatorv1.OpenShiftControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go index 0d0cb6bcd8..f587d8b72a 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeServiceCAs struct { Fake *FakeOperatorV1 } -var servicecasResource = v1.SchemeGroupVersion.WithResource("servicecas") +var servicecasResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecas"} -var servicecasKind = v1.SchemeGroupVersion.WithKind("ServiceCA") +var servicecasKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCA"} // Get takes name of the serviceCA, and returns the corresponding serviceCA object, and an error if there is any. -func (c *FakeServiceCAs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecasResource, name), &v1.ServiceCA{}) + Invokes(testing.NewRootGetAction(servicecasResource, name), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // List takes label and field selectors, and returns the list of ServiceCAs that match those selectors. -func (c *FakeServiceCAs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCAList, err error) { +func (c *FakeServiceCAs) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCAList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecasResource, servicecasKind, opts), &v1.ServiceCAList{}) + Invokes(testing.NewRootListAction(servicecasResource, servicecasKind, opts), &operatorv1.ServiceCAList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeServiceCAs) List(ctx context.Context, opts metav1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &v1.ServiceCAList{ListMeta: obj.(*v1.ServiceCAList).ListMeta} - for _, item := range obj.(*v1.ServiceCAList).Items { + list := &operatorv1.ServiceCAList{ListMeta: obj.(*operatorv1.ServiceCAList).ListMeta} + for _, item := range obj.(*operatorv1.ServiceCAList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeServiceCAs) List(ctx context.Context, opts metav1.ListOptions) (res } // Watch returns a watch.Interface that watches the requested serviceCAs. -func (c *FakeServiceCAs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCAs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecasResource, opts)) } // Create takes the representation of a serviceCA and creates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Create(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.CreateOptions) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) Create(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.CreateOptions) (result *operatorv1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecasResource, serviceCA), &v1.ServiceCA{}) + Invokes(testing.NewRootCreateAction(servicecasResource, serviceCA), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // Update takes the representation of a serviceCA and updates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Update(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) Update(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.UpdateOptions) (result *operatorv1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecasResource, serviceCA), &v1.ServiceCA{}) + Invokes(testing.NewRootUpdateAction(servicecasResource, serviceCA), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCAs) UpdateStatus(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (*v1.ServiceCA, error) { +func (c *FakeServiceCAs) UpdateStatus(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts v1.UpdateOptions) (*operatorv1.ServiceCA, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecasResource, "status", serviceCA), &v1.ServiceCA{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecasResource, "status", serviceCA), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // Delete takes name of the serviceCA and deletes it. Returns an error if one occurs. -func (c *FakeServiceCAs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeServiceCAs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecasResource, name, opts), &v1.ServiceCA{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecasResource, name, opts), &operatorv1.ServiceCA{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCAs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeServiceCAs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecasResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ServiceCAList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ServiceCAList{}) return err } // Patch applies the patch and returns the patched serviceCA. -func (c *FakeServiceCAs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCA, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, name, pt, data, subresources...), &v1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, name, pt, data, subresources...), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCA. -func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCA, err error) { if serviceCA == nil { return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *operatorv1.Servic return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data), &v1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { +func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCA, err error) { if serviceCA == nil { return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *operatorv1. return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCA{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecasResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCA{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCA), err + return obj.(*operatorv1.ServiceCA), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go index 66ec551a3a..7d6f0eff11 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeServiceCatalogAPIServers struct { Fake *FakeOperatorV1 } -var servicecatalogapiserversResource = v1.SchemeGroupVersion.WithResource("servicecatalogapiservers") +var servicecatalogapiserversResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecatalogapiservers"} -var servicecatalogapiserversKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogAPIServer") +var servicecatalogapiserversKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCatalogAPIServer"} // Get takes name of the serviceCatalogAPIServer, and returns the corresponding serviceCatalogAPIServer object, and an error if there is any. -func (c *FakeServiceCatalogAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecatalogapiserversResource, name), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootGetAction(servicecatalogapiserversResource, name), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // List takes label and field selectors, and returns the list of ServiceCatalogAPIServers that match those selectors. -func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogAPIServerList, err error) { +func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCatalogAPIServerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecatalogapiserversResource, servicecatalogapiserversKind, opts), &v1.ServiceCatalogAPIServerList{}) + Invokes(testing.NewRootListAction(servicecatalogapiserversResource, servicecatalogapiserversKind, opts), &operatorv1.ServiceCatalogAPIServerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts metav1.Lis if label == nil { label = labels.Everything() } - list := &v1.ServiceCatalogAPIServerList{ListMeta: obj.(*v1.ServiceCatalogAPIServerList).ListMeta} - for _, item := range obj.(*v1.ServiceCatalogAPIServerList).Items { + list := &operatorv1.ServiceCatalogAPIServerList{ListMeta: obj.(*operatorv1.ServiceCatalogAPIServerList).ListMeta} + for _, item := range obj.(*operatorv1.ServiceCatalogAPIServerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts metav1.Lis } // Watch returns a watch.Interface that watches the requested serviceCatalogAPIServers. -func (c *FakeServiceCatalogAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCatalogAPIServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecatalogapiserversResource, opts)) } // Create takes the representation of a serviceCatalogAPIServer and creates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Create(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.CreateOptions) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Create(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.CreateOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootCreateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // Update takes the representation of a serviceCatalogAPIServer and updates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Update(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Update(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.UpdateOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootUpdateAction(servicecatalogapiserversResource, serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogAPIServers) UpdateStatus(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*v1.ServiceCatalogAPIServer, error) { +func (c *FakeServiceCatalogAPIServers) UpdateStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts v1.UpdateOptions) (*operatorv1.ServiceCatalogAPIServer, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogapiserversResource, "status", serviceCatalogAPIServer), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogapiserversResource, "status", serviceCatalogAPIServer), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // Delete takes name of the serviceCatalogAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeServiceCatalogAPIServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogapiserversResource, name, opts), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogapiserversResource, name, opts), &operatorv1.ServiceCatalogAPIServer{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeServiceCatalogAPIServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecatalogapiserversResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ServiceCatalogAPIServerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ServiceCatalogAPIServerList{}) return err } // Patch applies the patch and returns the patched serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogAPIServer, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, name, pt, data, subresources...), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, name, pt, data, subresources...), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { if serviceCatalogAPIServer == nil { return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalog return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { +func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) { if serviceCatalogAPIServer == nil { return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceC return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCatalogAPIServer{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCatalogAPIServer{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogAPIServer), err + return obj.(*operatorv1.ServiceCatalogAPIServer), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go index 82b7d62ac3..cc383a4399 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeServiceCatalogControllerManagers struct { Fake *FakeOperatorV1 } -var servicecatalogcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers") +var servicecatalogcontrollermanagersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "servicecatalogcontrollermanagers"} -var servicecatalogcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogControllerManager") +var servicecatalogcontrollermanagersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "ServiceCatalogControllerManager"} // Get takes name of the serviceCatalogControllerManager, and returns the corresponding serviceCatalogControllerManager object, and an error if there is any. -func (c *FakeServiceCatalogControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(servicecatalogcontrollermanagersResource, name), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootGetAction(servicecatalogcontrollermanagersResource, name), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // List takes label and field selectors, and returns the list of ServiceCatalogControllerManagers that match those selectors. -func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogControllerManagerList, err error) { +func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ServiceCatalogControllerManagerList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(servicecatalogcontrollermanagersResource, servicecatalogcontrollermanagersKind, opts), &v1.ServiceCatalogControllerManagerList{}) + Invokes(testing.NewRootListAction(servicecatalogcontrollermanagersResource, servicecatalogcontrollermanagersKind, opts), &operatorv1.ServiceCatalogControllerManagerList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts me if label == nil { label = labels.Everything() } - list := &v1.ServiceCatalogControllerManagerList{ListMeta: obj.(*v1.ServiceCatalogControllerManagerList).ListMeta} - for _, item := range obj.(*v1.ServiceCatalogControllerManagerList).Items { + list := &operatorv1.ServiceCatalogControllerManagerList{ListMeta: obj.(*operatorv1.ServiceCatalogControllerManagerList).ListMeta} + for _, item := range obj.(*operatorv1.ServiceCatalogControllerManagerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts me } // Watch returns a watch.Interface that watches the requested serviceCatalogControllerManagers. -func (c *FakeServiceCatalogControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeServiceCatalogControllerManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(servicecatalogcontrollermanagersResource, opts)) } // Create takes the representation of a serviceCatalogControllerManager and creates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Create(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.CreateOptions) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Create(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.CreateOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootCreateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // Update takes the representation of a serviceCatalogControllerManager and updates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Update(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Update(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.UpdateOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootUpdateAction(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogControllerManagers) UpdateStatus(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*v1.ServiceCatalogControllerManager, error) { +func (c *FakeServiceCatalogControllerManagers) UpdateStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts v1.UpdateOptions) (*operatorv1.ServiceCatalogControllerManager, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogcontrollermanagersResource, "status", serviceCatalogControllerManager), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootUpdateSubresourceAction(servicecatalogcontrollermanagersResource, "status", serviceCatalogControllerManager), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // Delete takes name of the serviceCatalogControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeServiceCatalogControllerManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogcontrollermanagersResource, name, opts), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogcontrollermanagersResource, name, opts), &operatorv1.ServiceCatalogControllerManager{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeServiceCatalogControllerManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(servicecatalogcontrollermanagersResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.ServiceCatalogControllerManagerList{}) + _, err := c.Fake.Invokes(action, &operatorv1.ServiceCatalogControllerManagerList{}) return err } // Patch applies the patch and returns the patched serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogControllerManager, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, name, pt, data, subresources...), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, name, pt, data, subresources...), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { if serviceCatalogControllerManager == nil { return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, servic return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { +func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) { if serviceCatalogControllerManager == nil { return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &v1.ServiceCatalogControllerManager{}) + Invokes(testing.NewRootPatchSubresourceAction(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.ServiceCatalogControllerManager{}) if obj == nil { return nil, err } - return obj.(*v1.ServiceCatalogControllerManager), err + return obj.(*operatorv1.ServiceCatalogControllerManager), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go index 2476a30b5d..9cc8d784db 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go @@ -7,10 +7,11 @@ import ( json "encoding/json" "fmt" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,24 +22,24 @@ type FakeStorages struct { Fake *FakeOperatorV1 } -var storagesResource = v1.SchemeGroupVersion.WithResource("storages") +var storagesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "storages"} -var storagesKind = v1.SchemeGroupVersion.WithKind("Storage") +var storagesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Storage"} // Get takes name of the storage, and returns the corresponding storage object, and an error if there is any. -func (c *FakeStorages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Storage, err error) { +func (c *FakeStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(storagesResource, name), &v1.Storage{}) + Invokes(testing.NewRootGetAction(storagesResource, name), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // List takes label and field selectors, and returns the list of Storages that match those selectors. -func (c *FakeStorages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageList, err error) { +func (c *FakeStorages) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.StorageList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(storagesResource, storagesKind, opts), &v1.StorageList{}) + Invokes(testing.NewRootListAction(storagesResource, storagesKind, opts), &operatorv1.StorageList{}) if obj == nil { return nil, err } @@ -47,8 +48,8 @@ func (c *FakeStorages) List(ctx context.Context, opts metav1.ListOptions) (resul if label == nil { label = labels.Everything() } - list := &v1.StorageList{ListMeta: obj.(*v1.StorageList).ListMeta} - for _, item := range obj.(*v1.StorageList).Items { + list := &operatorv1.StorageList{ListMeta: obj.(*operatorv1.StorageList).ListMeta} + for _, item := range obj.(*operatorv1.StorageList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -57,69 +58,69 @@ func (c *FakeStorages) List(ctx context.Context, opts metav1.ListOptions) (resul } // Watch returns a watch.Interface that watches the requested storages. -func (c *FakeStorages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { +func (c *FakeStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewRootWatchAction(storagesResource, opts)) } // Create takes the representation of a storage and creates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Create(ctx context.Context, storage *v1.Storage, opts metav1.CreateOptions) (result *v1.Storage, err error) { +func (c *FakeStorages) Create(ctx context.Context, storage *operatorv1.Storage, opts v1.CreateOptions) (result *operatorv1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(storagesResource, storage), &v1.Storage{}) + Invokes(testing.NewRootCreateAction(storagesResource, storage), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // Update takes the representation of a storage and updates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Update(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (result *v1.Storage, err error) { +func (c *FakeStorages) Update(ctx context.Context, storage *operatorv1.Storage, opts v1.UpdateOptions) (result *operatorv1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(storagesResource, storage), &v1.Storage{}) + Invokes(testing.NewRootUpdateAction(storagesResource, storage), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStorages) UpdateStatus(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (*v1.Storage, error) { +func (c *FakeStorages) UpdateStatus(ctx context.Context, storage *operatorv1.Storage, opts v1.UpdateOptions) (*operatorv1.Storage, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(storagesResource, "status", storage), &v1.Storage{}) + Invokes(testing.NewRootUpdateSubresourceAction(storagesResource, "status", storage), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // Delete takes name of the storage and deletes it. Returns an error if one occurs. -func (c *FakeStorages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { +func (c *FakeStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(storagesResource, name, opts), &v1.Storage{}) + Invokes(testing.NewRootDeleteActionWithOptions(storagesResource, name, opts), &operatorv1.Storage{}) return err } // DeleteCollection deletes a collection of objects. -func (c *FakeStorages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { +func (c *FakeStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(storagesResource, listOpts) - _, err := c.Fake.Invokes(action, &v1.StorageList{}) + _, err := c.Fake.Invokes(action, &operatorv1.StorageList{}) return err } // Patch applies the patch and returns the patched storage. -func (c *FakeStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Storage, err error) { +func (c *FakeStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Storage, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, name, pt, data, subresources...), &v1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, name, pt, data, subresources...), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // Apply takes the given apply declarative configuration, applies it and returns the applied storage. -func (c *FakeStorages) Apply(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { +func (c *FakeStorages) Apply(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Storage, err error) { if storage == nil { return nil, fmt.Errorf("storage provided to Apply must not be nil") } @@ -132,16 +133,16 @@ func (c *FakeStorages) Apply(ctx context.Context, storage *operatorv1.StorageApp return nil, fmt.Errorf("storage.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data), &v1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { +func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1.Storage, err error) { if storage == nil { return nil, fmt.Errorf("storage provided to Apply must not be nil") } @@ -154,9 +155,9 @@ func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *operatorv1.Stor return nil, fmt.Errorf("storage.Name must be provided to Apply") } obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data, "status"), &v1.Storage{}) + Invokes(testing.NewRootPatchSubresourceAction(storagesResource, *name, types.ApplyPatchType, data, "status"), &operatorv1.Storage{}) if obj == nil { return nil, err } - return obj.(*v1.Storage), err + return obj.(*operatorv1.Storage), err } diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go index b34784efe3..5790e27415 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go @@ -11,6 +11,7 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,9 +22,9 @@ type FakeEtcdBackups struct { Fake *FakeOperatorV1alpha1 } -var etcdbackupsResource = v1alpha1.SchemeGroupVersion.WithResource("etcdbackups") +var etcdbackupsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "etcdbackups"} -var etcdbackupsKind = v1alpha1.SchemeGroupVersion.WithKind("EtcdBackup") +var etcdbackupsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "EtcdBackup"} // Get takes name of the etcdBackup, and returns the corresponding etcdBackup object, and an error if there is any. func (c *FakeEtcdBackups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EtcdBackup, err error) { diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go index a3f5fd4c09..859f7b38cc 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go @@ -11,6 +11,7 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,9 +22,9 @@ type FakeImageContentSourcePolicies struct { Fake *FakeOperatorV1alpha1 } -var imagecontentsourcepoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies") +var imagecontentsourcepoliciesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "imagecontentsourcepolicies"} -var imagecontentsourcepoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("ImageContentSourcePolicy") +var imagecontentsourcepoliciesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "ImageContentSourcePolicy"} // Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. func (c *FakeImageContentSourcePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { diff --git a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go index ac07845d9d..e584693314 100644 --- a/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go +++ b/vendor/github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go @@ -11,6 +11,7 @@ import ( operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -21,9 +22,9 @@ type FakeOLMs struct { Fake *FakeOperatorV1alpha1 } -var olmsResource = v1alpha1.SchemeGroupVersion.WithResource("olms") +var olmsResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "olms"} -var olmsKind = v1alpha1.SchemeGroupVersion.WithKind("OLM") +var olmsKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "OLM"} // Get takes name of the oLM, and returns the corresponding oLM object, and an error if there is any. func (c *FakeOLMs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OLM, err error) { diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go index 32ae7738d1..4079e433d8 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/api/v1beta2/defaults.go @@ -18,6 +18,8 @@ package v1beta2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + clusterv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3" ) // SetDefaults_Bastion is used by defaulter-gen. @@ -74,7 +76,7 @@ func SetDefaults_Labels(obj *metav1.ObjectMeta) { //nolint:golint,stylecheck // Defaults to set label if no labels have been set if obj.Labels == nil { obj.Labels = map[string]string{ - "dontcare": ""} + clusterv1.ClusterctlMoveHierarchyLabelName: ""} } } diff --git a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go index f7f4ae1f32..c78842780d 100644 --- a/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api-provider-aws/v2/exp/api/v1beta2/awsfargateprofile_webhook.go @@ -28,6 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/cluster-api-provider-aws/v2/pkg/eks" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" ) const ( @@ -53,7 +54,7 @@ func (r *AWSFargateProfile) Default() { if r.Labels == nil { r.Labels = make(map[string]string) } - r.Labels["dontcare"] = r.Spec.ClusterName + r.Labels[clusterv1.ClusterLabelName] = r.Spec.ClusterName if r.Spec.ProfileName == "" { name, err := eks.GenerateEKSName(r.Name, r.Namespace, maxProfileNameLength) diff --git a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machine_webhook.go b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machine_webhook.go index 4a21872eaa..6aa9b5f25b 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machine_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machine_webhook.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api/util/version" ) @@ -71,22 +72,22 @@ func (m *Machine) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *Machine) ValidateCreate() error { - return m.validate(nil) +func (m *Machine) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *Machine) ValidateUpdate(old runtime.Object) error { +func (m *Machine) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldM, ok := old.(*Machine) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a Machine but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a Machine but got a %T", old)) } - return m.validate(oldM) + return nil, m.validate(oldM) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *Machine) ValidateDelete() error { - return nil +func (m *Machine) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (m *Machine) validate(old *Machine) error { diff --git a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinedeployment_webhook.go b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinedeployment_webhook.go index 77e6dcaf38..472c01afd5 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinedeployment_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinedeployment_webhook.go @@ -165,22 +165,22 @@ func (webhook *machineDeploymentDefaulter) Default(ctx context.Context, obj runt } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineDeployment) ValidateCreate() error { - return m.validate(nil) +func (m *MachineDeployment) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineDeployment) ValidateUpdate(old runtime.Object) error { +func (m *MachineDeployment) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldMD, ok := old.(*MachineDeployment) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a MachineDeployment but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachineDeployment but got a %T", old)) } - return m.validate(oldMD) + return nil, m.validate(oldMD) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineDeployment) ValidateDelete() error { - return nil +func (m *MachineDeployment) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (m *MachineDeployment) validate(old *MachineDeployment) error { diff --git a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinehealthcheck_webhook.go b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinehealthcheck_webhook.go index d50510eaa2..44c596feb5 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinehealthcheck_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machinehealthcheck_webhook.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) var ( @@ -84,22 +85,22 @@ func (m *MachineHealthCheck) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineHealthCheck) ValidateCreate() error { - return m.validate(nil) +func (m *MachineHealthCheck) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineHealthCheck) ValidateUpdate(old runtime.Object) error { +func (m *MachineHealthCheck) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { mhc, ok := old.(*MachineHealthCheck) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a MachineHealthCheck but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachineHealthCheck but got a %T", old)) } - return m.validate(mhc) + return nil, m.validate(mhc) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineHealthCheck) ValidateDelete() error { - return nil +func (m *MachineHealthCheck) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (m *MachineHealthCheck) validate(old *MachineHealthCheck) error { diff --git a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machineset_webhook.go b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machineset_webhook.go index ee4a50d373..a800efbab8 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machineset_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/api/v1beta1/machineset_webhook.go @@ -29,6 +29,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api/feature" capilabels "sigs.k8s.io/cluster-api/internal/labels" @@ -80,22 +81,22 @@ func (m *MachineSet) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineSet) ValidateCreate() error { - return m.validate(nil) +func (m *MachineSet) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineSet) ValidateUpdate(old runtime.Object) error { +func (m *MachineSet) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldMS, ok := old.(*MachineSet) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a MachineSet but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachineSet but got a %T", old)) } - return m.validate(oldMS) + return nil, m.validate(oldMS) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *MachineSet) ValidateDelete() error { - return nil +func (m *MachineSet) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (m *MachineSet) validate(old *MachineSet) error { diff --git a/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourceset_webhook.go b/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourceset_webhook.go index 35ad6c661f..61f8f6dc5c 100644 --- a/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourceset_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourceset_webhook.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api/feature" ) @@ -51,22 +52,22 @@ func (m *ClusterResourceSet) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *ClusterResourceSet) ValidateCreate() error { - return m.validate(nil) +func (m *ClusterResourceSet) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *ClusterResourceSet) ValidateUpdate(old runtime.Object) error { +func (m *ClusterResourceSet) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldCRS, ok := old.(*ClusterResourceSet) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a ClusterResourceSet but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a ClusterResourceSet but got a %T", old)) } - return m.validate(oldCRS) + return nil, m.validate(oldCRS) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *ClusterResourceSet) ValidateDelete() error { - return nil +func (m *ClusterResourceSet) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (m *ClusterResourceSet) validate(old *ClusterResourceSet) error { diff --git a/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourcesetbinding_webhook.go b/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourcesetbinding_webhook.go index 91a5b12c49..1f51795173 100644 --- a/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourcesetbinding_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/exp/addons/api/v1beta1/clusterresourcesetbinding_webhook.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/cluster-api/feature" ) @@ -39,22 +40,22 @@ func (c *ClusterResourceSetBinding) SetupWebhookWithManager(mgr ctrl.Manager) er var _ webhook.Validator = &ClusterResourceSetBinding{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (c *ClusterResourceSetBinding) ValidateCreate() error { - return c.validate(nil) +func (c *ClusterResourceSetBinding) ValidateCreate() (admission.Warnings, error) { + return nil, c.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (c *ClusterResourceSetBinding) ValidateUpdate(old runtime.Object) error { +func (c *ClusterResourceSetBinding) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldBinding, ok := old.(*ClusterResourceSetBinding) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a ClusterResourceSetBinding but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a ClusterResourceSetBinding but got a %T", old)) } - return c.validate(oldBinding) + return nil, c.validate(oldBinding) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (c *ClusterResourceSetBinding) ValidateDelete() error { - return nil +func (c *ClusterResourceSetBinding) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterResourceSetBinding) validate(old *ClusterResourceSetBinding) error { diff --git a/vendor/sigs.k8s.io/cluster-api/exp/api/v1beta1/machinepool_webhook.go b/vendor/sigs.k8s.io/cluster-api/exp/api/v1beta1/machinepool_webhook.go index 0b2db7c154..58dc05ef77 100644 --- a/vendor/sigs.k8s.io/cluster-api/exp/api/v1beta1/machinepool_webhook.go +++ b/vendor/sigs.k8s.io/cluster-api/exp/api/v1beta1/machinepool_webhook.go @@ -26,6 +26,7 @@ import ( "k8s.io/utils/pointer" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/feature" @@ -75,22 +76,22 @@ func (m *MachinePool) Default() { } // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachinePool) ValidateCreate() error { - return m.validate(nil) +func (m *MachinePool) ValidateCreate() (admission.Warnings, error) { + return nil, m.validate(nil) } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (m *MachinePool) ValidateUpdate(old runtime.Object) error { +func (m *MachinePool) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { oldMP, ok := old.(*MachinePool) if !ok { - return apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", old)) + return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a MachinePool but got a %T", old)) } - return m.validate(oldMP) + return nil, m.validate(oldMP) } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (m *MachinePool) ValidateDelete() error { - return m.validate(nil) +func (m *MachinePool) ValidateDelete() (admission.Warnings, error) { + return nil, m.validate(nil) } func (m *MachinePool) validate(old *MachinePool) error { diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go index 9595e2c4b2..00bda8a4ce 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator.go @@ -39,17 +39,17 @@ type Validator interface { // ValidateCreate validates the object on creation. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateCreate() (err error) + ValidateCreate() (warnings Warnings, err error) // ValidateUpdate validates the object on update. The oldObj is the object before the update. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateUpdate(old runtime.Object) (err error) + ValidateUpdate(old runtime.Object) (warnings Warnings, err error) // ValidateDelete validates the object on deletion. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateDelete() (err error) + ValidateDelete() (warnings Warnings, err error) } // ValidatingWebhookFor creates a new Webhook for validating the provided type. @@ -87,7 +87,7 @@ func (h *validatingHandler) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = obj.ValidateCreate() + warnings, err = obj.ValidateCreate() case v1.Update: oldObj := obj.DeepCopyObject() @@ -100,7 +100,7 @@ func (h *validatingHandler) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = obj.ValidateUpdate(oldObj) + warnings, err = obj.ValidateUpdate(oldObj) case v1.Delete: // In reference to PR: https://github.com/kubernetes/kubernetes/pull/76346 // OldObject contains the object being deleted @@ -109,7 +109,7 @@ func (h *validatingHandler) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = obj.ValidateDelete() + warnings, err = obj.ValidateDelete() default: return Errored(http.StatusBadRequest, fmt.Errorf("unknown operation %q", req.Operation)) } diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go index 3f27a3d871..e99fbd8a85 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/webhook/admission/validator_custom.go @@ -34,17 +34,17 @@ type CustomValidator interface { // ValidateCreate validates the object on creation. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateCreate(ctx context.Context, obj runtime.Object) (err error) + ValidateCreate(ctx context.Context, obj runtime.Object) (warnings Warnings, err error) // ValidateUpdate validates the object on update. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (err error) + ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings Warnings, err error) // ValidateDelete validates the object on deletion. // The optional warnings will be added to the response as warning messages. // Return an error if the object is invalid. - ValidateDelete(ctx context.Context, obj runtime.Object) (err error) + ValidateDelete(ctx context.Context, obj runtime.Object) (warnings Warnings, err error) } // WithCustomValidator creates a new Webhook for validating the provided type. @@ -89,7 +89,7 @@ func (h *validatorForType) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = h.validator.ValidateCreate(ctx, obj) + warnings, err = h.validator.ValidateCreate(ctx, obj) case v1.Update: oldObj := obj.DeepCopyObject() if err := h.decoder.DecodeRaw(req.Object, obj); err != nil { @@ -99,7 +99,7 @@ func (h *validatorForType) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = h.validator.ValidateUpdate(ctx, oldObj, obj) + warnings, err = h.validator.ValidateUpdate(ctx, oldObj, obj) case v1.Delete: // In reference to PR: https://github.com/kubernetes/kubernetes/pull/76346 // OldObject contains the object being deleted @@ -107,7 +107,7 @@ func (h *validatorForType) Handle(ctx context.Context, req Request) Response { return Errored(http.StatusBadRequest, err) } - err = h.validator.ValidateDelete(ctx, obj) + warnings, err = h.validator.ValidateDelete(ctx, obj) default: return Errored(http.StatusBadRequest, fmt.Errorf("unknown operation %q", req.Operation)) }