Update to API for static group volume snapshots

This commit is contained in:
Raunak Pradip Shah
2023-12-05 14:22:02 -08:00
parent b44a6b006e
commit bffa5ae25f
4 changed files with 72 additions and 15 deletions

View File

@@ -354,10 +354,27 @@ type VolumeGroupSnapshotContentSource struct {
// +optional
PersistentVolumeNames []string `json:"persistentVolumeNames,omitempty" protobuf:"bytes,1,opt,name=persistentVolumeNames"`
// GroupSnapshotHandleSource specifies the CSI "group_snapshot_id" of a pre-existing
// group snapshot and a list of CSI "snapshot_id" of pre-existing snapshots
// on the underlying storage system for which a Kubernetes object
// representation was (or should be) created.
// This field is immutable.
// +optional
GroupSnapshotHandleSource *VolumeGroupSnapshotHandleSource `json:"groupSnapshotHandleSource,omitempty" protobuf:"bytes,2,opt,name=groupSnapshotHandleSource"`
}
type VolumeGroupSnapshotHandleSource struct {
// VolumeGroupSnapshotHandle specifies the CSI "group_snapshot_id" of a pre-existing
// group snapshot on the underlying storage system for which a Kubernetes object
// representation was (or should be) created.
// This field is immutable.
// +optional
VolumeGroupSnapshotHandle *string `json:"volumeGroupSnapshotHandle,omitempty" protobuf:"bytes,2,opt,name=volumeGroupSnapshotHandle"`
// Required.
VolumeGroupSnapshotHandle string `json:"volumeGroupSnapshotHandle" protobuf:"bytes,1,opt,name=volumeGroupSnapshotHandle"`
// VolumeSnapshotHandles is a list of CSI "snapshot_id" of pre-existing
// snapshots on the underlying storage system for which Kubernetes objects
// representation were (or should be) created.
// This field is immutable.
// Required.
VolumeSnapshotHandles []string `json:"volumeSnapshotHandles" protobuf:"bytes,2,opt,name=volumeSnapshotHandles"`
}

View File

@@ -198,10 +198,10 @@ func (in *VolumeGroupSnapshotContentSource) DeepCopyInto(out *VolumeGroupSnapsho
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.VolumeGroupSnapshotHandle != nil {
in, out := &in.VolumeGroupSnapshotHandle, &out.VolumeGroupSnapshotHandle
*out = new(string)
**out = **in
if in.GroupSnapshotHandleSource != nil {
in, out := &in.GroupSnapshotHandleSource, &out.GroupSnapshotHandleSource
*out = new(VolumeGroupSnapshotHandleSource)
(*in).DeepCopyInto(*out)
}
return
}
@@ -280,6 +280,27 @@ func (in *VolumeGroupSnapshotContentStatus) DeepCopy() *VolumeGroupSnapshotConte
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeGroupSnapshotHandleSource) DeepCopyInto(out *VolumeGroupSnapshotHandleSource) {
*out = *in
if in.VolumeSnapshotHandles != nil {
in, out := &in.VolumeSnapshotHandles, &out.VolumeSnapshotHandles
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeGroupSnapshotHandleSource.
func (in *VolumeGroupSnapshotHandleSource) DeepCopy() *VolumeGroupSnapshotHandleSource {
if in == nil {
return nil
}
out := new(VolumeGroupSnapshotHandleSource)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeGroupSnapshotList) DeepCopyInto(out *VolumeGroupSnapshotList) {
*out = *in