mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
chore(refactor): Remove MountInfo struct from api (#225)
Signed-off-by: Gagandeep Singh <codegagan@gmail.com>
This commit is contained in:
parent
55a155c4a5
commit
3da4f7308e
8 changed files with 32 additions and 104 deletions
|
|
@ -42,27 +42,6 @@ type ZFSVolume struct {
|
|||
Status VolStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// MountInfo contains the volume related info
|
||||
// for all types of volumes in ZFSVolume
|
||||
type MountInfo struct {
|
||||
// FSType of a volume will specify the
|
||||
// format type - ext4(default), xfs of PV
|
||||
FSType string `json:"fsType"`
|
||||
|
||||
// AccessMode of a volume will hold the
|
||||
// access mode of the volume
|
||||
AccessModes []string `json:"accessModes"`
|
||||
|
||||
// MountPath of the volume will hold the
|
||||
// path on which the volume is mounted
|
||||
// on that node
|
||||
MountPath string `json:"mountPath"`
|
||||
|
||||
// MountOptions specifies the options with
|
||||
// which mount needs to be attempted
|
||||
MountOptions []string `json:"mountOptions"`
|
||||
}
|
||||
|
||||
// ZFSVolumeList is a list of ZFSVolume resources
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +resource:path=zfsvolumes
|
||||
|
|
|
|||
|
|
@ -24,32 +24,6 @@ import (
|
|||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MountInfo) DeepCopyInto(out *MountInfo) {
|
||||
*out = *in
|
||||
if in.AccessModes != nil {
|
||||
in, out := &in.AccessModes, &out.AccessModes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.MountOptions != nil {
|
||||
in, out := &in.MountOptions, &out.MountOptions
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountInfo.
|
||||
func (in *MountInfo) DeepCopy() *MountInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MountInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SnapStatus) DeepCopyInto(out *SnapStatus) {
|
||||
*out = *in
|
||||
|
|
|
|||
|
|
@ -41,27 +41,6 @@ type ZFSVolume struct {
|
|||
Status VolStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// MountInfo contains the volume related info
|
||||
// for all types of volumes in ZFSVolume
|
||||
type MountInfo struct {
|
||||
// FSType of a volume will specify the
|
||||
// format type - ext4(default), xfs of PV
|
||||
FSType string `json:"fsType"`
|
||||
|
||||
// AccessMode of a volume will hold the
|
||||
// access mode of the volume
|
||||
AccessModes []string `json:"accessModes"`
|
||||
|
||||
// MountPath of the volume will hold the
|
||||
// path on which the volume is mounted
|
||||
// on that node
|
||||
MountPath string `json:"mountPath"`
|
||||
|
||||
// MountOptions specifies the options with
|
||||
// which mount needs to be attempted
|
||||
MountOptions []string `json:"mountOptions"`
|
||||
}
|
||||
|
||||
// ZFSVolumeList is a list of ZFSVolume resources
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +resource:path=zfsvolumes
|
||||
|
|
|
|||
|
|
@ -24,32 +24,6 @@ import (
|
|||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *MountInfo) DeepCopyInto(out *MountInfo) {
|
||||
*out = *in
|
||||
if in.AccessModes != nil {
|
||||
in, out := &in.AccessModes, &out.AccessModes
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.MountOptions != nil {
|
||||
in, out := &in.MountOptions, &out.MountOptions
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountInfo.
|
||||
func (in *MountInfo) DeepCopy() *MountInfo {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(MountInfo)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SnapStatus) DeepCopyInto(out *SnapStatus) {
|
||||
*out = *in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue