mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(beta): autogen code for v1 CRDs
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
472fd603ac
commit
1e23607d8a
22 changed files with 433 additions and 212 deletions
|
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||
package internalclientset
|
||||
|
||||
import (
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1"
|
||||
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
|
||||
ZfsV1alpha1() zfsv1alpha1.ZfsV1alpha1Interface
|
||||
ZfsV1() zfsv1.ZfsV1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
zfsV1alpha1 *zfsv1alpha1.ZfsV1alpha1Client
|
||||
zfsV1 *zfsv1.ZfsV1Client
|
||||
}
|
||||
|
||||
// ZfsV1alpha1 retrieves the ZfsV1alpha1Client
|
||||
func (c *Clientset) ZfsV1alpha1() zfsv1alpha1.ZfsV1alpha1Interface {
|
||||
return c.zfsV1alpha1
|
||||
// ZfsV1 retrieves the ZfsV1Client
|
||||
func (c *Clientset) ZfsV1() zfsv1.ZfsV1Interface {
|
||||
return c.zfsV1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
|
|
@ -58,7 +58,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||
}
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.zfsV1alpha1, err = zfsv1alpha1.NewForConfig(&configShallowCopy)
|
||||
cs.zfsV1, err = zfsv1.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.zfsV1alpha1 = zfsv1alpha1.NewForConfigOrDie(c)
|
||||
cs.zfsV1 = zfsv1.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.zfsV1alpha1 = zfsv1alpha1.New(c)
|
||||
cs.zfsV1 = zfsv1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
return &cs
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ package fake
|
|||
|
||||
import (
|
||||
clientset "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset"
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1alpha1"
|
||||
fakezfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1alpha1/fake"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1"
|
||||
fakezfsv1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1/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{}
|
||||
|
||||
// ZfsV1alpha1 retrieves the ZfsV1alpha1Client
|
||||
func (c *Clientset) ZfsV1alpha1() zfsv1alpha1.ZfsV1alpha1Interface {
|
||||
return &fakezfsv1alpha1.FakeZfsV1alpha1{Fake: &c.Fake}
|
||||
// ZfsV1 retrieves the ZfsV1Client
|
||||
func (c *Clientset) ZfsV1() zfsv1.ZfsV1Interface {
|
||||
return &fakezfsv1.FakeZfsV1{Fake: &c.Fake}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
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{
|
||||
zfsv1alpha1.AddToScheme,
|
||||
zfsv1.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 (
|
||||
zfsv1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
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{
|
||||
zfsv1alpha1.AddToScheme,
|
||||
zfsv1.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 v1
|
||||
|
|
@ -19,26 +19,26 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/typed/zfs/v1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeZfsV1alpha1 struct {
|
||||
type FakeZfsV1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeZfsV1alpha1) ZFSSnapshots(namespace string) v1alpha1.ZFSSnapshotInterface {
|
||||
func (c *FakeZfsV1) ZFSSnapshots(namespace string) v1.ZFSSnapshotInterface {
|
||||
return &FakeZFSSnapshots{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeZfsV1alpha1) ZFSVolumes(namespace string) v1alpha1.ZFSVolumeInterface {
|
||||
func (c *FakeZfsV1) ZFSVolumes(namespace string) v1.ZFSVolumeInterface {
|
||||
return &FakeZFSVolumes{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeZfsV1alpha1) RESTClient() rest.Interface {
|
||||
func (c *FakeZfsV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
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 (
|
|||
|
||||
// FakeZFSSnapshots implements ZFSSnapshotInterface
|
||||
type FakeZFSSnapshots struct {
|
||||
Fake *FakeZfsV1alpha1
|
||||
Fake *FakeZfsV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var zfssnapshotsResource = schema.GroupVersionResource{Group: "zfs.openebs.io", Version: "v1alpha1", Resource: "zfssnapshots"}
|
||||
var zfssnapshotsResource = schema.GroupVersionResource{Group: "zfs.openebs.io", Version: "v1", Resource: "zfssnapshots"}
|
||||
|
||||
var zfssnapshotsKind = schema.GroupVersionKind{Group: "zfs.openebs.io", Version: "v1alpha1", Kind: "ZFSSnapshot"}
|
||||
var zfssnapshotsKind = schema.GroupVersionKind{Group: "zfs.openebs.io", Version: "v1", Kind: "ZFSSnapshot"}
|
||||
|
||||
// Get takes name of the zFSSnapshot, and returns the corresponding zFSSnapshot object, and an error if there is any.
|
||||
func (c *FakeZFSSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
func (c *FakeZFSSnapshots) Get(name string, options v1.GetOptions) (result *zfsv1.ZFSSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(zfssnapshotsResource, c.ns, name), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewGetAction(zfssnapshotsResource, c.ns, name), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSSnapshot), err
|
||||
return obj.(*zfsv1.ZFSSnapshot), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ZFSSnapshots that match those selectors.
|
||||
func (c *FakeZFSSnapshots) List(opts v1.ListOptions) (result *v1alpha1.ZFSSnapshotList, err error) {
|
||||
func (c *FakeZFSSnapshots) List(opts v1.ListOptions) (result *zfsv1.ZFSSnapshotList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(zfssnapshotsResource, zfssnapshotsKind, c.ns, opts), &v1alpha1.ZFSSnapshotList{})
|
||||
Invokes(testing.NewListAction(zfssnapshotsResource, zfssnapshotsKind, c.ns, opts), &zfsv1.ZFSSnapshotList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
@ -62,8 +62,8 @@ func (c *FakeZFSSnapshots) List(opts v1.ListOptions) (result *v1alpha1.ZFSSnapsh
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ZFSSnapshotList{ListMeta: obj.(*v1alpha1.ZFSSnapshotList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ZFSSnapshotList).Items {
|
||||
list := &zfsv1.ZFSSnapshotList{ListMeta: obj.(*zfsv1.ZFSSnapshotList).ListMeta}
|
||||
for _, item := range obj.(*zfsv1.ZFSSnapshotList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
|
@ -79,43 +79,43 @@ func (c *FakeZFSSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Create takes the representation of a zFSSnapshot and creates it. Returns the server's representation of the zFSSnapshot, and an error, if there is any.
|
||||
func (c *FakeZFSSnapshots) Create(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
func (c *FakeZFSSnapshots) Create(zFSSnapshot *zfsv1.ZFSSnapshot) (result *zfsv1.ZFSSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(zfssnapshotsResource, c.ns, zFSSnapshot), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewCreateAction(zfssnapshotsResource, c.ns, zFSSnapshot), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSSnapshot), err
|
||||
return obj.(*zfsv1.ZFSSnapshot), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a zFSSnapshot and updates it. Returns the server's representation of the zFSSnapshot, and an error, if there is any.
|
||||
func (c *FakeZFSSnapshots) Update(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
func (c *FakeZFSSnapshots) Update(zFSSnapshot *zfsv1.ZFSSnapshot) (result *zfsv1.ZFSSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(zfssnapshotsResource, c.ns, zFSSnapshot), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewUpdateAction(zfssnapshotsResource, c.ns, zFSSnapshot), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSSnapshot), err
|
||||
return obj.(*zfsv1.ZFSSnapshot), 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 *FakeZFSSnapshots) UpdateStatus(zFSSnapshot *v1alpha1.ZFSSnapshot) (*v1alpha1.ZFSSnapshot, error) {
|
||||
func (c *FakeZFSSnapshots) UpdateStatus(zFSSnapshot *zfsv1.ZFSSnapshot) (*zfsv1.ZFSSnapshot, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(zfssnapshotsResource, "status", c.ns, zFSSnapshot), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(zfssnapshotsResource, "status", c.ns, zFSSnapshot), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSSnapshot), err
|
||||
return obj.(*zfsv1.ZFSSnapshot), err
|
||||
}
|
||||
|
||||
// Delete takes name of the zFSSnapshot and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeZFSSnapshots) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(zfssnapshotsResource, c.ns, name), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewDeleteAction(zfssnapshotsResource, c.ns, name), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
@ -124,17 +124,17 @@ func (c *FakeZFSSnapshots) Delete(name string, options *v1.DeleteOptions) error
|
|||
func (c *FakeZFSSnapshots) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(zfssnapshotsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ZFSSnapshotList{})
|
||||
_, err := c.Fake.Invokes(action, &zfsv1.ZFSSnapshotList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched zFSSnapshot.
|
||||
func (c *FakeZFSSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
func (c *FakeZFSSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *zfsv1.ZFSSnapshot, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(zfssnapshotsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ZFSSnapshot{})
|
||||
Invokes(testing.NewPatchSubresourceAction(zfssnapshotsResource, c.ns, name, pt, data, subresources...), &zfsv1.ZFSSnapshot{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSSnapshot), err
|
||||
return obj.(*zfsv1.ZFSSnapshot), err
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
zfsv1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
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 (
|
|||
|
||||
// FakeZFSVolumes implements ZFSVolumeInterface
|
||||
type FakeZFSVolumes struct {
|
||||
Fake *FakeZfsV1alpha1
|
||||
Fake *FakeZfsV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var zfsvolumesResource = schema.GroupVersionResource{Group: "zfs.openebs.io", Version: "v1alpha1", Resource: "zfsvolumes"}
|
||||
var zfsvolumesResource = schema.GroupVersionResource{Group: "zfs.openebs.io", Version: "v1", Resource: "zfsvolumes"}
|
||||
|
||||
var zfsvolumesKind = schema.GroupVersionKind{Group: "zfs.openebs.io", Version: "v1alpha1", Kind: "ZFSVolume"}
|
||||
var zfsvolumesKind = schema.GroupVersionKind{Group: "zfs.openebs.io", Version: "v1", Kind: "ZFSVolume"}
|
||||
|
||||
// Get takes name of the zFSVolume, and returns the corresponding zFSVolume object, and an error if there is any.
|
||||
func (c *FakeZFSVolumes) Get(name string, options v1.GetOptions) (result *v1alpha1.ZFSVolume, err error) {
|
||||
func (c *FakeZFSVolumes) Get(name string, options v1.GetOptions) (result *zfsv1.ZFSVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(zfsvolumesResource, c.ns, name), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewGetAction(zfsvolumesResource, c.ns, name), &zfsv1.ZFSVolume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSVolume), err
|
||||
return obj.(*zfsv1.ZFSVolume), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ZFSVolumes that match those selectors.
|
||||
func (c *FakeZFSVolumes) List(opts v1.ListOptions) (result *v1alpha1.ZFSVolumeList, err error) {
|
||||
func (c *FakeZFSVolumes) List(opts v1.ListOptions) (result *zfsv1.ZFSVolumeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(zfsvolumesResource, zfsvolumesKind, c.ns, opts), &v1alpha1.ZFSVolumeList{})
|
||||
Invokes(testing.NewListAction(zfsvolumesResource, zfsvolumesKind, c.ns, opts), &zfsv1.ZFSVolumeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
@ -62,8 +62,8 @@ func (c *FakeZFSVolumes) List(opts v1.ListOptions) (result *v1alpha1.ZFSVolumeLi
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ZFSVolumeList{ListMeta: obj.(*v1alpha1.ZFSVolumeList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ZFSVolumeList).Items {
|
||||
list := &zfsv1.ZFSVolumeList{ListMeta: obj.(*zfsv1.ZFSVolumeList).ListMeta}
|
||||
for _, item := range obj.(*zfsv1.ZFSVolumeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
|
@ -79,43 +79,43 @@ func (c *FakeZFSVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Create takes the representation of a zFSVolume and creates it. Returns the server's representation of the zFSVolume, and an error, if there is any.
|
||||
func (c *FakeZFSVolumes) Create(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFSVolume, err error) {
|
||||
func (c *FakeZFSVolumes) Create(zFSVolume *zfsv1.ZFSVolume) (result *zfsv1.ZFSVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(zfsvolumesResource, c.ns, zFSVolume), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewCreateAction(zfsvolumesResource, c.ns, zFSVolume), &zfsv1.ZFSVolume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSVolume), err
|
||||
return obj.(*zfsv1.ZFSVolume), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a zFSVolume and updates it. Returns the server's representation of the zFSVolume, and an error, if there is any.
|
||||
func (c *FakeZFSVolumes) Update(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFSVolume, err error) {
|
||||
func (c *FakeZFSVolumes) Update(zFSVolume *zfsv1.ZFSVolume) (result *zfsv1.ZFSVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(zfsvolumesResource, c.ns, zFSVolume), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewUpdateAction(zfsvolumesResource, c.ns, zFSVolume), &zfsv1.ZFSVolume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSVolume), err
|
||||
return obj.(*zfsv1.ZFSVolume), 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 *FakeZFSVolumes) UpdateStatus(zFSVolume *v1alpha1.ZFSVolume) (*v1alpha1.ZFSVolume, error) {
|
||||
func (c *FakeZFSVolumes) UpdateStatus(zFSVolume *zfsv1.ZFSVolume) (*zfsv1.ZFSVolume, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(zfsvolumesResource, "status", c.ns, zFSVolume), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(zfsvolumesResource, "status", c.ns, zFSVolume), &zfsv1.ZFSVolume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSVolume), err
|
||||
return obj.(*zfsv1.ZFSVolume), err
|
||||
}
|
||||
|
||||
// Delete takes name of the zFSVolume and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeZFSVolumes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(zfsvolumesResource, c.ns, name), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewDeleteAction(zfsvolumesResource, c.ns, name), &zfsv1.ZFSVolume{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
|
@ -124,17 +124,17 @@ func (c *FakeZFSVolumes) Delete(name string, options *v1.DeleteOptions) error {
|
|||
func (c *FakeZFSVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(zfsvolumesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ZFSVolumeList{})
|
||||
_, err := c.Fake.Invokes(action, &zfsv1.ZFSVolumeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched zFSVolume.
|
||||
func (c *FakeZFSVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSVolume, err error) {
|
||||
func (c *FakeZFSVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *zfsv1.ZFSVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(zfsvolumesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ZFSVolume{})
|
||||
Invokes(testing.NewPatchSubresourceAction(zfsvolumesResource, c.ns, name, pt, data, subresources...), &zfsv1.ZFSVolume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ZFSVolume), err
|
||||
return obj.(*zfsv1.ZFSVolume), err
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
type ZFSSnapshotExpansion interface{}
|
||||
|
||||
|
|
@ -16,36 +16,36 @@ limitations under the License.
|
|||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
"github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/scheme"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type ZfsV1alpha1Interface interface {
|
||||
type ZfsV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ZFSSnapshotsGetter
|
||||
ZFSVolumesGetter
|
||||
}
|
||||
|
||||
// ZfsV1alpha1Client is used to interact with features provided by the zfs.openebs.io group.
|
||||
type ZfsV1alpha1Client struct {
|
||||
// ZfsV1Client is used to interact with features provided by the zfs.openebs.io group.
|
||||
type ZfsV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ZfsV1alpha1Client) ZFSSnapshots(namespace string) ZFSSnapshotInterface {
|
||||
func (c *ZfsV1Client) ZFSSnapshots(namespace string) ZFSSnapshotInterface {
|
||||
return newZFSSnapshots(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ZfsV1alpha1Client) ZFSVolumes(namespace string) ZFSVolumeInterface {
|
||||
func (c *ZfsV1Client) ZFSVolumes(namespace string) ZFSVolumeInterface {
|
||||
return newZFSVolumes(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ZfsV1alpha1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ZfsV1alpha1Client, error) {
|
||||
// NewForConfig creates a new ZfsV1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*ZfsV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
|
|
@ -54,12 +54,12 @@ func NewForConfig(c *rest.Config) (*ZfsV1alpha1Client, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ZfsV1alpha1Client{client}, nil
|
||||
return &ZfsV1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ZfsV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new ZfsV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ZfsV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *ZfsV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -67,13 +67,13 @@ func NewForConfigOrDie(c *rest.Config) *ZfsV1alpha1Client {
|
|||
return client
|
||||
}
|
||||
|
||||
// New creates a new ZfsV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ZfsV1alpha1Client {
|
||||
return &ZfsV1alpha1Client{c}
|
||||
// New creates a new ZfsV1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ZfsV1Client {
|
||||
return &ZfsV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
gv := v1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
|
|
@ -87,7 +87,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 *ZfsV1alpha1Client) RESTClient() rest.Interface {
|
||||
func (c *ZfsV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -16,14 +16,14 @@ limitations under the License.
|
|||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
scheme "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
|
|
@ -37,15 +37,15 @@ type ZFSSnapshotsGetter interface {
|
|||
|
||||
// ZFSSnapshotInterface has methods to work with ZFSSnapshot resources.
|
||||
type ZFSSnapshotInterface interface {
|
||||
Create(*v1alpha1.ZFSSnapshot) (*v1alpha1.ZFSSnapshot, error)
|
||||
Update(*v1alpha1.ZFSSnapshot) (*v1alpha1.ZFSSnapshot, error)
|
||||
UpdateStatus(*v1alpha1.ZFSSnapshot) (*v1alpha1.ZFSSnapshot, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.ZFSSnapshot, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.ZFSSnapshotList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSSnapshot, err error)
|
||||
Create(*v1.ZFSSnapshot) (*v1.ZFSSnapshot, error)
|
||||
Update(*v1.ZFSSnapshot) (*v1.ZFSSnapshot, error)
|
||||
UpdateStatus(*v1.ZFSSnapshot) (*v1.ZFSSnapshot, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.ZFSSnapshot, error)
|
||||
List(opts metav1.ListOptions) (*v1.ZFSSnapshotList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ZFSSnapshot, err error)
|
||||
ZFSSnapshotExpansion
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ type zFSSnapshots struct {
|
|||
}
|
||||
|
||||
// newZFSSnapshots returns a ZFSSnapshots
|
||||
func newZFSSnapshots(c *ZfsV1alpha1Client, namespace string) *zFSSnapshots {
|
||||
func newZFSSnapshots(c *ZfsV1Client, namespace string) *zFSSnapshots {
|
||||
return &zFSSnapshots{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
|
|
@ -64,8 +64,8 @@ func newZFSSnapshots(c *ZfsV1alpha1Client, namespace string) *zFSSnapshots {
|
|||
}
|
||||
|
||||
// Get takes name of the zFSSnapshot, and returns the corresponding zFSSnapshot object, and an error if there is any.
|
||||
func (c *zFSSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
result = &v1alpha1.ZFSSnapshot{}
|
||||
func (c *zFSSnapshots) Get(name string, options metav1.GetOptions) (result *v1.ZFSSnapshot, err error) {
|
||||
result = &v1.ZFSSnapshot{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -77,12 +77,12 @@ func (c *zFSSnapshots) Get(name string, options v1.GetOptions) (result *v1alpha1
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ZFSSnapshots that match those selectors.
|
||||
func (c *zFSSnapshots) List(opts v1.ListOptions) (result *v1alpha1.ZFSSnapshotList, err error) {
|
||||
func (c *zFSSnapshots) List(opts metav1.ListOptions) (result *v1.ZFSSnapshotList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ZFSSnapshotList{}
|
||||
result = &v1.ZFSSnapshotList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -94,7 +94,7 @@ func (c *zFSSnapshots) List(opts v1.ListOptions) (result *v1alpha1.ZFSSnapshotLi
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested zFSSnapshots.
|
||||
func (c *zFSSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *zFSSnapshots) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
|
|
@ -109,8 +109,8 @@ func (c *zFSSnapshots) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Create takes the representation of a zFSSnapshot and creates it. Returns the server's representation of the zFSSnapshot, and an error, if there is any.
|
||||
func (c *zFSSnapshots) Create(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
result = &v1alpha1.ZFSSnapshot{}
|
||||
func (c *zFSSnapshots) Create(zFSSnapshot *v1.ZFSSnapshot) (result *v1.ZFSSnapshot, err error) {
|
||||
result = &v1.ZFSSnapshot{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -121,8 +121,8 @@ func (c *zFSSnapshots) Create(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alph
|
|||
}
|
||||
|
||||
// Update takes the representation of a zFSSnapshot and updates it. Returns the server's representation of the zFSSnapshot, and an error, if there is any.
|
||||
func (c *zFSSnapshots) Update(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
result = &v1alpha1.ZFSSnapshot{}
|
||||
func (c *zFSSnapshots) Update(zFSSnapshot *v1.ZFSSnapshot) (result *v1.ZFSSnapshot, err error) {
|
||||
result = &v1.ZFSSnapshot{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -136,8 +136,8 @@ func (c *zFSSnapshots) Update(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alph
|
|||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *zFSSnapshots) UpdateStatus(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
result = &v1alpha1.ZFSSnapshot{}
|
||||
func (c *zFSSnapshots) UpdateStatus(zFSSnapshot *v1.ZFSSnapshot) (result *v1.ZFSSnapshot, err error) {
|
||||
result = &v1.ZFSSnapshot{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -150,7 +150,7 @@ func (c *zFSSnapshots) UpdateStatus(zFSSnapshot *v1alpha1.ZFSSnapshot) (result *
|
|||
}
|
||||
|
||||
// Delete takes name of the zFSSnapshot and deletes it. Returns an error if one occurs.
|
||||
func (c *zFSSnapshots) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *zFSSnapshots) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -161,7 +161,7 @@ func (c *zFSSnapshots) Delete(name string, options *v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *zFSSnapshots) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *zFSSnapshots) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
|
|
@ -177,8 +177,8 @@ func (c *zFSSnapshots) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched zFSSnapshot.
|
||||
func (c *zFSSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSSnapshot, err error) {
|
||||
result = &v1alpha1.ZFSSnapshot{}
|
||||
func (c *zFSSnapshots) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ZFSSnapshot, err error) {
|
||||
result = &v1.ZFSSnapshot{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("zfssnapshots").
|
||||
|
|
@ -16,14 +16,14 @@ limitations under the License.
|
|||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1alpha1"
|
||||
v1 "github.com/openebs/zfs-localpv/pkg/apis/openebs.io/zfs/v1"
|
||||
scheme "github.com/openebs/zfs-localpv/pkg/generated/clientset/internalclientset/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
|
|
@ -37,15 +37,15 @@ type ZFSVolumesGetter interface {
|
|||
|
||||
// ZFSVolumeInterface has methods to work with ZFSVolume resources.
|
||||
type ZFSVolumeInterface interface {
|
||||
Create(*v1alpha1.ZFSVolume) (*v1alpha1.ZFSVolume, error)
|
||||
Update(*v1alpha1.ZFSVolume) (*v1alpha1.ZFSVolume, error)
|
||||
UpdateStatus(*v1alpha1.ZFSVolume) (*v1alpha1.ZFSVolume, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.ZFSVolume, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.ZFSVolumeList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSVolume, err error)
|
||||
Create(*v1.ZFSVolume) (*v1.ZFSVolume, error)
|
||||
Update(*v1.ZFSVolume) (*v1.ZFSVolume, error)
|
||||
UpdateStatus(*v1.ZFSVolume) (*v1.ZFSVolume, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.ZFSVolume, error)
|
||||
List(opts metav1.ListOptions) (*v1.ZFSVolumeList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ZFSVolume, err error)
|
||||
ZFSVolumeExpansion
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ type zFSVolumes struct {
|
|||
}
|
||||
|
||||
// newZFSVolumes returns a ZFSVolumes
|
||||
func newZFSVolumes(c *ZfsV1alpha1Client, namespace string) *zFSVolumes {
|
||||
func newZFSVolumes(c *ZfsV1Client, namespace string) *zFSVolumes {
|
||||
return &zFSVolumes{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
|
|
@ -64,8 +64,8 @@ func newZFSVolumes(c *ZfsV1alpha1Client, namespace string) *zFSVolumes {
|
|||
}
|
||||
|
||||
// Get takes name of the zFSVolume, and returns the corresponding zFSVolume object, and an error if there is any.
|
||||
func (c *zFSVolumes) Get(name string, options v1.GetOptions) (result *v1alpha1.ZFSVolume, err error) {
|
||||
result = &v1alpha1.ZFSVolume{}
|
||||
func (c *zFSVolumes) Get(name string, options metav1.GetOptions) (result *v1.ZFSVolume, err error) {
|
||||
result = &v1.ZFSVolume{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -77,12 +77,12 @@ func (c *zFSVolumes) Get(name string, options v1.GetOptions) (result *v1alpha1.Z
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ZFSVolumes that match those selectors.
|
||||
func (c *zFSVolumes) List(opts v1.ListOptions) (result *v1alpha1.ZFSVolumeList, err error) {
|
||||
func (c *zFSVolumes) List(opts metav1.ListOptions) (result *v1.ZFSVolumeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ZFSVolumeList{}
|
||||
result = &v1.ZFSVolumeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -94,7 +94,7 @@ func (c *zFSVolumes) List(opts v1.ListOptions) (result *v1alpha1.ZFSVolumeList,
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested zFSVolumes.
|
||||
func (c *zFSVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *zFSVolumes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
|
|
@ -109,8 +109,8 @@ func (c *zFSVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Create takes the representation of a zFSVolume and creates it. Returns the server's representation of the zFSVolume, and an error, if there is any.
|
||||
func (c *zFSVolumes) Create(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFSVolume, err error) {
|
||||
result = &v1alpha1.ZFSVolume{}
|
||||
func (c *zFSVolumes) Create(zFSVolume *v1.ZFSVolume) (result *v1.ZFSVolume, err error) {
|
||||
result = &v1.ZFSVolume{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -121,8 +121,8 @@ func (c *zFSVolumes) Create(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFS
|
|||
}
|
||||
|
||||
// Update takes the representation of a zFSVolume and updates it. Returns the server's representation of the zFSVolume, and an error, if there is any.
|
||||
func (c *zFSVolumes) Update(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFSVolume, err error) {
|
||||
result = &v1alpha1.ZFSVolume{}
|
||||
func (c *zFSVolumes) Update(zFSVolume *v1.ZFSVolume) (result *v1.ZFSVolume, err error) {
|
||||
result = &v1.ZFSVolume{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -136,8 +136,8 @@ func (c *zFSVolumes) Update(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFS
|
|||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *zFSVolumes) UpdateStatus(zFSVolume *v1alpha1.ZFSVolume) (result *v1alpha1.ZFSVolume, err error) {
|
||||
result = &v1alpha1.ZFSVolume{}
|
||||
func (c *zFSVolumes) UpdateStatus(zFSVolume *v1.ZFSVolume) (result *v1.ZFSVolume, err error) {
|
||||
result = &v1.ZFSVolume{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -150,7 +150,7 @@ func (c *zFSVolumes) UpdateStatus(zFSVolume *v1alpha1.ZFSVolume) (result *v1alph
|
|||
}
|
||||
|
||||
// Delete takes name of the zFSVolume and deletes it. Returns an error if one occurs.
|
||||
func (c *zFSVolumes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *zFSVolumes) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
|
|
@ -161,7 +161,7 @@ func (c *zFSVolumes) Delete(name string, options *v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *zFSVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *zFSVolumes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
|
|
@ -177,8 +177,8 @@ func (c *zFSVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched zFSVolume.
|
||||
func (c *zFSVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ZFSVolume, err error) {
|
||||
result = &v1alpha1.ZFSVolume{}
|
||||
func (c *zFSVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ZFSVolume, err error) {
|
||||
result = &v1.ZFSVolume{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("zfsvolumes").
|
||||
Loading…
Add table
Add a link
Reference in a new issue