Change groupName to groupsnapshot.storage.k8s.io

This commit is contained in:
Raunak Pradip Shah
2023-03-01 11:20:20 +05:30
parent db21ddde42
commit 9ce31d0bf8
23 changed files with 78 additions and 115 deletions

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"net/http"
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1"
groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1"
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
@@ -31,20 +31,20 @@ import (
type Interface interface {
Discovery() discovery.DiscoveryInterface
SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface
GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface
SnapshotV1() snapshotv1.SnapshotV1Interface
}
// Clientset contains the clients for groups.
type Clientset struct {
*discovery.DiscoveryClient
snapshotV1alpha1 *snapshotv1alpha1.SnapshotV1alpha1Client
snapshotV1 *snapshotv1.SnapshotV1Client
groupsnapshotV1alpha1 *groupsnapshotv1alpha1.GroupsnapshotV1alpha1Client
snapshotV1 *snapshotv1.SnapshotV1Client
}
// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client
func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface {
return c.snapshotV1alpha1
// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client
func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface {
return c.groupsnapshotV1alpha1
}
// SnapshotV1 retrieves the SnapshotV1Client
@@ -96,7 +96,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
var cs Clientset
var err error
cs.snapshotV1alpha1, err = snapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
cs.groupsnapshotV1alpha1, err = groupsnapshotv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
@@ -125,7 +125,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.groupsnapshotV1alpha1 = groupsnapshotv1alpha1.New(c)
cs.snapshotV1 = snapshotv1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)

View File

@@ -20,8 +20,8 @@ package fake
import (
clientset "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned"
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1"
fakesnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake"
groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1"
fakegroupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumegroupsnapshot/v1alpha1/fake"
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1"
fakesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/clientset/versioned/typed/volumesnapshot/v1/fake"
"k8s.io/apimachinery/pkg/runtime"
@@ -81,9 +81,9 @@ var (
_ testing.FakeClient = &Clientset{}
)
// SnapshotV1alpha1 retrieves the SnapshotV1alpha1Client
func (c *Clientset) SnapshotV1alpha1() snapshotv1alpha1.SnapshotV1alpha1Interface {
return &fakesnapshotv1alpha1.FakeSnapshotV1alpha1{Fake: &c.Fake}
// GroupsnapshotV1alpha1 retrieves the GroupsnapshotV1alpha1Client
func (c *Clientset) GroupsnapshotV1alpha1() groupsnapshotv1alpha1.GroupsnapshotV1alpha1Interface {
return &fakegroupsnapshotv1alpha1.FakeGroupsnapshotV1alpha1{Fake: &c.Fake}
}
// SnapshotV1 retrieves the SnapshotV1Client

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1"
groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1"
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -32,7 +32,7 @@ var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
snapshotv1alpha1.AddToScheme,
groupsnapshotv1alpha1.AddToScheme,
snapshotv1.AddToScheme,
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package scheme
import (
snapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1"
groupsnapshotv1alpha1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumegroupsnapshot/v1alpha1"
snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v6/apis/volumesnapshot/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -32,7 +32,7 @@ var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
snapshotv1alpha1.AddToScheme,
groupsnapshotv1alpha1.AddToScheme,
snapshotv1.AddToScheme,
}

View File

@@ -32,13 +32,13 @@ import (
// FakeVolumeGroupSnapshots implements VolumeGroupSnapshotInterface
type FakeVolumeGroupSnapshots struct {
Fake *FakeSnapshotV1alpha1
Fake *FakeGroupsnapshotV1alpha1
ns string
}
var volumegroupsnapshotsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshots"}
var volumegroupsnapshotsResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshots"}
var volumegroupsnapshotsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshot"}
var volumegroupsnapshotsKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshot"}
// Get takes name of the volumeGroupSnapshot, and returns the corresponding volumeGroupSnapshot object, and an error if there is any.
func (c *FakeVolumeGroupSnapshots) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshot, err error) {

View File

@@ -24,25 +24,25 @@ import (
testing "k8s.io/client-go/testing"
)
type FakeSnapshotV1alpha1 struct {
type FakeGroupsnapshotV1alpha1 struct {
*testing.Fake
}
func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface {
func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshots(namespace string) v1alpha1.VolumeGroupSnapshotInterface {
return &FakeVolumeGroupSnapshots{c, namespace}
}
func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface {
func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotClasses() v1alpha1.VolumeGroupSnapshotClassInterface {
return &FakeVolumeGroupSnapshotClasses{c}
}
func (c *FakeSnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface {
func (c *FakeGroupsnapshotV1alpha1) VolumeGroupSnapshotContents() v1alpha1.VolumeGroupSnapshotContentInterface {
return &FakeVolumeGroupSnapshotContents{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 *FakeGroupsnapshotV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -32,12 +32,12 @@ import (
// FakeVolumeGroupSnapshotClasses implements VolumeGroupSnapshotClassInterface
type FakeVolumeGroupSnapshotClasses struct {
Fake *FakeSnapshotV1alpha1
Fake *FakeGroupsnapshotV1alpha1
}
var volumegroupsnapshotclassesResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotclasses"}
var volumegroupsnapshotclassesResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotclasses"}
var volumegroupsnapshotclassesKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotClass"}
var volumegroupsnapshotclassesKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotClass"}
// Get takes name of the volumeGroupSnapshotClass, and returns the corresponding volumeGroupSnapshotClass object, and an error if there is any.
func (c *FakeVolumeGroupSnapshotClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshotClass, err error) {

View File

@@ -32,12 +32,12 @@ import (
// FakeVolumeGroupSnapshotContents implements VolumeGroupSnapshotContentInterface
type FakeVolumeGroupSnapshotContents struct {
Fake *FakeSnapshotV1alpha1
Fake *FakeGroupsnapshotV1alpha1
}
var volumegroupsnapshotcontentsResource = schema.GroupVersionResource{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotcontents"}
var volumegroupsnapshotcontentsResource = schema.GroupVersionResource{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Resource: "volumegroupsnapshotcontents"}
var volumegroupsnapshotcontentsKind = schema.GroupVersionKind{Group: "snapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotContent"}
var volumegroupsnapshotcontentsKind = schema.GroupVersionKind{Group: "groupsnapshot.storage.k8s.io", Version: "v1alpha1", Kind: "VolumeGroupSnapshotContent"}
// Get takes name of the volumeGroupSnapshotContent, and returns the corresponding volumeGroupSnapshotContent object, and an error if there is any.
func (c *FakeVolumeGroupSnapshotContents) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeGroupSnapshotContent, err error) {

View File

@@ -57,7 +57,7 @@ type volumeGroupSnapshots struct {
}
// newVolumeGroupSnapshots returns a VolumeGroupSnapshots
func newVolumeGroupSnapshots(c *SnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots {
func newVolumeGroupSnapshots(c *GroupsnapshotV1alpha1Client, namespace string) *volumeGroupSnapshots {
return &volumeGroupSnapshots{
client: c.RESTClient(),
ns: namespace,

View File

@@ -26,34 +26,34 @@ import (
rest "k8s.io/client-go/rest"
)
type SnapshotV1alpha1Interface interface {
type GroupsnapshotV1alpha1Interface interface {
RESTClient() rest.Interface
VolumeGroupSnapshotsGetter
VolumeGroupSnapshotClassesGetter
VolumeGroupSnapshotContentsGetter
}
// SnapshotV1alpha1Client is used to interact with features provided by the snapshot.storage.k8s.io group.
type SnapshotV1alpha1Client struct {
// GroupsnapshotV1alpha1Client is used to interact with features provided by the groupsnapshot.storage.k8s.io group.
type GroupsnapshotV1alpha1Client struct {
restClient rest.Interface
}
func (c *SnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface {
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshots(namespace string) VolumeGroupSnapshotInterface {
return newVolumeGroupSnapshots(c, namespace)
}
func (c *SnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface {
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotClasses() VolumeGroupSnapshotClassInterface {
return newVolumeGroupSnapshotClasses(c)
}
func (c *SnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface {
func (c *GroupsnapshotV1alpha1Client) VolumeGroupSnapshotContents() VolumeGroupSnapshotContentInterface {
return newVolumeGroupSnapshotContents(c)
}
// NewForConfig creates a new SnapshotV1alpha1Client for the given config.
// NewForConfig creates a new GroupsnapshotV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) {
func NewForConfig(c *rest.Config) (*GroupsnapshotV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -65,9 +65,9 @@ func NewForConfig(c *rest.Config) (*SnapshotV1alpha1Client, error) {
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new SnapshotV1alpha1Client for the given config and http client.
// NewForConfigAndClient creates a new GroupsnapshotV1alpha1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1alpha1Client, error) {
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GroupsnapshotV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -76,12 +76,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SnapshotV1alpha1Cli
if err != nil {
return nil, err
}
return &SnapshotV1alpha1Client{client}, nil
return &GroupsnapshotV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new SnapshotV1alpha1Client for the given config and
// NewForConfigOrDie creates a new GroupsnapshotV1alpha1Client 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) *GroupsnapshotV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@@ -89,9 +89,9 @@ 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 GroupsnapshotV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *GroupsnapshotV1alpha1Client {
return &GroupsnapshotV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
@@ -109,7 +109,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 *GroupsnapshotV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View File

@@ -55,7 +55,7 @@ type volumeGroupSnapshotClasses struct {
}
// newVolumeGroupSnapshotClasses returns a VolumeGroupSnapshotClasses
func newVolumeGroupSnapshotClasses(c *SnapshotV1alpha1Client) *volumeGroupSnapshotClasses {
func newVolumeGroupSnapshotClasses(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotClasses {
return &volumeGroupSnapshotClasses{
client: c.RESTClient(),
}

View File

@@ -56,7 +56,7 @@ type volumeGroupSnapshotContents struct {
}
// newVolumeGroupSnapshotContents returns a VolumeGroupSnapshotContents
func newVolumeGroupSnapshotContents(c *SnapshotV1alpha1Client) *volumeGroupSnapshotContents {
func newVolumeGroupSnapshotContents(c *GroupsnapshotV1alpha1Client) *volumeGroupSnapshotContents {
return &volumeGroupSnapshotContents{
client: c.RESTClient(),
}