Refactor snapshot error to utils.go

This commit is contained in:
Raunak Pradip Shah
2023-03-01 11:29:13 +05:30
parent 9ce31d0bf8
commit 69b054d1ed
33 changed files with 137 additions and 243 deletions

View File

@@ -22,6 +22,7 @@ limitations under the License.
package v1
import (
apis "github.com/kubernetes-csi/external-snapshotter/client/v6/apis"
corev1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -268,7 +269,7 @@ func (in *VolumeSnapshotContentStatus) DeepCopyInto(out *VolumeSnapshotContentSt
}
if in.Error != nil {
in, out := &in.Error, &out.Error
*out = new(VolumeSnapshotError)
*out = new(apis.VolumeSnapshotError)
(*in).DeepCopyInto(*out)
}
if in.VolumeGroupSnapshotContentName != nil {
@@ -289,31 +290,6 @@ func (in *VolumeSnapshotContentStatus) DeepCopy() *VolumeSnapshotContentStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeSnapshotError) DeepCopyInto(out *VolumeSnapshotError) {
*out = *in
if in.Time != nil {
in, out := &in.Time, &out.Time
*out = (*in).DeepCopy()
}
if in.Message != nil {
in, out := &in.Message, &out.Message
*out = new(string)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSnapshotError.
func (in *VolumeSnapshotError) DeepCopy() *VolumeSnapshotError {
if in == nil {
return nil
}
out := new(VolumeSnapshotError)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeSnapshotList) DeepCopyInto(out *VolumeSnapshotList) {
*out = *in
@@ -419,7 +395,7 @@ func (in *VolumeSnapshotStatus) DeepCopyInto(out *VolumeSnapshotStatus) {
}
if in.Error != nil {
in, out := &in.Error, &out.Error
*out = new(VolumeSnapshotError)
*out = new(apis.VolumeSnapshotError)
(*in).DeepCopyInto(*out)
}
if in.VolumeGroupSnapshotName != nil {