generated code from the k8s 1.14 packages
Signed-off-by: travisn <tnielsen@redhat.com>
This commit is contained in:
51 files changed
+475
-114
No files matched your search
@@ -215,6 +215,13 @@ func (in *RackSpec) DeepCopyInto(out *RackSpec) {
|
||||
**out = **in
|
||||
}
|
||||
in.Storage.DeepCopyInto(&out.Storage)
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Placement != nil {
|
||||
in, out := &in.Placement, &out.Placement
|
||||
*out = new(v1alpha2.Placement)
|
||||
|
||||
@@ -256,6 +256,23 @@ func (in *ClusterList) DeepCopyObject() runtime.Object {
|
||||
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
||||
*out = *in
|
||||
in.Storage.DeepCopyInto(&out.Storage)
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.AnnotationsSpec, len(*in))
|
||||
for key, val := range *in {
|
||||
var outVal map[string]string
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
in, out := &val, &outVal
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
(*out)[key] = outVal
|
||||
}
|
||||
}
|
||||
if in.Placement != nil {
|
||||
in, out := &in.Placement, &out.Placement
|
||||
*out = make(v1alpha2.PlacementSpec, len(*in))
|
||||
@@ -410,6 +427,13 @@ func (in *ISCSIList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ISCSISpec) DeepCopyInto(out *ISCSISpec) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.TargetParams = in.TargetParams
|
||||
@@ -490,6 +514,13 @@ func (in *ISGWList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ISGWSpec) DeepCopyInto(out *ISGWSpec) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.ChunkCacheSize = in.ChunkCacheSize.DeepCopy()
|
||||
@@ -569,6 +600,13 @@ func (in *NFSList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *NFSSpec) DeepCopyInto(out *NFSSpec) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.ChunkCacheSize = in.ChunkCacheSize.DeepCopy()
|
||||
@@ -738,6 +776,13 @@ func (in *S3List) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *S3Spec) DeepCopyInto(out *S3Spec) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.ChunkCacheSize = in.ChunkCacheSize.DeepCopy()
|
||||
@@ -817,6 +862,13 @@ func (in *S3XList) DeepCopyObject() runtime.Object {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *S3XSpec) DeepCopyInto(out *S3XSpec) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(v1alpha2.Annotations, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
in.Placement.DeepCopyInto(&out.Placement)
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.ChunkCacheSize = in.ChunkCacheSize.DeepCopy()
|
||||
|
||||
@@ -35,27 +35,13 @@ import (
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
CassandraV1alpha1() cassandrav1alpha1.CassandraV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Cassandra() cassandrav1alpha1.CassandraV1alpha1Interface
|
||||
CephV1beta1() cephv1beta1.CephV1beta1Interface
|
||||
CephV1() cephv1.CephV1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Ceph() cephv1.CephV1Interface
|
||||
CockroachdbV1alpha1() cockroachdbv1alpha1.CockroachdbV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Cockroachdb() cockroachdbv1alpha1.CockroachdbV1alpha1Interface
|
||||
EdgefsV1alpha1() edgefsv1alpha1.EdgefsV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Edgefs() edgefsv1alpha1.EdgefsV1alpha1Interface
|
||||
MinioV1alpha1() miniov1alpha1.MinioV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Minio() miniov1alpha1.MinioV1alpha1Interface
|
||||
NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Nfs() nfsv1alpha1.NfsV1alpha1Interface
|
||||
RookV1alpha2() rookv1alpha2.RookV1alpha2Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Rook() rookv1alpha2.RookV1alpha2Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
@@ -77,12 +63,6 @@ func (c *Clientset) CassandraV1alpha1() cassandrav1alpha1.CassandraV1alpha1Inter
|
||||
return c.cassandraV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Cassandra retrieves the default version of CassandraClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Cassandra() cassandrav1alpha1.CassandraV1alpha1Interface {
|
||||
return c.cassandraV1alpha1
|
||||
}
|
||||
|
||||
// CephV1beta1 retrieves the CephV1beta1Client
|
||||
func (c *Clientset) CephV1beta1() cephv1beta1.CephV1beta1Interface {
|
||||
return c.cephV1beta1
|
||||
@@ -93,67 +73,31 @@ func (c *Clientset) CephV1() cephv1.CephV1Interface {
|
||||
return c.cephV1
|
||||
}
|
||||
|
||||
// Deprecated: Ceph retrieves the default version of CephClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Ceph() cephv1.CephV1Interface {
|
||||
return c.cephV1
|
||||
}
|
||||
|
||||
// CockroachdbV1alpha1 retrieves the CockroachdbV1alpha1Client
|
||||
func (c *Clientset) CockroachdbV1alpha1() cockroachdbv1alpha1.CockroachdbV1alpha1Interface {
|
||||
return c.cockroachdbV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Cockroachdb retrieves the default version of CockroachdbClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Cockroachdb() cockroachdbv1alpha1.CockroachdbV1alpha1Interface {
|
||||
return c.cockroachdbV1alpha1
|
||||
}
|
||||
|
||||
// EdgefsV1alpha1 retrieves the EdgefsV1alpha1Client
|
||||
func (c *Clientset) EdgefsV1alpha1() edgefsv1alpha1.EdgefsV1alpha1Interface {
|
||||
return c.edgefsV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Edgefs retrieves the default version of EdgefsClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Edgefs() edgefsv1alpha1.EdgefsV1alpha1Interface {
|
||||
return c.edgefsV1alpha1
|
||||
}
|
||||
|
||||
// MinioV1alpha1 retrieves the MinioV1alpha1Client
|
||||
func (c *Clientset) MinioV1alpha1() miniov1alpha1.MinioV1alpha1Interface {
|
||||
return c.minioV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Minio retrieves the default version of MinioClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Minio() miniov1alpha1.MinioV1alpha1Interface {
|
||||
return c.minioV1alpha1
|
||||
}
|
||||
|
||||
// NfsV1alpha1 retrieves the NfsV1alpha1Client
|
||||
func (c *Clientset) NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface {
|
||||
return c.nfsV1alpha1
|
||||
}
|
||||
|
||||
// Deprecated: Nfs retrieves the default version of NfsClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Nfs() nfsv1alpha1.NfsV1alpha1Interface {
|
||||
return c.nfsV1alpha1
|
||||
}
|
||||
|
||||
// RookV1alpha2 retrieves the RookV1alpha2Client
|
||||
func (c *Clientset) RookV1alpha2() rookv1alpha2.RookV1alpha2Interface {
|
||||
return c.rookV1alpha2
|
||||
}
|
||||
|
||||
// Deprecated: Rook retrieves the default version of RookClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Rook() rookv1alpha2.RookV1alpha2Interface {
|
||||
return c.rookV1alpha2
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
|
||||
@@ -90,11 +90,6 @@ func (c *Clientset) CassandraV1alpha1() cassandrav1alpha1.CassandraV1alpha1Inter
|
||||
return &fakecassandrav1alpha1.FakeCassandraV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Cassandra retrieves the CassandraV1alpha1Client
|
||||
func (c *Clientset) Cassandra() cassandrav1alpha1.CassandraV1alpha1Interface {
|
||||
return &fakecassandrav1alpha1.FakeCassandraV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// CephV1beta1 retrieves the CephV1beta1Client
|
||||
func (c *Clientset) CephV1beta1() cephv1beta1.CephV1beta1Interface {
|
||||
return &fakecephv1beta1.FakeCephV1beta1{Fake: &c.Fake}
|
||||
@@ -105,57 +100,27 @@ func (c *Clientset) CephV1() cephv1.CephV1Interface {
|
||||
return &fakecephv1.FakeCephV1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Ceph retrieves the CephV1Client
|
||||
func (c *Clientset) Ceph() cephv1.CephV1Interface {
|
||||
return &fakecephv1.FakeCephV1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// CockroachdbV1alpha1 retrieves the CockroachdbV1alpha1Client
|
||||
func (c *Clientset) CockroachdbV1alpha1() cockroachdbv1alpha1.CockroachdbV1alpha1Interface {
|
||||
return &fakecockroachdbv1alpha1.FakeCockroachdbV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Cockroachdb retrieves the CockroachdbV1alpha1Client
|
||||
func (c *Clientset) Cockroachdb() cockroachdbv1alpha1.CockroachdbV1alpha1Interface {
|
||||
return &fakecockroachdbv1alpha1.FakeCockroachdbV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// EdgefsV1alpha1 retrieves the EdgefsV1alpha1Client
|
||||
func (c *Clientset) EdgefsV1alpha1() edgefsv1alpha1.EdgefsV1alpha1Interface {
|
||||
return &fakeedgefsv1alpha1.FakeEdgefsV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Edgefs retrieves the EdgefsV1alpha1Client
|
||||
func (c *Clientset) Edgefs() edgefsv1alpha1.EdgefsV1alpha1Interface {
|
||||
return &fakeedgefsv1alpha1.FakeEdgefsV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// MinioV1alpha1 retrieves the MinioV1alpha1Client
|
||||
func (c *Clientset) MinioV1alpha1() miniov1alpha1.MinioV1alpha1Interface {
|
||||
return &fakeminiov1alpha1.FakeMinioV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Minio retrieves the MinioV1alpha1Client
|
||||
func (c *Clientset) Minio() miniov1alpha1.MinioV1alpha1Interface {
|
||||
return &fakeminiov1alpha1.FakeMinioV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// NfsV1alpha1 retrieves the NfsV1alpha1Client
|
||||
func (c *Clientset) NfsV1alpha1() nfsv1alpha1.NfsV1alpha1Interface {
|
||||
return &fakenfsv1alpha1.FakeNfsV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Nfs retrieves the NfsV1alpha1Client
|
||||
func (c *Clientset) Nfs() nfsv1alpha1.NfsV1alpha1Interface {
|
||||
return &fakenfsv1alpha1.FakeNfsV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// RookV1alpha2 retrieves the RookV1alpha2Client
|
||||
func (c *Clientset) RookV1alpha2() rookv1alpha2.RookV1alpha2Interface {
|
||||
return &fakerookv1alpha2.FakeRookV1alpha2{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Rook retrieves the RookV1alpha2Client
|
||||
func (c *Clientset) Rook() rookv1alpha2.RookV1alpha2Interface {
|
||||
return &fakerookv1alpha2.FakeRookV1alpha2{Fake: &c.Fake}
|
||||
}
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/cassandra.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Clu
|
||||
|
||||
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
|
||||
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ClusterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusters.
|
||||
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
||||
// Patch applies the patch and returns the patched cluster.
|
||||
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{})
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cluster{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephBlockPools) Get(name string, options metav1.GetOptions) (result *v1
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephBlockPools that match those selectors.
|
||||
func (c *cephBlockPools) List(opts metav1.ListOptions) (result *v1.CephBlockPoolList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephBlockPoolList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephblockpools").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephBlockPools) List(opts metav1.ListOptions) (result *v1.CephBlockPool
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephBlockPools.
|
||||
func (c *cephBlockPools) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephblockpools").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephBlockPools) Delete(name string, options *metav1.DeleteOptions) erro
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephBlockPools) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephblockpools").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephClusters) Get(name string, options metav1.GetOptions) (result *v1.C
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephClusters that match those selectors.
|
||||
func (c *cephClusters) List(opts metav1.ListOptions) (result *v1.CephClusterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephClusterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephclusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephClusters) List(opts metav1.ListOptions) (result *v1.CephClusterList
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephClusters.
|
||||
func (c *cephClusters) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephclusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephClusters) Delete(name string, options *metav1.DeleteOptions) error
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephClusters) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephclusters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephFilesystems) Get(name string, options metav1.GetOptions) (result *v
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephFilesystems that match those selectors.
|
||||
func (c *cephFilesystems) List(opts metav1.ListOptions) (result *v1.CephFilesystemList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephFilesystemList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephfilesystems").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephFilesystems) List(opts metav1.ListOptions) (result *v1.CephFilesyst
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephFilesystems.
|
||||
func (c *cephFilesystems) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephfilesystems").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephFilesystems) Delete(name string, options *metav1.DeleteOptions) err
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephFilesystems) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephfilesystems").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephNFSs) Get(name string, options metav1.GetOptions) (result *v1.CephN
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephNFSs that match those selectors.
|
||||
func (c *cephNFSs) List(opts metav1.ListOptions) (result *v1.CephNFSList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephNFSList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephnfss").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephNFSs) List(opts metav1.ListOptions) (result *v1.CephNFSList, err er
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephNFSs.
|
||||
func (c *cephNFSs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephnfss").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephNFSs) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephNFSs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephnfss").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephObjectStores) Get(name string, options metav1.GetOptions) (result *
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephObjectStores that match those selectors.
|
||||
func (c *cephObjectStores) List(opts metav1.ListOptions) (result *v1.CephObjectStoreList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephObjectStoreList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephObjectStores) List(opts metav1.ListOptions) (result *v1.CephObjectS
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephObjectStores.
|
||||
func (c *cephObjectStores) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephObjectStores) Delete(name string, options *metav1.DeleteOptions) er
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephObjectStores) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstores").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *cephObjectStoreUsers) Get(name string, options metav1.GetOptions) (resu
|
||||
|
||||
// List takes label and field selectors, and returns the list of CephObjectStoreUsers that match those selectors.
|
||||
func (c *cephObjectStoreUsers) List(opts metav1.ListOptions) (result *v1.CephObjectStoreUserList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CephObjectStoreUserList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstoreusers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *cephObjectStoreUsers) List(opts metav1.ListOptions) (result *v1.CephObj
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cephObjectStoreUsers.
|
||||
func (c *cephObjectStoreUsers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstoreusers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *cephObjectStoreUsers) Delete(name string, options *metav1.DeleteOptions
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *cephObjectStoreUsers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("cephobjectstoreusers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeCephBlockPools) DeleteCollection(options *v1.DeleteOptions, listOpt
|
||||
// Patch applies the patch and returns the patched cephBlockPool.
|
||||
func (c *FakeCephBlockPools) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephBlockPool, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephblockpoolsResource, c.ns, name, data, subresources...), &cephrookiov1.CephBlockPool{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephblockpoolsResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephBlockPool{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeCephClusters) DeleteCollection(options *v1.DeleteOptions, listOptio
|
||||
// Patch applies the patch and returns the patched cephCluster.
|
||||
func (c *FakeCephClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephCluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephclustersResource, c.ns, name, data, subresources...), &cephrookiov1.CephCluster{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephclustersResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephCluster{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeCephFilesystems) DeleteCollection(options *v1.DeleteOptions, listOp
|
||||
// Patch applies the patch and returns the patched cephFilesystem.
|
||||
func (c *FakeCephFilesystems) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephFilesystem, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephfilesystemsResource, c.ns, name, data, subresources...), &cephrookiov1.CephFilesystem{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephfilesystemsResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephFilesystem{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeCephNFSs) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
||||
// Patch applies the patch and returns the patched cephNFS.
|
||||
func (c *FakeCephNFSs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephNFS, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephnfssResource, c.ns, name, data, subresources...), &cephrookiov1.CephNFS{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephnfssResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephNFS{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeCephObjectStores) DeleteCollection(options *v1.DeleteOptions, listO
|
||||
// Patch applies the patch and returns the patched cephObjectStore.
|
||||
func (c *FakeCephObjectStores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephObjectStore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephobjectstoresResource, c.ns, name, data, subresources...), &cephrookiov1.CephObjectStore{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephobjectstoresResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephObjectStore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func (c *FakeCephObjectStoreUsers) DeleteCollection(options *v1.DeleteOptions, l
|
||||
// Patch applies the patch and returns the patched cephObjectStoreUser.
|
||||
func (c *FakeCephObjectStoreUsers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cephrookiov1.CephObjectStoreUser, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cephobjectstoreusersResource, c.ns, name, data, subresources...), &cephrookiov1.CephObjectStoreUser{})
|
||||
Invokes(testing.NewPatchSubresourceAction(cephobjectstoreusersResource, c.ns, name, pt, data, subresources...), &cephrookiov1.CephObjectStoreUser{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1beta1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1beta1.Clus
|
||||
|
||||
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
|
||||
func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ClusterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err e
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusters.
|
||||
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
||||
// Patch applies the patch and returns the patched cluster.
|
||||
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1beta1.Cluster{})
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1beta1.Cluster{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeFilesystems) DeleteCollection(options *v1.DeleteOptions, listOption
|
||||
// Patch applies the patch and returns the patched filesystem.
|
||||
func (c *FakeFilesystems) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Filesystem, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(filesystemsResource, c.ns, name, data, subresources...), &v1beta1.Filesystem{})
|
||||
Invokes(testing.NewPatchSubresourceAction(filesystemsResource, c.ns, name, pt, data, subresources...), &v1beta1.Filesystem{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeObjectStores) DeleteCollection(options *v1.DeleteOptions, listOptio
|
||||
// Patch applies the patch and returns the patched objectStore.
|
||||
func (c *FakeObjectStores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ObjectStore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoresResource, c.ns, name, data, subresources...), &v1beta1.ObjectStore{})
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoresResource, c.ns, name, pt, data, subresources...), &v1beta1.ObjectStore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func (c *FakeObjectStoreUsers) DeleteCollection(options *v1.DeleteOptions, listO
|
||||
// Patch applies the patch and returns the patched objectStoreUser.
|
||||
func (c *FakeObjectStoreUsers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ObjectStoreUser, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoreusersResource, c.ns, name, data, subresources...), &v1beta1.ObjectStoreUser{})
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoreusersResource, c.ns, name, pt, data, subresources...), &v1beta1.ObjectStoreUser{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakePools) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L
|
||||
// Patch applies the patch and returns the patched pool.
|
||||
func (c *FakePools) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Pool, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(poolsResource, c.ns, name, data, subresources...), &v1beta1.Pool{})
|
||||
Invokes(testing.NewPatchSubresourceAction(poolsResource, c.ns, name, pt, data, subresources...), &v1beta1.Pool{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1beta1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *filesystems) Get(name string, options v1.GetOptions) (result *v1beta1.F
|
||||
|
||||
// List takes label and field selectors, and returns the list of Filesystems that match those selectors.
|
||||
func (c *filesystems) List(opts v1.ListOptions) (result *v1beta1.FilesystemList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.FilesystemList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("filesystems").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *filesystems) List(opts v1.ListOptions) (result *v1beta1.FilesystemList,
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested filesystems.
|
||||
func (c *filesystems) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("filesystems").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *filesystems) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *filesystems) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("filesystems").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1beta1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *objectStores) Get(name string, options v1.GetOptions) (result *v1beta1.
|
||||
|
||||
// List takes label and field selectors, and returns the list of ObjectStores that match those selectors.
|
||||
func (c *objectStores) List(opts v1.ListOptions) (result *v1beta1.ObjectStoreList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ObjectStoreList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *objectStores) List(opts v1.ListOptions) (result *v1beta1.ObjectStoreLis
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested objectStores.
|
||||
func (c *objectStores) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *objectStores) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *objectStores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1beta1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *objectStoreUsers) Get(name string, options v1.GetOptions) (result *v1be
|
||||
|
||||
// List takes label and field selectors, and returns the list of ObjectStoreUsers that match those selectors.
|
||||
func (c *objectStoreUsers) List(opts v1.ListOptions) (result *v1beta1.ObjectStoreUserList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ObjectStoreUserList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstoreusers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *objectStoreUsers) List(opts v1.ListOptions) (result *v1beta1.ObjectStor
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested objectStoreUsers.
|
||||
func (c *objectStoreUsers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstoreusers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *objectStoreUsers) Delete(name string, options *v1.DeleteOptions) error
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *objectStoreUsers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstoreusers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1beta1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *pools) Get(name string, options v1.GetOptions) (result *v1beta1.Pool, e
|
||||
|
||||
// List takes label and field selectors, and returns the list of Pools that match those selectors.
|
||||
func (c *pools) List(opts v1.ListOptions) (result *v1beta1.PoolList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.PoolList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("pools").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *pools) List(opts v1.ListOptions) (result *v1beta1.PoolList, err error)
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested pools.
|
||||
func (c *pools) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("pools").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *pools) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *pools) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("pools").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/cockroachdb.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Clu
|
||||
|
||||
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
|
||||
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ClusterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusters.
|
||||
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
||||
// Patch applies the patch and returns the patched cluster.
|
||||
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{})
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cluster{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *clusters) Get(name string, options v1.GetOptions) (result *v1alpha1.Clu
|
||||
|
||||
// List takes label and field selectors, and returns the list of Clusters that match those selectors.
|
||||
func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ClusterList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *clusters) List(opts v1.ListOptions) (result *v1alpha1.ClusterList, err
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusters.
|
||||
func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("clusters").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
||||
// Patch applies the patch and returns the patched cluster.
|
||||
func (c *FakeClusters) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Cluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, data, subresources...), &v1alpha1.Cluster{})
|
||||
Invokes(testing.NewPatchSubresourceAction(clustersResource, c.ns, name, pt, data, subresources...), &v1alpha1.Cluster{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeISCSIs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
|
||||
// Patch applies the patch and returns the patched iSCSI.
|
||||
func (c *FakeISCSIs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ISCSI, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(iscsisResource, c.ns, name, data, subresources...), &v1alpha1.ISCSI{})
|
||||
Invokes(testing.NewPatchSubresourceAction(iscsisResource, c.ns, name, pt, data, subresources...), &v1alpha1.ISCSI{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeISGWs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.L
|
||||
// Patch applies the patch and returns the patched iSGW.
|
||||
func (c *FakeISGWs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ISGW, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(isgwsResource, c.ns, name, data, subresources...), &v1alpha1.ISGW{})
|
||||
Invokes(testing.NewPatchSubresourceAction(isgwsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ISGW{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeNFSs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
||||
// Patch applies the patch and returns the patched nFS.
|
||||
func (c *FakeNFSs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NFS, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(nfssResource, c.ns, name, data, subresources...), &v1alpha1.NFS{})
|
||||
Invokes(testing.NewPatchSubresourceAction(nfssResource, c.ns, name, pt, data, subresources...), &v1alpha1.NFS{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeS3s) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Lis
|
||||
// Patch applies the patch and returns the patched s3.
|
||||
func (c *FakeS3s) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.S3, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(s3sResource, c.ns, name, data, subresources...), &v1alpha1.S3{})
|
||||
Invokes(testing.NewPatchSubresourceAction(s3sResource, c.ns, name, pt, data, subresources...), &v1alpha1.S3{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeS3Xs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
||||
// Patch applies the patch and returns the patched s3X.
|
||||
func (c *FakeS3Xs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.S3X, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(s3xsResource, c.ns, name, data, subresources...), &v1alpha1.S3X{})
|
||||
Invokes(testing.NewPatchSubresourceAction(s3xsResource, c.ns, name, pt, data, subresources...), &v1alpha1.S3X{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeSWIFTs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.
|
||||
// Patch applies the patch and returns the patched sWIFT.
|
||||
func (c *FakeSWIFTs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.SWIFT, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(swiftsResource, c.ns, name, data, subresources...), &v1alpha1.SWIFT{})
|
||||
Invokes(testing.NewPatchSubresourceAction(swiftsResource, c.ns, name, pt, data, subresources...), &v1alpha1.SWIFT{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *iSCSIs) Get(name string, options v1.GetOptions) (result *v1alpha1.ISCSI
|
||||
|
||||
// List takes label and field selectors, and returns the list of ISCSIs that match those selectors.
|
||||
func (c *iSCSIs) List(opts v1.ListOptions) (result *v1alpha1.ISCSIList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ISCSIList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("iscsis").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *iSCSIs) List(opts v1.ListOptions) (result *v1alpha1.ISCSIList, err erro
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested iSCSIs.
|
||||
func (c *iSCSIs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("iscsis").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *iSCSIs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *iSCSIs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("iscsis").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *iSGWs) Get(name string, options v1.GetOptions) (result *v1alpha1.ISGW,
|
||||
|
||||
// List takes label and field selectors, and returns the list of ISGWs that match those selectors.
|
||||
func (c *iSGWs) List(opts v1.ListOptions) (result *v1alpha1.ISGWList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ISGWList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("isgws").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *iSGWs) List(opts v1.ListOptions) (result *v1alpha1.ISGWList, err error)
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested iSGWs.
|
||||
func (c *iSGWs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("isgws").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *iSGWs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *iSGWs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("isgws").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *nFSs) Get(name string, options v1.GetOptions) (result *v1alpha1.NFS, er
|
||||
|
||||
// List takes label and field selectors, and returns the list of NFSs that match those selectors.
|
||||
func (c *nFSs) List(opts v1.ListOptions) (result *v1alpha1.NFSList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.NFSList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("nfss").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *nFSs) List(opts v1.ListOptions) (result *v1alpha1.NFSList, err error) {
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested nFSs.
|
||||
func (c *nFSs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("nfss").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *nFSs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *nFSs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("nfss").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *s3s) Get(name string, options v1.GetOptions) (result *v1alpha1.S3, err
|
||||
|
||||
// List takes label and field selectors, and returns the list of S3s that match those selectors.
|
||||
func (c *s3s) List(opts v1.ListOptions) (result *v1alpha1.S3List, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.S3List{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("s3s").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *s3s) List(opts v1.ListOptions) (result *v1alpha1.S3List, err error) {
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested s3s.
|
||||
func (c *s3s) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("s3s").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *s3s) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *s3s) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("s3s").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *s3Xs) Get(name string, options v1.GetOptions) (result *v1alpha1.S3X, er
|
||||
|
||||
// List takes label and field selectors, and returns the list of S3Xs that match those selectors.
|
||||
func (c *s3Xs) List(opts v1.ListOptions) (result *v1alpha1.S3XList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.S3XList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("s3xs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *s3Xs) List(opts v1.ListOptions) (result *v1alpha1.S3XList, err error) {
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested s3Xs.
|
||||
func (c *s3Xs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("s3xs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *s3Xs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *s3Xs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("s3xs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/edgefs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *sWIFTs) Get(name string, options v1.GetOptions) (result *v1alpha1.SWIFT
|
||||
|
||||
// List takes label and field selectors, and returns the list of SWIFTs that match those selectors.
|
||||
func (c *sWIFTs) List(opts v1.ListOptions) (result *v1alpha1.SWIFTList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.SWIFTList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("swifts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *sWIFTs) List(opts v1.ListOptions) (result *v1alpha1.SWIFTList, err erro
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested sWIFTs.
|
||||
func (c *sWIFTs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("swifts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *sWIFTs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *sWIFTs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("swifts").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ func (c *FakeObjectStores) DeleteCollection(options *v1.DeleteOptions, listOptio
|
||||
// Patch applies the patch and returns the patched objectStore.
|
||||
func (c *FakeObjectStores) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ObjectStore, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoresResource, c.ns, name, data, subresources...), &v1alpha1.ObjectStore{})
|
||||
Invokes(testing.NewPatchSubresourceAction(objectstoresResource, c.ns, name, pt, data, subresources...), &v1alpha1.ObjectStore{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/minio.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *objectStores) Get(name string, options v1.GetOptions) (result *v1alpha1
|
||||
|
||||
// List takes label and field selectors, and returns the list of ObjectStores that match those selectors.
|
||||
func (c *objectStores) List(opts v1.ListOptions) (result *v1alpha1.ObjectStoreList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ObjectStoreList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *objectStores) List(opts v1.ListOptions) (result *v1alpha1.ObjectStoreLi
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested objectStores.
|
||||
func (c *objectStores) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *objectStores) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *objectStores) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("objectstores").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeNFSServers) DeleteCollection(options *v1.DeleteOptions, listOptions
|
||||
// Patch applies the patch and returns the patched nFSServer.
|
||||
func (c *FakeNFSServers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NFSServer, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(nfsserversResource, c.ns, name, data, subresources...), &v1alpha1.NFSServer{})
|
||||
Invokes(testing.NewPatchSubresourceAction(nfsserversResource, c.ns, name, pt, data, subresources...), &v1alpha1.NFSServer{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "github.com/rook/rook/pkg/apis/nfs.rook.io/v1alpha1"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *nFSServers) Get(name string, options v1.GetOptions) (result *v1alpha1.N
|
||||
|
||||
// List takes label and field selectors, and returns the list of NFSServers that match those selectors.
|
||||
func (c *nFSServers) List(opts v1.ListOptions) (result *v1alpha1.NFSServerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.NFSServerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("nfsservers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *nFSServers) List(opts v1.ListOptions) (result *v1alpha1.NFSServerList,
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested nFSServers.
|
||||
func (c *nFSServers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("nfsservers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *nFSServers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *nFSServers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("nfsservers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -119,7 +119,7 @@ func (c *FakeVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1
|
||||
// Patch applies the patch and returns the patched volume.
|
||||
func (c *FakeVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha2.Volume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(volumesResource, c.ns, name, data, subresources...), &v1alpha2.Volume{})
|
||||
Invokes(testing.NewPatchSubresourceAction(volumesResource, c.ns, name, pt, data, subresources...), &v1alpha2.Volume{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha2 "github.com/rook/rook/pkg/apis/rook.io/v1alpha2"
|
||||
scheme "github.com/rook/rook/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -75,11 +77,16 @@ func (c *volumes) Get(name string, options v1.GetOptions) (result *v1alpha2.Volu
|
||||
|
||||
// List takes label and field selectors, and returns the list of Volumes that match those selectors.
|
||||
func (c *volumes) List(opts v1.ListOptions) (result *v1alpha2.VolumeList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.VolumeList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
@@ -87,11 +94,16 @@ func (c *volumes) List(opts v1.ListOptions) (result *v1alpha2.VolumeList, err er
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumes.
|
||||
func (c *volumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("volumes").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
@@ -133,10 +145,15 @@ func (c *volumes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *volumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("volumes").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
@@ -27,6 +27,7 @@ import (
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||
@@ -35,4 +36,5 @@ type SharedInformerFactory interface {
|
||||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
||||
Reference in new issue
Block a user