diff --git a/api/v1alpha1/conversion.go b/api/v1alpha1/conversion.go index 8afba1a4..fd10b5f4 100644 --- a/api/v1alpha1/conversion.go +++ b/api/v1alpha1/conversion.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" logf "sigs.k8s.io/controller-runtime/pkg/log" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" ) @@ -34,14 +34,14 @@ var convertlog = logf.Log.V(2).WithName("convert-v1alpha1") func (src *NnfAccess) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfAccess To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfAccess) + dst := dstRaw.(*nnfv1alpha4.NnfAccess) - if err := Convert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfAccess_To_v1alpha4_NnfAccess(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfAccess{} + restored := &nnfv1alpha4.NnfAccess{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -53,10 +53,10 @@ func (src *NnfAccess) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfAccess) + src := srcRaw.(*nnfv1alpha4.NnfAccess) convertlog.Info("Convert NnfAccess From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfAccess_To_v1alpha1_NnfAccess(src, dst, nil); err != nil { return err } @@ -66,14 +66,14 @@ func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfContainerProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfContainerProfile) + dst := dstRaw.(*nnfv1alpha4.NnfContainerProfile) - if err := Convert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfContainerProfile{} + restored := &nnfv1alpha4.NnfContainerProfile{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -85,10 +85,10 @@ func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfContainerProfile) + src := srcRaw.(*nnfv1alpha4.NnfContainerProfile) convertlog.Info("Convert NnfContainerProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(src, dst, nil); err != nil { return err } @@ -98,14 +98,14 @@ func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovement To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovement) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovement) - if err := Convert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfDataMovement_To_v1alpha4_NnfDataMovement(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovement{} + restored := &nnfv1alpha4.NnfDataMovement{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -117,10 +117,10 @@ func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovement) + src := srcRaw.(*nnfv1alpha4.NnfDataMovement) convertlog.Info("Convert NnfDataMovement From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovement_To_v1alpha1_NnfDataMovement(src, dst, nil); err != nil { return err } @@ -130,14 +130,14 @@ func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovementManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementManager) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementManager) - if err := Convert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementManager{} + restored := &nnfv1alpha4.NnfDataMovementManager{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -149,10 +149,10 @@ func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovementManager) + src := srcRaw.(*nnfv1alpha4.NnfDataMovementManager) convertlog.Info("Convert NnfDataMovementManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(src, dst, nil); err != nil { return err } @@ -162,14 +162,14 @@ func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovementProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementProfile) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementProfile) - if err := Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementProfile{} + restored := &nnfv1alpha4.NnfDataMovementProfile{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -181,10 +181,10 @@ func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovementProfile) + src := srcRaw.(*nnfv1alpha4.NnfDataMovementProfile) convertlog.Info("Convert NnfDataMovementProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(src, dst, nil); err != nil { return err } @@ -194,14 +194,14 @@ func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfLustreMGT To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfLustreMGT) + dst := dstRaw.(*nnfv1alpha4.NnfLustreMGT) - if err := Convert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfLustreMGT{} + restored := &nnfv1alpha4.NnfLustreMGT{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -213,10 +213,10 @@ func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfLustreMGT) + src := srcRaw.(*nnfv1alpha4.NnfLustreMGT) convertlog.Info("Convert NnfLustreMGT From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(src, dst, nil); err != nil { return err } @@ -226,14 +226,14 @@ func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNode To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNode) + dst := dstRaw.(*nnfv1alpha4.NnfNode) - if err := Convert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfNode_To_v1alpha4_NnfNode(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNode{} + restored := &nnfv1alpha4.NnfNode{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -245,10 +245,10 @@ func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNode) + src := srcRaw.(*nnfv1alpha4.NnfNode) convertlog.Info("Convert NnfNode From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNode_To_v1alpha1_NnfNode(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNode_To_v1alpha1_NnfNode(src, dst, nil); err != nil { return err } @@ -258,14 +258,14 @@ func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeBlockStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeBlockStorage) + dst := dstRaw.(*nnfv1alpha4.NnfNodeBlockStorage) - if err := Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeBlockStorage{} + restored := &nnfv1alpha4.NnfNodeBlockStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -277,10 +277,10 @@ func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeBlockStorage) + src := srcRaw.(*nnfv1alpha4.NnfNodeBlockStorage) convertlog.Info("Convert NnfNodeBlockStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(src, dst, nil); err != nil { return err } @@ -290,14 +290,14 @@ func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeECData To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeECData) + dst := dstRaw.(*nnfv1alpha4.NnfNodeECData) - if err := Convert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfNodeECData_To_v1alpha4_NnfNodeECData(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeECData{} + restored := &nnfv1alpha4.NnfNodeECData{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -309,10 +309,10 @@ func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeECData) + src := srcRaw.(*nnfv1alpha4.NnfNodeECData) convertlog.Info("Convert NnfNodeECData From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeECData_To_v1alpha1_NnfNodeECData(src, dst, nil); err != nil { return err } @@ -322,14 +322,14 @@ func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeStorage) + dst := dstRaw.(*nnfv1alpha4.NnfNodeStorage) - if err := Convert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeStorage{} + restored := &nnfv1alpha4.NnfNodeStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -341,10 +341,10 @@ func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeStorage) + src := srcRaw.(*nnfv1alpha4.NnfNodeStorage) convertlog.Info("Convert NnfNodeStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(src, dst, nil); err != nil { return err } @@ -354,14 +354,14 @@ func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfPortManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfPortManager) + dst := dstRaw.(*nnfv1alpha4.NnfPortManager) - if err := Convert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfPortManager_To_v1alpha4_NnfPortManager(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfPortManager{} + restored := &nnfv1alpha4.NnfPortManager{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -373,10 +373,10 @@ func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfPortManager) + src := srcRaw.(*nnfv1alpha4.NnfPortManager) convertlog.Info("Convert NnfPortManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfPortManager_To_v1alpha1_NnfPortManager(src, dst, nil); err != nil { return err } @@ -386,14 +386,14 @@ func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorage) + dst := dstRaw.(*nnfv1alpha4.NnfStorage) - if err := Convert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfStorage_To_v1alpha4_NnfStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfStorage{} + restored := &nnfv1alpha4.NnfStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -405,10 +405,10 @@ func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfStorage) + src := srcRaw.(*nnfv1alpha4.NnfStorage) convertlog.Info("Convert NnfStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfStorage_To_v1alpha1_NnfStorage(src, dst, nil); err != nil { return err } @@ -418,14 +418,14 @@ func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfStorageProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorageProfile) + dst := dstRaw.(*nnfv1alpha4.NnfStorageProfile) - if err := Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfStorageProfile{} + restored := &nnfv1alpha4.NnfStorageProfile{} hasAnno, err := utilconversion.UnmarshalData(src, restored) if err != nil { return err @@ -455,10 +455,10 @@ func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfStorageProfile) + src := srcRaw.(*nnfv1alpha4.NnfStorageProfile) convertlog.Info("Convert NnfStorageProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(src, dst, nil); err != nil { return err } @@ -468,14 +468,14 @@ func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfSystemStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfSystemStorage) + dst := dstRaw.(*nnfv1alpha4.NnfSystemStorage) - if err := Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha1_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfSystemStorage{} + restored := &nnfv1alpha4.NnfSystemStorage{} hasAnno, err := utilconversion.UnmarshalData(src, restored) if err != nil { return err @@ -494,10 +494,10 @@ func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfSystemStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfSystemStorage) + src := srcRaw.(*nnfv1alpha4.NnfSystemStorage) convertlog.Info("Convert NnfSystemStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(src, dst, nil); err != nil { return err } @@ -628,14 +628,14 @@ func (dst *NnfSystemStorageList) ConvertFrom(srcRaw conversion.Hub) error { // The conversion-gen tool dropped these from zz_generated.conversion.go to // force us to acknowledge that we are addressing the conversion requirements. -func Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(in *nnfv1alpha3.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(in, out, s) +func Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(in *nnfv1alpha4.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(in, out, s) } -func Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(in *nnfv1alpha3.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(in, out, s) +func Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(in *nnfv1alpha4.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(in, out, s) } -func Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in *nnfv1alpha3.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in, out, s) +func Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in *nnfv1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in, out, s) } diff --git a/api/v1alpha1/conversion_test.go b/api/v1alpha1/conversion_test.go index e5ccf189..bfc85ae7 100644 --- a/api/v1alpha1/conversion_test.go +++ b/api/v1alpha1/conversion_test.go @@ -24,79 +24,79 @@ import ( . "github.com/onsi/ginkgo/v2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for NnfAccess", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfAccess{}, + Hub: &nnfv1alpha4.NnfAccess{}, Spoke: &NnfAccess{}, })) t.Run("for NnfContainerProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfContainerProfile{}, + Hub: &nnfv1alpha4.NnfContainerProfile{}, Spoke: &NnfContainerProfile{}, })) t.Run("for NnfDataMovement", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovement{}, + Hub: &nnfv1alpha4.NnfDataMovement{}, Spoke: &NnfDataMovement{}, })) t.Run("for NnfDataMovementManager", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovementManager{}, + Hub: &nnfv1alpha4.NnfDataMovementManager{}, Spoke: &NnfDataMovementManager{}, })) t.Run("for NnfDataMovementProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovementProfile{}, + Hub: &nnfv1alpha4.NnfDataMovementProfile{}, Spoke: &NnfDataMovementProfile{}, })) t.Run("for NnfLustreMGT", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfLustreMGT{}, + Hub: &nnfv1alpha4.NnfLustreMGT{}, Spoke: &NnfLustreMGT{}, })) t.Run("for NnfNode", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNode{}, + Hub: &nnfv1alpha4.NnfNode{}, Spoke: &NnfNode{}, })) t.Run("for NnfNodeBlockStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeBlockStorage{}, + Hub: &nnfv1alpha4.NnfNodeBlockStorage{}, Spoke: &NnfNodeBlockStorage{}, })) t.Run("for NnfNodeECData", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeECData{}, + Hub: &nnfv1alpha4.NnfNodeECData{}, Spoke: &NnfNodeECData{}, })) t.Run("for NnfNodeStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeStorage{}, + Hub: &nnfv1alpha4.NnfNodeStorage{}, Spoke: &NnfNodeStorage{}, })) t.Run("for NnfPortManager", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfPortManager{}, + Hub: &nnfv1alpha4.NnfPortManager{}, Spoke: &NnfPortManager{}, })) t.Run("for NnfStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfStorage{}, + Hub: &nnfv1alpha4.NnfStorage{}, Spoke: &NnfStorage{}, })) t.Run("for NnfStorageProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfStorageProfile{}, + Hub: &nnfv1alpha4.NnfStorageProfile{}, Spoke: &NnfStorageProfile{}, })) t.Run("for NnfSystemStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfSystemStorage{}, + Hub: &nnfv1alpha4.NnfSystemStorage{}, Spoke: &NnfSystemStorage{}, })) diff --git a/api/v1alpha1/doc.go b/api/v1alpha1/doc.go index c39a863f..b22c3173 100644 --- a/api/v1alpha1/doc.go +++ b/api/v1alpha1/doc.go @@ -19,5 +19,5 @@ // The following tag tells conversion-gen to generate conversion routines, and // it tells conversion-gen the name of the hub version. -// +k8s:conversion-gen=github.com/NearNodeFlash/nnf-sos/api/v1alpha3 +// +k8s:conversion-gen=github.com/NearNodeFlash/nnf-sos/api/v1alpha4 package v1alpha1 diff --git a/api/v1alpha2/conversion.go b/api/v1alpha2/conversion.go index 9b8d409f..c564d223 100644 --- a/api/v1alpha2/conversion.go +++ b/api/v1alpha2/conversion.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/conversion" logf "sigs.k8s.io/controller-runtime/pkg/log" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" ) @@ -34,14 +34,14 @@ var convertlog = logf.Log.V(2).WithName("convert-v1alpha2") func (src *NnfAccess) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfAccess To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfAccess) + dst := dstRaw.(*nnfv1alpha4.NnfAccess) - if err := Convert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfAccess{} + restored := &nnfv1alpha4.NnfAccess{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -53,10 +53,10 @@ func (src *NnfAccess) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfAccess) + src := srcRaw.(*nnfv1alpha4.NnfAccess) convertlog.Info("Convert NnfAccess From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(src, dst, nil); err != nil { return err } @@ -66,14 +66,14 @@ func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfContainerProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfContainerProfile) + dst := dstRaw.(*nnfv1alpha4.NnfContainerProfile) - if err := Convert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfContainerProfile{} + restored := &nnfv1alpha4.NnfContainerProfile{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -85,10 +85,10 @@ func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfContainerProfile) + src := srcRaw.(*nnfv1alpha4.NnfContainerProfile) convertlog.Info("Convert NnfContainerProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(src, dst, nil); err != nil { return err } @@ -98,14 +98,14 @@ func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovement To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovement) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovement) - if err := Convert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovement{} + restored := &nnfv1alpha4.NnfDataMovement{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -117,10 +117,10 @@ func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovement) + src := srcRaw.(*nnfv1alpha4.NnfDataMovement) convertlog.Info("Convert NnfDataMovement From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement(src, dst, nil); err != nil { return err } @@ -130,14 +130,14 @@ func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovementManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementManager) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementManager) - if err := Convert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementManager{} + restored := &nnfv1alpha4.NnfDataMovementManager{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -149,10 +149,10 @@ func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovementManager) + src := srcRaw.(*nnfv1alpha4.NnfDataMovementManager) convertlog.Info("Convert NnfDataMovementManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(src, dst, nil); err != nil { return err } @@ -162,14 +162,14 @@ func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfDataMovementProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementProfile) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementProfile) - if err := Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementProfile{} + restored := &nnfv1alpha4.NnfDataMovementProfile{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -181,10 +181,10 @@ func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfDataMovementProfile) + src := srcRaw.(*nnfv1alpha4.NnfDataMovementProfile) convertlog.Info("Convert NnfDataMovementProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(src, dst, nil); err != nil { return err } @@ -194,14 +194,14 @@ func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfLustreMGT To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfLustreMGT) + dst := dstRaw.(*nnfv1alpha4.NnfLustreMGT) - if err := Convert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfLustreMGT{} + restored := &nnfv1alpha4.NnfLustreMGT{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -213,10 +213,10 @@ func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfLustreMGT) + src := srcRaw.(*nnfv1alpha4.NnfLustreMGT) convertlog.Info("Convert NnfLustreMGT From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(src, dst, nil); err != nil { return err } @@ -226,14 +226,14 @@ func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNode To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNode) + dst := dstRaw.(*nnfv1alpha4.NnfNode) - if err := Convert_v1alpha2_NnfNode_To_v1alpha3_NnfNode(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfNode_To_v1alpha4_NnfNode(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNode{} + restored := &nnfv1alpha4.NnfNode{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -245,10 +245,10 @@ func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNode) + src := srcRaw.(*nnfv1alpha4.NnfNode) convertlog.Info("Convert NnfNode From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNode_To_v1alpha2_NnfNode(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNode_To_v1alpha2_NnfNode(src, dst, nil); err != nil { return err } @@ -258,14 +258,14 @@ func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeBlockStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeBlockStorage) + dst := dstRaw.(*nnfv1alpha4.NnfNodeBlockStorage) - if err := Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeBlockStorage{} + restored := &nnfv1alpha4.NnfNodeBlockStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -277,10 +277,10 @@ func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeBlockStorage) + src := srcRaw.(*nnfv1alpha4.NnfNodeBlockStorage) convertlog.Info("Convert NnfNodeBlockStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(src, dst, nil); err != nil { return err } @@ -290,14 +290,14 @@ func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeECData To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeECData) + dst := dstRaw.(*nnfv1alpha4.NnfNodeECData) - if err := Convert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeECData{} + restored := &nnfv1alpha4.NnfNodeECData{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -309,10 +309,10 @@ func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeECData) + src := srcRaw.(*nnfv1alpha4.NnfNodeECData) convertlog.Info("Convert NnfNodeECData From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData(src, dst, nil); err != nil { return err } @@ -322,14 +322,14 @@ func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfNodeStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeStorage) + dst := dstRaw.(*nnfv1alpha4.NnfNodeStorage) - if err := Convert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfNodeStorage{} + restored := &nnfv1alpha4.NnfNodeStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -341,10 +341,10 @@ func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfNodeStorage) + src := srcRaw.(*nnfv1alpha4.NnfNodeStorage) convertlog.Info("Convert NnfNodeStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(src, dst, nil); err != nil { return err } @@ -354,14 +354,14 @@ func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfPortManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfPortManager) + dst := dstRaw.(*nnfv1alpha4.NnfPortManager) - if err := Convert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfPortManager{} + restored := &nnfv1alpha4.NnfPortManager{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -373,10 +373,10 @@ func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfPortManager) + src := srcRaw.(*nnfv1alpha4.NnfPortManager) convertlog.Info("Convert NnfPortManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager(src, dst, nil); err != nil { return err } @@ -386,14 +386,14 @@ func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorage) + dst := dstRaw.(*nnfv1alpha4.NnfStorage) - if err := Convert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfStorage{} + restored := &nnfv1alpha4.NnfStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -405,10 +405,10 @@ func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfStorage) + src := srcRaw.(*nnfv1alpha4.NnfStorage) convertlog.Info("Convert NnfStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(src, dst, nil); err != nil { return err } @@ -418,14 +418,14 @@ func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfStorageProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorageProfile) + dst := dstRaw.(*nnfv1alpha4.NnfStorageProfile) - if err := Convert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfStorageProfile{} + restored := &nnfv1alpha4.NnfStorageProfile{} hasAnno, err := utilconversion.UnmarshalData(src, restored) if err != nil { return err @@ -455,10 +455,10 @@ func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfStorageProfile) + src := srcRaw.(*nnfv1alpha4.NnfStorageProfile) convertlog.Info("Convert NnfStorageProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(src, dst, nil); err != nil { return err } @@ -468,14 +468,14 @@ func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { convertlog.Info("Convert NnfSystemStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfSystemStorage) + dst := dstRaw.(*nnfv1alpha4.NnfSystemStorage) - if err := Convert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(src, dst, nil); err != nil { return err } // Manually restore data. - restored := &nnfv1alpha3.NnfSystemStorage{} + restored := &nnfv1alpha4.NnfSystemStorage{} if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { return err } @@ -487,10 +487,10 @@ func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { } func (dst *NnfSystemStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.NnfSystemStorage) + src := srcRaw.(*nnfv1alpha4.NnfSystemStorage) convertlog.Info("Convert NnfSystemStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - if err := Convert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(src, dst, nil); err != nil { + if err := Convert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(src, dst, nil); err != nil { return err } @@ -622,10 +622,10 @@ func (dst *NnfSystemStorageList) ConvertFrom(srcRaw conversion.Hub) error { // The conversion-gen tool dropped these from zz_generated.conversion.go to // force us to acknowledge that we are addressing the conversion requirements. -func Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in *nnfv1alpha3.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in, out, s) +func Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in *nnfv1alpha4.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in, out, s) } -func Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in *nnfv1alpha3.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in, out, s) +func Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in *nnfv1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in, out, s) } diff --git a/api/v1alpha2/conversion_test.go b/api/v1alpha2/conversion_test.go index a3ef55b9..ed0bd750 100644 --- a/api/v1alpha2/conversion_test.go +++ b/api/v1alpha2/conversion_test.go @@ -24,79 +24,79 @@ import ( . "github.com/onsi/ginkgo/v2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" ) func TestFuzzyConversion(t *testing.T) { t.Run("for NnfAccess", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfAccess{}, + Hub: &nnfv1alpha4.NnfAccess{}, Spoke: &NnfAccess{}, })) t.Run("for NnfContainerProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfContainerProfile{}, + Hub: &nnfv1alpha4.NnfContainerProfile{}, Spoke: &NnfContainerProfile{}, })) t.Run("for NnfDataMovement", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovement{}, + Hub: &nnfv1alpha4.NnfDataMovement{}, Spoke: &NnfDataMovement{}, })) t.Run("for NnfDataMovementManager", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovementManager{}, + Hub: &nnfv1alpha4.NnfDataMovementManager{}, Spoke: &NnfDataMovementManager{}, })) t.Run("for NnfDataMovementProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfDataMovementProfile{}, + Hub: &nnfv1alpha4.NnfDataMovementProfile{}, Spoke: &NnfDataMovementProfile{}, })) t.Run("for NnfLustreMGT", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfLustreMGT{}, + Hub: &nnfv1alpha4.NnfLustreMGT{}, Spoke: &NnfLustreMGT{}, })) t.Run("for NnfNode", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNode{}, + Hub: &nnfv1alpha4.NnfNode{}, Spoke: &NnfNode{}, })) t.Run("for NnfNodeBlockStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeBlockStorage{}, + Hub: &nnfv1alpha4.NnfNodeBlockStorage{}, Spoke: &NnfNodeBlockStorage{}, })) t.Run("for NnfNodeECData", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeECData{}, + Hub: &nnfv1alpha4.NnfNodeECData{}, Spoke: &NnfNodeECData{}, })) t.Run("for NnfNodeStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfNodeStorage{}, + Hub: &nnfv1alpha4.NnfNodeStorage{}, Spoke: &NnfNodeStorage{}, })) t.Run("for NnfPortManager", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfPortManager{}, + Hub: &nnfv1alpha4.NnfPortManager{}, Spoke: &NnfPortManager{}, })) t.Run("for NnfStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfStorage{}, + Hub: &nnfv1alpha4.NnfStorage{}, Spoke: &NnfStorage{}, })) t.Run("for NnfStorageProfile", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfStorageProfile{}, + Hub: &nnfv1alpha4.NnfStorageProfile{}, Spoke: &NnfStorageProfile{}, })) t.Run("for NnfSystemStorage", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{ - Hub: &nnfv1alpha3.NnfSystemStorage{}, + Hub: &nnfv1alpha4.NnfSystemStorage{}, Spoke: &NnfSystemStorage{}, })) diff --git a/api/v1alpha2/doc.go b/api/v1alpha2/doc.go index 3abb1764..d98f23f9 100644 --- a/api/v1alpha2/doc.go +++ b/api/v1alpha2/doc.go @@ -19,5 +19,5 @@ // The following tag tells conversion-gen to generate conversion routines, and // it tells conversion-gen the name of the hub version. -// +k8s:conversion-gen=github.com/NearNodeFlash/nnf-sos/api/v1alpha3 +// +k8s:conversion-gen=github.com/NearNodeFlash/nnf-sos/api/v1alpha4 package v1alpha2