Update VolumeSnapshot CRD version to v1beta
preserveUnknownField set to false, comments updates, adding pull request annotation more comment updates VolumeSnapshot comments rename to VolumeSnapshotClassName adding license
This commit is contained in:
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package versioned
|
||||
|
||||
import (
|
||||
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1"
|
||||
snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
flowcontrol "k8s.io/client-go/util/flowcontrol"
|
||||
@@ -27,19 +27,19 @@ import (
|
||||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface
|
||||
SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client
|
||||
snapshotV1beta1 *snapshotv1beta1.SnapshotV1beta1Client
|
||||
}
|
||||
|
||||
// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client
|
||||
func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface {
|
||||
return c.snapshotV1alpha1
|
||||
// SnapshotV1beta1 retrieves the SnapshotV1beta1Client
|
||||
func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface {
|
||||
return c.snapshotV1beta1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
@@ -58,7 +58,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfig(&configShallowCopy)
|
||||
cs.snapshotV1beta1, err = snapshotv1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.snapshotV1alpha1 = snapshotv1alpha1.NewForConfigOrDie(c)
|
||||
cs.snapshotV1beta1 = snapshotv1beta1.NewForConfigOrDie(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
|
||||
return &cs
|
||||
@@ -83,7 +83,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.snapshotV1alpha1 = snapshotv1alpha1.New(c)
|
||||
cs.snapshotV1beta1 = snapshotv1beta1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
|
@@ -20,8 +20,8 @@ package fake
|
||||
|
||||
import (
|
||||
clientset "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned"
|
||||
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1"
|
||||
fakesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1/fake"
|
||||
snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1"
|
||||
fakesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1/fake"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
@@ -71,7 +71,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client
|
||||
func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface {
|
||||
return &fakesnapshotv1alpha1.FakeSnapshotV1alpha1{Fake: &c.Fake}
|
||||
// SnapshotV1beta1 retrieves the SnapshotV1beta1Client
|
||||
func (c *Clientset) SnapshotV1beta1() snapshotv1beta1.SnapshotV1beta1Interface {
|
||||
return &fakesnapshotv1beta1.FakeSnapshotV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -31,7 +31,7 @@ var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
snapshotv1alpha1.AddToScheme,
|
||||
snapshotv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package scheme
|
||||
|
||||
import (
|
||||
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
snapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -31,7 +31,7 @@ var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
snapshotv1alpha1.AddToScheme,
|
||||
snapshotv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
@@ -17,4 +17,4 @@ limitations under the License.
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
package v1beta1
|
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -30,29 +30,29 @@ import (
|
||||
|
||||
// FakeVolumeSnapshots implements VolumeSnapshotInterface
|
||||
type FakeVolumeSnapshots struct {
|
||||
Fake *FakeSnapshotV1alpha1
|
||||
Fake *FakeSnapshotV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshots"}
|
||||
var volumesnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshots"}
|
||||
|
||||
var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshot"}
|
||||
var volumesnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshot"}
|
||||
|
||||
// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any.
|
||||
func (c *FakeVolumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
func (c *FakeVolumeSnapshots) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewGetAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), err
|
||||
return obj.(*v1beta1.VolumeSnapshot), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors.
|
||||
func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotList, err error) {
|
||||
func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &v1alpha1.VolumeSnapshotList{})
|
||||
Invokes(testing.NewListAction(volumesnapshotsResource, volumesnapshotsKind, c.ns, opts), &v1beta1.VolumeSnapshotList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -62,8 +62,8 @@ func (c *FakeVolumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.Volume
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.VolumeSnapshotList{ListMeta: obj.(*v1alpha1.VolumeSnapshotList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.VolumeSnapshotList).Items {
|
||||
list := &v1beta1.VolumeSnapshotList{ListMeta: obj.(*v1beta1.VolumeSnapshotList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VolumeSnapshotList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -79,43 +79,43 @@ func (c *FakeVolumeSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
func (c *FakeVolumeSnapshots) Create(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewCreateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), err
|
||||
return obj.(*v1beta1.VolumeSnapshot), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
func (c *FakeVolumeSnapshots) Update(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewUpdateAction(volumesnapshotsResource, c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), err
|
||||
return obj.(*v1beta1.VolumeSnapshot), 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 *FakeVolumeSnapshots) UpdateStatus(volumeSnapshot *v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error) {
|
||||
func (c *FakeVolumeSnapshots) UpdateStatus(volumeSnapshot *v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(volumesnapshotsResource, "status", c.ns, volumeSnapshot), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), err
|
||||
return obj.(*v1beta1.VolumeSnapshot), err
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshot and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVolumeSnapshots) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewDeleteAction(volumesnapshotsResource, c.ns, name), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -124,17 +124,17 @@ func (c *FakeVolumeSnapshots) Delete(name string, options *v1.DeleteOptions) err
|
||||
func (c *FakeVolumeSnapshots) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(volumesnapshotsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotList{})
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshot.
|
||||
func (c *FakeVolumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
func (c *FakeVolumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.VolumeSnapshot{})
|
||||
Invokes(testing.NewPatchSubresourceAction(volumesnapshotsResource, c.ns, name, pt, data, subresources...), &v1beta1.VolumeSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), err
|
||||
return obj.(*v1beta1.VolumeSnapshot), err
|
||||
}
|
@@ -19,30 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/typed/volumesnapshot/v1beta1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeSnapshotV1alpha1 struct {
|
||||
type FakeSnapshotV1beta1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeSnapshotV1alpha1) VolumeSnapshots(namespace string) v1alpha1.VolumeSnapshotInterface {
|
||||
func (c *FakeSnapshotV1beta1) VolumeSnapshots(namespace string) v1beta1.VolumeSnapshotInterface {
|
||||
return &FakeVolumeSnapshots{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeSnapshotV1alpha1) VolumeSnapshotClasses() v1alpha1.VolumeSnapshotClassInterface {
|
||||
func (c *FakeSnapshotV1beta1) VolumeSnapshotClasses() v1beta1.VolumeSnapshotClassInterface {
|
||||
return &FakeVolumeSnapshotClasses{c}
|
||||
}
|
||||
|
||||
func (c *FakeSnapshotV1alpha1) VolumeSnapshotContents() v1alpha1.VolumeSnapshotContentInterface {
|
||||
func (c *FakeSnapshotV1beta1) VolumeSnapshotContents() v1beta1.VolumeSnapshotContentInterface {
|
||||
return &FakeVolumeSnapshotContents{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeSnapshotV1alpha1) RESTClient() rest.Interface {
|
||||
func (c *FakeSnapshotV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -30,27 +30,27 @@ import (
|
||||
|
||||
// FakeVolumeSnapshotClasses implements VolumeSnapshotClassInterface
|
||||
type FakeVolumeSnapshotClasses struct {
|
||||
Fake *FakeSnapshotV1alpha1
|
||||
Fake *FakeSnapshotV1beta1
|
||||
}
|
||||
|
||||
var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshotclasses"}
|
||||
var volumesnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotclasses"}
|
||||
|
||||
var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshotClass"}
|
||||
var volumesnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotClass"}
|
||||
|
||||
// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any.
|
||||
func (c *FakeVolumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
func (c *FakeVolumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &v1alpha1.VolumeSnapshotClass{})
|
||||
Invokes(testing.NewRootGetAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotClass), err
|
||||
return obj.(*v1beta1.VolumeSnapshotClass), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors.
|
||||
func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotClassList, err error) {
|
||||
func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &v1alpha1.VolumeSnapshotClassList{})
|
||||
Invokes(testing.NewRootListAction(volumesnapshotclassesResource, volumesnapshotclassesKind, opts), &v1beta1.VolumeSnapshotClassList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -59,8 +59,8 @@ func (c *FakeVolumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1.
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.VolumeSnapshotClassList{ListMeta: obj.(*v1alpha1.VolumeSnapshotClassList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.VolumeSnapshotClassList).Items {
|
||||
list := &v1beta1.VolumeSnapshotClassList{ListMeta: obj.(*v1beta1.VolumeSnapshotClassList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VolumeSnapshotClassList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -75,29 +75,29 @@ func (c *FakeVolumeSnapshotClasses) Watch(opts v1.ListOptions) (watch.Interface,
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
func (c *FakeVolumeSnapshotClasses) Create(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1alpha1.VolumeSnapshotClass{})
|
||||
Invokes(testing.NewRootCreateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotClass), err
|
||||
return obj.(*v1beta1.VolumeSnapshotClass), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotClasses) Update(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
func (c *FakeVolumeSnapshotClasses) Update(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1alpha1.VolumeSnapshotClass{})
|
||||
Invokes(testing.NewRootUpdateAction(volumesnapshotclassesResource, volumeSnapshotClass), &v1beta1.VolumeSnapshotClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotClass), err
|
||||
return obj.(*v1beta1.VolumeSnapshotClass), err
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshotClass and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVolumeSnapshotClasses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &v1alpha1.VolumeSnapshotClass{})
|
||||
Invokes(testing.NewRootDeleteAction(volumesnapshotclassesResource, name), &v1beta1.VolumeSnapshotClass{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -105,16 +105,16 @@ func (c *FakeVolumeSnapshotClasses) Delete(name string, options *v1.DeleteOption
|
||||
func (c *FakeVolumeSnapshotClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(volumesnapshotclassesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotClassList{})
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotClassList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotClass.
|
||||
func (c *FakeVolumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
func (c *FakeVolumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &v1alpha1.VolumeSnapshotClass{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotclassesResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotClass), err
|
||||
return obj.(*v1beta1.VolumeSnapshotClass), err
|
||||
}
|
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
@@ -30,27 +30,27 @@ import (
|
||||
|
||||
// FakeVolumeSnapshotContents implements VolumeSnapshotContentInterface
|
||||
type FakeVolumeSnapshotContents struct {
|
||||
Fake *FakeSnapshotV1alpha1
|
||||
Fake *FakeSnapshotV1beta1
|
||||
}
|
||||
|
||||
var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumesnapshotcontents"}
|
||||
var volumesnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Resource: "volumesnapshotcontents"}
|
||||
|
||||
var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeSnapshotContent"}
|
||||
var volumesnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1beta1", Kind: "VolumeSnapshotContent"}
|
||||
|
||||
// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any.
|
||||
func (c *FakeVolumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
func (c *FakeVolumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &v1alpha1.VolumeSnapshotContent{})
|
||||
Invokes(testing.NewRootGetAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotContent), err
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors.
|
||||
func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotContentList, err error) {
|
||||
func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &v1alpha1.VolumeSnapshotContentList{})
|
||||
Invokes(testing.NewRootListAction(volumesnapshotcontentsResource, volumesnapshotcontentsKind, opts), &v1beta1.VolumeSnapshotContentList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -59,8 +59,8 @@ func (c *FakeVolumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.VolumeSnapshotContentList{ListMeta: obj.(*v1alpha1.VolumeSnapshotContentList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.VolumeSnapshotContentList).Items {
|
||||
list := &v1beta1.VolumeSnapshotContentList{ListMeta: obj.(*v1beta1.VolumeSnapshotContentList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VolumeSnapshotContentList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -75,29 +75,40 @@ func (c *FakeVolumeSnapshotContents) Watch(opts v1.ListOptions) (watch.Interface
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
func (c *FakeVolumeSnapshotContents) Create(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1alpha1.VolumeSnapshotContent{})
|
||||
Invokes(testing.NewRootCreateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotContent), err
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any.
|
||||
func (c *FakeVolumeSnapshotContents) Update(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
func (c *FakeVolumeSnapshotContents) Update(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1alpha1.VolumeSnapshotContent{})
|
||||
Invokes(testing.NewRootUpdateAction(volumesnapshotcontentsResource, volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotContent), err
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), 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 *FakeVolumeSnapshotContents) UpdateStatus(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(volumesnapshotcontentsResource, "status", volumeSnapshotContent), &v1beta1.VolumeSnapshotContent{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), err
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVolumeSnapshotContents) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &v1alpha1.VolumeSnapshotContent{})
|
||||
Invokes(testing.NewRootDeleteAction(volumesnapshotcontentsResource, name), &v1beta1.VolumeSnapshotContent{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -105,16 +116,16 @@ func (c *FakeVolumeSnapshotContents) Delete(name string, options *v1.DeleteOptio
|
||||
func (c *FakeVolumeSnapshotContents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(volumesnapshotcontentsResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.VolumeSnapshotContentList{})
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VolumeSnapshotContentList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotContent.
|
||||
func (c *FakeVolumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
func (c *FakeVolumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &v1alpha1.VolumeSnapshotContent{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(volumesnapshotcontentsResource, name, pt, data, subresources...), &v1beta1.VolumeSnapshotContent{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotContent), err
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), err
|
||||
}
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
type VolumeSnapshotExpansion interface{}
|
||||
|
@@ -16,12 +16,12 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,15 +37,15 @@ type VolumeSnapshotsGetter interface {
|
||||
|
||||
// VolumeSnapshotInterface has methods to work with VolumeSnapshot resources.
|
||||
type VolumeSnapshotInterface interface {
|
||||
Create(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error)
|
||||
Update(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error)
|
||||
UpdateStatus(*v1alpha1.VolumeSnapshot) (*v1alpha1.VolumeSnapshot, error)
|
||||
Create(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
|
||||
Update(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
|
||||
UpdateStatus(*v1beta1.VolumeSnapshot) (*v1beta1.VolumeSnapshot, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshot, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotList, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshot, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error)
|
||||
VolumeSnapshotExpansion
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ type volumeSnapshots struct {
|
||||
}
|
||||
|
||||
// newVolumeSnapshots returns a VolumeSnapshots
|
||||
func newVolumeSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeSnapshots {
|
||||
func newVolumeSnapshots(c *SnapshotV1beta1Client, namespace string) *volumeSnapshots {
|
||||
return &volumeSnapshots{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
@@ -64,8 +64,8 @@ func newVolumeSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeSnap
|
||||
}
|
||||
|
||||
// Get takes name of the volumeSnapshot, and returns the corresponding volumeSnapshot object, and an error if there is any.
|
||||
func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
result = &v1alpha1.VolumeSnapshot{}
|
||||
func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
result = &v1beta1.VolumeSnapshot{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
||||
@@ -77,12 +77,12 @@ func (c *volumeSnapshots) Get(name string, options v1.GetOptions) (result *v1alp
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshots that match those selectors.
|
||||
func (c *volumeSnapshots) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotList, err error) {
|
||||
func (c *volumeSnapshots) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VolumeSnapshotList{}
|
||||
result = &v1beta1.VolumeSnapshotList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
||||
@@ -109,8 +109,8 @@ func (c *volumeSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshot and creates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any.
|
||||
func (c *volumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
result = &v1alpha1.VolumeSnapshot{}
|
||||
func (c *volumeSnapshots) Create(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
result = &v1beta1.VolumeSnapshot{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
||||
@@ -121,8 +121,8 @@ func (c *volumeSnapshots) Create(volumeSnapshot *v1alpha1.VolumeSnapshot) (resul
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshot and updates it. Returns the server's representation of the volumeSnapshot, and an error, if there is any.
|
||||
func (c *volumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
result = &v1alpha1.VolumeSnapshot{}
|
||||
func (c *volumeSnapshots) Update(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
result = &v1beta1.VolumeSnapshot{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
||||
@@ -136,8 +136,8 @@ func (c *volumeSnapshots) Update(volumeSnapshot *v1alpha1.VolumeSnapshot) (resul
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *volumeSnapshots) UpdateStatus(volumeSnapshot *v1alpha1.VolumeSnapshot) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
result = &v1alpha1.VolumeSnapshot{}
|
||||
func (c *volumeSnapshots) UpdateStatus(volumeSnapshot *v1beta1.VolumeSnapshot) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
result = &v1beta1.VolumeSnapshot{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
||||
@@ -177,8 +177,8 @@ func (c *volumeSnapshots) DeleteCollection(options *v1.DeleteOptions, listOption
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshot.
|
||||
func (c *volumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshot, err error) {
|
||||
result = &v1alpha1.VolumeSnapshot{}
|
||||
func (c *volumeSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshot, err error) {
|
||||
result = &v1beta1.VolumeSnapshot{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("volumesnapshots").
|
@@ -16,41 +16,41 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
"github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type SnapshotV1alpha1Interface interface {
|
||||
type SnapshotV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
VolumeSnapshotsGetter
|
||||
VolumeSnapshotClassesGetter
|
||||
VolumeSnapshotContentsGetter
|
||||
}
|
||||
|
||||
// SnapshotV1alpha1Client is used to interact with features provided by the snapshot.storage.k8s.io group.
|
||||
type SnapshotV1alpha1Client struct {
|
||||
// SnapshotV1beta1Client is used to interact with features provided by the snapshot.storage.k8s.io group.
|
||||
type SnapshotV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *SnapshotV1alpha1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface {
|
||||
func (c *SnapshotV1beta1Client) VolumeSnapshots(namespace string) VolumeSnapshotInterface {
|
||||
return newVolumeSnapshots(c, namespace)
|
||||
}
|
||||
|
||||
func (c *SnapshotV1alpha1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface {
|
||||
func (c *SnapshotV1beta1Client) VolumeSnapshotClasses() VolumeSnapshotClassInterface {
|
||||
return newVolumeSnapshotClasses(c)
|
||||
}
|
||||
|
||||
func (c *SnapshotV1alpha1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface {
|
||||
func (c *SnapshotV1beta1Client) VolumeSnapshotContents() VolumeSnapshotContentInterface {
|
||||
return newVolumeSnapshotContents(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new SnapshotV1alpha1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) {
|
||||
// NewForConfig creates a new SnapshotV1beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*SnapshotV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
@@ -59,12 +59,12 @@ func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &SnapshotV1alpha1Client{client}, nil
|
||||
return &SnapshotV1beta1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new SnapshotV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new SnapshotV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *SnapshotV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -72,13 +72,13 @@ func NewForConfigOrDie(c *rest.Config) *SnapshotV1alpha1Client {
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new SnapshotV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *SnapshotV1alpha1Client {
|
||||
return &SnapshotV1alpha1Client{c}
|
||||
// New creates a new SnapshotV1beta1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *SnapshotV1beta1Client {
|
||||
return &SnapshotV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
@@ -92,7 +92,7 @@ func setConfigDefaults(config *rest.Config) error {
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *SnapshotV1alpha1Client) RESTClient() rest.Interface {
|
||||
func (c *SnapshotV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
@@ -16,12 +16,12 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,14 +37,14 @@ type VolumeSnapshotClassesGetter interface {
|
||||
|
||||
// VolumeSnapshotClassInterface has methods to work with VolumeSnapshotClass resources.
|
||||
type VolumeSnapshotClassInterface interface {
|
||||
Create(*v1alpha1.VolumeSnapshotClass) (*v1alpha1.VolumeSnapshotClass, error)
|
||||
Update(*v1alpha1.VolumeSnapshotClass) (*v1alpha1.VolumeSnapshotClass, error)
|
||||
Create(*v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
|
||||
Update(*v1beta1.VolumeSnapshotClass) (*v1beta1.VolumeSnapshotClass, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshotClass, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotClassList, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshotClass, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotClassList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error)
|
||||
VolumeSnapshotClassExpansion
|
||||
}
|
||||
|
||||
@@ -54,15 +54,15 @@ type volumeSnapshotClasses struct {
|
||||
}
|
||||
|
||||
// newVolumeSnapshotClasses returns a VolumeSnapshotClasses
|
||||
func newVolumeSnapshotClasses(c *SnapshotV1alpha1Client) *volumeSnapshotClasses {
|
||||
func newVolumeSnapshotClasses(c *SnapshotV1beta1Client) *volumeSnapshotClasses {
|
||||
return &volumeSnapshotClasses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the volumeSnapshotClass, and returns the corresponding volumeSnapshotClass object, and an error if there is any.
|
||||
func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotClass{}
|
||||
func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
result = &v1beta1.VolumeSnapshotClass{}
|
||||
err = c.client.Get().
|
||||
Resource("volumesnapshotclasses").
|
||||
Name(name).
|
||||
@@ -73,12 +73,12 @@ func (c *volumeSnapshotClasses) Get(name string, options v1.GetOptions) (result
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotClasses that match those selectors.
|
||||
func (c *volumeSnapshotClasses) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotClassList, err error) {
|
||||
func (c *volumeSnapshotClasses) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotClassList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VolumeSnapshotClassList{}
|
||||
result = &v1beta1.VolumeSnapshotClassList{}
|
||||
err = c.client.Get().
|
||||
Resource("volumesnapshotclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@@ -103,8 +103,8 @@ func (c *volumeSnapshotClasses) Watch(opts v1.ListOptions) (watch.Interface, err
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotClass and creates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any.
|
||||
func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotClass{}
|
||||
func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
result = &v1beta1.VolumeSnapshotClass{}
|
||||
err = c.client.Post().
|
||||
Resource("volumesnapshotclasses").
|
||||
Body(volumeSnapshotClass).
|
||||
@@ -114,8 +114,8 @@ func (c *volumeSnapshotClasses) Create(volumeSnapshotClass *v1alpha1.VolumeSnaps
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotClass and updates it. Returns the server's representation of the volumeSnapshotClass, and an error, if there is any.
|
||||
func (c *volumeSnapshotClasses) Update(volumeSnapshotClass *v1alpha1.VolumeSnapshotClass) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotClass{}
|
||||
func (c *volumeSnapshotClasses) Update(volumeSnapshotClass *v1beta1.VolumeSnapshotClass) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
result = &v1beta1.VolumeSnapshotClass{}
|
||||
err = c.client.Put().
|
||||
Resource("volumesnapshotclasses").
|
||||
Name(volumeSnapshotClass.Name).
|
||||
@@ -151,8 +151,8 @@ func (c *volumeSnapshotClasses) DeleteCollection(options *v1.DeleteOptions, list
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotClass.
|
||||
func (c *volumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotClass, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotClass{}
|
||||
func (c *volumeSnapshotClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotClass, err error) {
|
||||
result = &v1beta1.VolumeSnapshotClass{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("volumesnapshotclasses").
|
||||
SubResource(subresources...).
|
@@ -16,12 +16,12 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
scheme "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,14 +37,15 @@ type VolumeSnapshotContentsGetter interface {
|
||||
|
||||
// VolumeSnapshotContentInterface has methods to work with VolumeSnapshotContent resources.
|
||||
type VolumeSnapshotContentInterface interface {
|
||||
Create(*v1alpha1.VolumeSnapshotContent) (*v1alpha1.VolumeSnapshotContent, error)
|
||||
Update(*v1alpha1.VolumeSnapshotContent) (*v1alpha1.VolumeSnapshotContent, error)
|
||||
Create(*v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
|
||||
Update(*v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
|
||||
UpdateStatus(*v1beta1.VolumeSnapshotContent) (*v1beta1.VolumeSnapshotContent, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.VolumeSnapshotContent, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.VolumeSnapshotContentList, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.VolumeSnapshotContent, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.VolumeSnapshotContentList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error)
|
||||
VolumeSnapshotContentExpansion
|
||||
}
|
||||
|
||||
@@ -54,15 +55,15 @@ type volumeSnapshotContents struct {
|
||||
}
|
||||
|
||||
// newVolumeSnapshotContents returns a VolumeSnapshotContents
|
||||
func newVolumeSnapshotContents(c *SnapshotV1alpha1Client) *volumeSnapshotContents {
|
||||
func newVolumeSnapshotContents(c *SnapshotV1beta1Client) *volumeSnapshotContents {
|
||||
return &volumeSnapshotContents{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the volumeSnapshotContent, and returns the corresponding volumeSnapshotContent object, and an error if there is any.
|
||||
func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotContent{}
|
||||
func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
result = &v1beta1.VolumeSnapshotContent{}
|
||||
err = c.client.Get().
|
||||
Resource("volumesnapshotcontents").
|
||||
Name(name).
|
||||
@@ -73,12 +74,12 @@ func (c *volumeSnapshotContents) Get(name string, options v1.GetOptions) (result
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeSnapshotContents that match those selectors.
|
||||
func (c *volumeSnapshotContents) List(opts v1.ListOptions) (result *v1alpha1.VolumeSnapshotContentList, err error) {
|
||||
func (c *volumeSnapshotContents) List(opts v1.ListOptions) (result *v1beta1.VolumeSnapshotContentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VolumeSnapshotContentList{}
|
||||
result = &v1beta1.VolumeSnapshotContentList{}
|
||||
err = c.client.Get().
|
||||
Resource("volumesnapshotcontents").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@@ -103,8 +104,8 @@ func (c *volumeSnapshotContents) Watch(opts v1.ListOptions) (watch.Interface, er
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeSnapshotContent and creates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any.
|
||||
func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotContent{}
|
||||
func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
result = &v1beta1.VolumeSnapshotContent{}
|
||||
err = c.client.Post().
|
||||
Resource("volumesnapshotcontents").
|
||||
Body(volumeSnapshotContent).
|
||||
@@ -114,8 +115,8 @@ func (c *volumeSnapshotContents) Create(volumeSnapshotContent *v1alpha1.VolumeSn
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeSnapshotContent and updates it. Returns the server's representation of the volumeSnapshotContent, and an error, if there is any.
|
||||
func (c *volumeSnapshotContents) Update(volumeSnapshotContent *v1alpha1.VolumeSnapshotContent) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotContent{}
|
||||
func (c *volumeSnapshotContents) Update(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
result = &v1beta1.VolumeSnapshotContent{}
|
||||
err = c.client.Put().
|
||||
Resource("volumesnapshotcontents").
|
||||
Name(volumeSnapshotContent.Name).
|
||||
@@ -125,6 +126,21 @@ func (c *volumeSnapshotContents) Update(volumeSnapshotContent *v1alpha1.VolumeSn
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *volumeSnapshotContents) UpdateStatus(volumeSnapshotContent *v1beta1.VolumeSnapshotContent) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
result = &v1beta1.VolumeSnapshotContent{}
|
||||
err = c.client.Put().
|
||||
Resource("volumesnapshotcontents").
|
||||
Name(volumeSnapshotContent.Name).
|
||||
SubResource("status").
|
||||
Body(volumeSnapshotContent).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeSnapshotContent and deletes it. Returns an error if one occurs.
|
||||
func (c *volumeSnapshotContents) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
@@ -151,8 +167,8 @@ func (c *volumeSnapshotContents) DeleteCollection(options *v1.DeleteOptions, lis
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeSnapshotContent.
|
||||
func (c *volumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.VolumeSnapshotContent, err error) {
|
||||
result = &v1alpha1.VolumeSnapshotContent{}
|
||||
func (c *volumeSnapshotContents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.VolumeSnapshotContent, err error) {
|
||||
result = &v1beta1.VolumeSnapshotContent{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("volumesnapshotcontents").
|
||||
SubResource(subresources...).
|
@@ -21,7 +21,7 @@ package externalversions
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
@@ -52,13 +52,13 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
||||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=snapshot.storage.k8s.io, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshots"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshots().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshotclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshotClasses().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("volumesnapshotcontents"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1alpha1().VolumeSnapshotContents().Informer()}, nil
|
||||
// Group=snapshot.storage.k8s.io, Version=v1beta1
|
||||
case v1beta1.SchemeGroupVersion.WithResource("volumesnapshots"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshots().Informer()}, nil
|
||||
case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotClasses().Informer()}, nil
|
||||
case v1beta1.SchemeGroupVersion.WithResource("volumesnapshotcontents"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Snapshot().V1beta1().VolumeSnapshotContents().Informer()}, nil
|
||||
|
||||
}
|
||||
|
||||
|
@@ -20,13 +20,13 @@ package snapshot
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/volumesnapshot/v1beta1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
@@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces"
|
@@ -16,15 +16,15 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
// VolumeSnapshots.
|
||||
type VolumeSnapshotInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.VolumeSnapshotLister
|
||||
Lister() v1beta1.VolumeSnapshotLister
|
||||
}
|
||||
|
||||
type volumeSnapshotInformer struct {
|
||||
@@ -61,16 +61,16 @@ func NewFilteredVolumeSnapshotInformer(client versioned.Interface, namespace str
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshots(namespace).List(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshots(namespace).List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshots(namespace).Watch(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshots(namespace).Watch(options)
|
||||
},
|
||||
},
|
||||
&volumesnapshotv1alpha1.VolumeSnapshot{},
|
||||
&volumesnapshotv1beta1.VolumeSnapshot{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -81,9 +81,9 @@ func (f *volumeSnapshotInformer) defaultInformer(client versioned.Interface, res
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshot{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshot{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotInformer) Lister() v1alpha1.VolumeSnapshotLister {
|
||||
return v1alpha1.NewVolumeSnapshotLister(f.Informer().GetIndexer())
|
||||
func (f *volumeSnapshotInformer) Lister() v1beta1.VolumeSnapshotLister {
|
||||
return v1beta1.NewVolumeSnapshotLister(f.Informer().GetIndexer())
|
||||
}
|
@@ -16,15 +16,15 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
// VolumeSnapshotClasses.
|
||||
type VolumeSnapshotClassInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.VolumeSnapshotClassLister
|
||||
Lister() v1beta1.VolumeSnapshotClassLister
|
||||
}
|
||||
|
||||
type volumeSnapshotClassInformer struct {
|
||||
@@ -60,16 +60,16 @@ func NewFilteredVolumeSnapshotClassInformer(client versioned.Interface, resyncPe
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshotClasses().List(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshotClasses().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshotClasses().Watch(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshotClasses().Watch(options)
|
||||
},
|
||||
},
|
||||
&volumesnapshotv1alpha1.VolumeSnapshotClass{},
|
||||
&volumesnapshotv1beta1.VolumeSnapshotClass{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -80,9 +80,9 @@ func (f *volumeSnapshotClassInformer) defaultInformer(client versioned.Interface
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotClassInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshotClass{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotClass{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotClassInformer) Lister() v1alpha1.VolumeSnapshotClassLister {
|
||||
return v1alpha1.NewVolumeSnapshotClassLister(f.Informer().GetIndexer())
|
||||
func (f *volumeSnapshotClassInformer) Lister() v1beta1.VolumeSnapshotClassLister {
|
||||
return v1beta1.NewVolumeSnapshotClassLister(f.Informer().GetIndexer())
|
||||
}
|
@@ -16,15 +16,15 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
volumesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
volumesnapshotv1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
versioned "github.com/kubernetes-csi/external-snapshotter/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/kubernetes-csi/external-snapshotter/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/client/listers/volumesnapshot/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
// VolumeSnapshotContents.
|
||||
type VolumeSnapshotContentInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.VolumeSnapshotContentLister
|
||||
Lister() v1beta1.VolumeSnapshotContentLister
|
||||
}
|
||||
|
||||
type volumeSnapshotContentInformer struct {
|
||||
@@ -60,16 +60,16 @@ func NewFilteredVolumeSnapshotContentInformer(client versioned.Interface, resync
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshotContents().List(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshotContents().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.SnapshotV1alpha1().VolumeSnapshotContents().Watch(options)
|
||||
return client.SnapshotV1beta1().VolumeSnapshotContents().Watch(options)
|
||||
},
|
||||
},
|
||||
&volumesnapshotv1alpha1.VolumeSnapshotContent{},
|
||||
&volumesnapshotv1beta1.VolumeSnapshotContent{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -80,9 +80,9 @@ func (f *volumeSnapshotContentInformer) defaultInformer(client versioned.Interfa
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotContentInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&volumesnapshotv1alpha1.VolumeSnapshotContent{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&volumesnapshotv1beta1.VolumeSnapshotContent{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *volumeSnapshotContentInformer) Lister() v1alpha1.VolumeSnapshotContentLister {
|
||||
return v1alpha1.NewVolumeSnapshotContentLister(f.Informer().GetIndexer())
|
||||
func (f *volumeSnapshotContentInformer) Lister() v1beta1.VolumeSnapshotContentLister {
|
||||
return v1beta1.NewVolumeSnapshotContentLister(f.Informer().GetIndexer())
|
||||
}
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
// VolumeSnapshotListerExpansion allows custom methods to be added to
|
||||
// VolumeSnapshotLister.
|
@@ -16,10 +16,10 @@ limitations under the License.
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
// VolumeSnapshotLister helps list VolumeSnapshots.
|
||||
type VolumeSnapshotLister interface {
|
||||
// List lists all VolumeSnapshots in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error)
|
||||
// VolumeSnapshots returns an object that can list and get VolumeSnapshots.
|
||||
VolumeSnapshots(namespace string) VolumeSnapshotNamespaceLister
|
||||
VolumeSnapshotListerExpansion
|
||||
@@ -45,9 +45,9 @@ func NewVolumeSnapshotLister(indexer cache.Indexer) VolumeSnapshotLister {
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshots in the indexer.
|
||||
func (s *volumeSnapshotLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) {
|
||||
func (s *volumeSnapshotLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.VolumeSnapshot))
|
||||
ret = append(ret, m.(*v1beta1.VolumeSnapshot))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
@@ -60,9 +60,9 @@ func (s *volumeSnapshotLister) VolumeSnapshots(namespace string) VolumeSnapshotN
|
||||
// VolumeSnapshotNamespaceLister helps list and get VolumeSnapshots.
|
||||
type VolumeSnapshotNamespaceLister interface {
|
||||
// List lists all VolumeSnapshots in the indexer for a given namespace.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error)
|
||||
// Get retrieves the VolumeSnapshot from the indexer for a given namespace and name.
|
||||
Get(name string) (*v1alpha1.VolumeSnapshot, error)
|
||||
Get(name string) (*v1beta1.VolumeSnapshot, error)
|
||||
VolumeSnapshotNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -74,21 +74,21 @@ type volumeSnapshotNamespaceLister struct {
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshots in the indexer for a given namespace.
|
||||
func (s volumeSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshot, err error) {
|
||||
func (s volumeSnapshotNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshot, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.VolumeSnapshot))
|
||||
ret = append(ret, m.(*v1beta1.VolumeSnapshot))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VolumeSnapshot from the indexer for a given namespace and name.
|
||||
func (s volumeSnapshotNamespaceLister) Get(name string) (*v1alpha1.VolumeSnapshot, error) {
|
||||
func (s volumeSnapshotNamespaceLister) Get(name string) (*v1beta1.VolumeSnapshot, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshot"), name)
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshot"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshot), nil
|
||||
return obj.(*v1beta1.VolumeSnapshot), nil
|
||||
}
|
@@ -16,10 +16,10 @@ limitations under the License.
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
// VolumeSnapshotClassLister helps list VolumeSnapshotClasses.
|
||||
type VolumeSnapshotClassLister interface {
|
||||
// List lists all VolumeSnapshotClasses in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotClass, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error)
|
||||
// Get retrieves the VolumeSnapshotClass from the index for a given name.
|
||||
Get(name string) (*v1alpha1.VolumeSnapshotClass, error)
|
||||
Get(name string) (*v1beta1.VolumeSnapshotClass, error)
|
||||
VolumeSnapshotClassListerExpansion
|
||||
}
|
||||
|
||||
@@ -45,21 +45,21 @@ func NewVolumeSnapshotClassLister(indexer cache.Indexer) VolumeSnapshotClassList
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshotClasses in the indexer.
|
||||
func (s *volumeSnapshotClassLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotClass, err error) {
|
||||
func (s *volumeSnapshotClassLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotClass, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.VolumeSnapshotClass))
|
||||
ret = append(ret, m.(*v1beta1.VolumeSnapshotClass))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VolumeSnapshotClass from the index for a given name.
|
||||
func (s *volumeSnapshotClassLister) Get(name string) (*v1alpha1.VolumeSnapshotClass, error) {
|
||||
func (s *volumeSnapshotClassLister) Get(name string) (*v1beta1.VolumeSnapshotClass, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshotclass"), name)
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotclass"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotClass), nil
|
||||
return obj.(*v1beta1.VolumeSnapshotClass), nil
|
||||
}
|
@@ -16,10 +16,10 @@ limitations under the License.
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1alpha1"
|
||||
v1beta1 "github.com/kubernetes-csi/external-snapshotter/pkg/apis/volumesnapshot/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
// VolumeSnapshotContentLister helps list VolumeSnapshotContents.
|
||||
type VolumeSnapshotContentLister interface {
|
||||
// List lists all VolumeSnapshotContents in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotContent, err error)
|
||||
List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error)
|
||||
// Get retrieves the VolumeSnapshotContent from the index for a given name.
|
||||
Get(name string) (*v1alpha1.VolumeSnapshotContent, error)
|
||||
Get(name string) (*v1beta1.VolumeSnapshotContent, error)
|
||||
VolumeSnapshotContentListerExpansion
|
||||
}
|
||||
|
||||
@@ -45,21 +45,21 @@ func NewVolumeSnapshotContentLister(indexer cache.Indexer) VolumeSnapshotContent
|
||||
}
|
||||
|
||||
// List lists all VolumeSnapshotContents in the indexer.
|
||||
func (s *volumeSnapshotContentLister) List(selector labels.Selector) (ret []*v1alpha1.VolumeSnapshotContent, err error) {
|
||||
func (s *volumeSnapshotContentLister) List(selector labels.Selector) (ret []*v1beta1.VolumeSnapshotContent, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.VolumeSnapshotContent))
|
||||
ret = append(ret, m.(*v1beta1.VolumeSnapshotContent))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the VolumeSnapshotContent from the index for a given name.
|
||||
func (s *volumeSnapshotContentLister) Get(name string) (*v1alpha1.VolumeSnapshotContent, error) {
|
||||
func (s *volumeSnapshotContentLister) Get(name string) (*v1beta1.VolumeSnapshotContent, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("volumesnapshotcontent"), name)
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("volumesnapshotcontent"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.VolumeSnapshotContent), nil
|
||||
return obj.(*v1beta1.VolumeSnapshotContent), nil
|
||||
}
|
Reference in New Issue
Block a user