diff --git a/Makefile b/Makefile index f489cd810..3c1b6cefd 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ IMAGE_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-sos # The NNF-MFU container image to use in NNFContainerProfile resources. NNFMFU_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-mfu -NNFMFU_VERSION ?= 0.1.3 +NNFMFU_VERSION ?= 0.1.4 # BUNDLE_IMG defines the image:tag used for the bundle. # You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) @@ -303,8 +303,6 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform kind-push: VERSION ?= $(shell cat .version) kind-push: .version ## Push docker image to kind kind load docker-image $(IMAGE_TAG_BASE):$(VERSION) - ${CONTAINER_TOOL} pull gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 - kind load docker-image gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 ##@ Deployment @@ -409,7 +407,7 @@ $(CONVERSION_GEN): $(LOCALBIN) # Build conversion-gen from tools folder. # The SRC_DIRS value is a space-separated list of paths to old versions. # The --input-dirs value is a single path item; specify multiple --input-dirs # parameters if you have multiple old versions. -SRC_DIRS=./api/v1alpha1 ./api/v1alpha2 +SRC_DIRS=./api/v1alpha2 ./api/v1alpha3 generate-go-conversions: $(CONVERSION_GEN) ## Generate conversions go code $(MAKE) clean-generated-conversions SRC_DIRS="$(SRC_DIRS)" $(CONVERSION_GEN) \ diff --git a/PROJECT b/PROJECT index 35efaddae..5af03ca45 100644 --- a/PROJECT +++ b/PROJECT @@ -263,6 +263,118 @@ resources: kind: NnfAccess path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfContainerProfile + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfDataMovement + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfDataMovementManager + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfDataMovementProfile + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfLustreMGT + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfNode + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfNodeBlockStorage + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfNodeECData + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfNodeStorage + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfPortManager + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfStorage + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfStorageProfile + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfSystemStorage + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 + version: v1alpha3 +- api: + crdVersion: v1 + namespaced: true + domain: cray.hpe.com + group: nnf + kind: NnfAccess + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -272,8 +384,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfContainerProfile - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: validation: true webhookVersion: v1 @@ -283,8 +395,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfDataMovement - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -294,8 +406,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfDataMovementManager - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -305,8 +417,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfDataMovementProfile - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: validation: true webhookVersion: v1 @@ -316,8 +428,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfLustreMGT - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -327,8 +439,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfNode - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -338,8 +450,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfNodeBlockStorage - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -349,8 +461,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfNodeECData - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -360,8 +472,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfNodeStorage - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -371,8 +483,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfPortManager - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -382,8 +494,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfStorage - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 @@ -393,8 +505,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfStorageProfile - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: validation: true webhookVersion: v1 @@ -404,8 +516,8 @@ resources: domain: cray.hpe.com group: nnf kind: NnfSystemStorage - path: github.com/NearNodeFlash/nnf-sos/api/v1alpha3 - version: v1alpha3 + path: github.com/NearNodeFlash/nnf-sos/api/v1alpha4 + version: v1alpha4 webhooks: conversion: true webhookVersion: v1 diff --git a/api/v1alpha1/conversion.go b/api/v1alpha1/conversion.go deleted file mode 100644 index 8afba1a4f..000000000 --- a/api/v1alpha1/conversion.go +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2024 Hewlett Packard Enterprise Development LP - * Other additional copyright holders may be indicated within. - * - * The entirety of this work is licensed under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package v1alpha1 - -import ( - apierrors "k8s.io/apimachinery/pkg/api/errors" - apiconversion "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/conversion" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" - utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" -) - -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) - - if err := Convert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfAccess{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfContainerProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfContainerProfile) - - if err := Convert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfContainerProfile{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfDataMovement To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovement) - - if err := Convert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovement{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfDataMovementManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementManager) - - if err := Convert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementManager{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfDataMovementProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfDataMovementProfile) - - if err := Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfDataMovementProfile{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfLustreMGT To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfLustreMGT) - - if err := Convert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfLustreMGT{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfNode To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNode) - - if err := Convert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfNode{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfNodeBlockStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeBlockStorage) - - if err := Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfNodeBlockStorage{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfNodeECData To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeECData) - - if err := Convert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfNodeECData{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfNodeStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfNodeStorage) - - if err := Convert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfNodeStorage{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfPortManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfPortManager) - - if err := Convert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfPortManager{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorage) - - if err := Convert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfStorage{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - return nil -} - -func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfStorageProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfStorageProfile) - - if err := Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfStorageProfile{} - hasAnno, err := utilconversion.UnmarshalData(src, restored) - if err != nil { - return err - } - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - - if hasAnno { - dst.Data.LustreStorage.MgtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PostActivate...) - dst.Data.LustreStorage.MgtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PreDeactivate...) - dst.Data.LustreStorage.MgtMdtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PostActivate...) - dst.Data.LustreStorage.MgtMdtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PreDeactivate...) - dst.Data.LustreStorage.MdtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PostActivate...) - dst.Data.LustreStorage.MdtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PreDeactivate...) - dst.Data.LustreStorage.OstCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PostActivate...) - dst.Data.LustreStorage.OstCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PreDeactivate...) - dst.Data.RawStorage.CmdLines.PostActivate = append([]string(nil), restored.Data.RawStorage.CmdLines.PostActivate...) - dst.Data.RawStorage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.RawStorage.CmdLines.PreDeactivate...) - dst.Data.XFSStorage.CmdLines.PostActivate = append([]string(nil), restored.Data.XFSStorage.CmdLines.PostActivate...) - dst.Data.XFSStorage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.XFSStorage.CmdLines.PreDeactivate...) - dst.Data.GFS2Storage.CmdLines.PostActivate = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PostActivate...) - dst.Data.GFS2Storage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PreDeactivate...) - } - - return nil -} - -func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { - convertlog.Info("Convert NnfSystemStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) - dst := dstRaw.(*nnfv1alpha3.NnfSystemStorage) - - if err := Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(src, dst, nil); err != nil { - return err - } - - // Manually restore data. - restored := &nnfv1alpha3.NnfSystemStorage{} - hasAnno, err := utilconversion.UnmarshalData(src, restored) - if err != nil { - return err - } - - // EDIT THIS FUNCTION! If the annotation is holding anything that is - // hub-specific then copy it into 'dst' from 'restored'. - // Otherwise, you may comment out UnmarshalData() until it's needed. - if hasAnno { - dst.Spec.ExcludeDisabledRabbits = restored.Spec.ExcludeDisabledRabbits - } else { - dst.Spec.ExcludeDisabledRabbits = false - } - - return nil -} - -func (dst *NnfSystemStorage) ConvertFrom(srcRaw conversion.Hub) error { - src := srcRaw.(*nnfv1alpha3.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 { - return err - } - - // Preserve Hub data on down-conversion except for metadata. - return utilconversion.MarshalData(src, dst) -} - -// The List-based ConvertTo/ConvertFrom routines are never used by the -// conversion webhook, but the conversion-verifier tool wants to see them. -// The conversion-gen tool generated the Convert_X_to_Y routines, should they -// ever be needed. - -func resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: "nnf", Resource: resource} -} - -func (src *NnfAccessList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfAccessList"), "ConvertTo") -} - -func (dst *NnfAccessList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfAccessList"), "ConvertFrom") -} - -func (src *NnfContainerProfileList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfContainerProfileList"), "ConvertTo") -} - -func (dst *NnfContainerProfileList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfContainerProfileList"), "ConvertFrom") -} - -func (src *NnfDataMovementList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementList"), "ConvertTo") -} - -func (dst *NnfDataMovementList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementList"), "ConvertFrom") -} - -func (src *NnfDataMovementManagerList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementManagerList"), "ConvertTo") -} - -func (dst *NnfDataMovementManagerList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementManagerList"), "ConvertFrom") -} - -func (src *NnfDataMovementProfileList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementProfileList"), "ConvertTo") -} - -func (dst *NnfDataMovementProfileList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfDataMovementProfileList"), "ConvertFrom") -} - -func (src *NnfLustreMGTList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfLustreMGTList"), "ConvertTo") -} - -func (dst *NnfLustreMGTList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfLustreMGTList"), "ConvertFrom") -} - -func (src *NnfNodeList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeList"), "ConvertTo") -} - -func (dst *NnfNodeList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeList"), "ConvertFrom") -} - -func (src *NnfNodeBlockStorageList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeBlockStorageList"), "ConvertTo") -} - -func (dst *NnfNodeBlockStorageList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeBlockStorageList"), "ConvertFrom") -} - -func (src *NnfNodeECDataList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeECDataList"), "ConvertTo") -} - -func (dst *NnfNodeECDataList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeECDataList"), "ConvertFrom") -} - -func (src *NnfNodeStorageList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeStorageList"), "ConvertTo") -} - -func (dst *NnfNodeStorageList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfNodeStorageList"), "ConvertFrom") -} - -func (src *NnfPortManagerList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfPortManagerList"), "ConvertTo") -} - -func (dst *NnfPortManagerList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfPortManagerList"), "ConvertFrom") -} - -func (src *NnfStorageList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfStorageList"), "ConvertTo") -} - -func (dst *NnfStorageList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfStorageList"), "ConvertFrom") -} - -func (src *NnfStorageProfileList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfStorageProfileList"), "ConvertTo") -} - -func (dst *NnfStorageProfileList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfStorageProfileList"), "ConvertFrom") -} - -func (src *NnfSystemStorageList) ConvertTo(dstRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfSystemStorageList"), "ConvertTo") -} - -func (dst *NnfSystemStorageList) ConvertFrom(srcRaw conversion.Hub) error { - return apierrors.NewMethodNotSupported(resource("NnfSystemStorageList"), "ConvertFrom") -} - -// 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_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_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in *nnfv1alpha3.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in, out, s) -} diff --git a/api/v1alpha1/zz_generated.conversion.go b/api/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 5a6ab732d..000000000 --- a/api/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,3227 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* - * Copyright 2024 Hewlett Packard Enterprise Development LP - * Other additional copyright holders may be indicated within. - * - * The entirety of this work is licensed under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - v1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - v1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" - v2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*LustreStorageSpec)(nil), (*v1alpha3.LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(a.(*LustreStorageSpec), b.(*v1alpha3.LustreStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.LustreStorageSpec)(nil), (*LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec(a.(*v1alpha3.LustreStorageSpec), b.(*LustreStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfAccess)(nil), (*v1alpha3.NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(a.(*NnfAccess), b.(*v1alpha3.NnfAccess), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccess)(nil), (*NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess(a.(*v1alpha3.NnfAccess), b.(*NnfAccess), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfAccessList)(nil), (*v1alpha3.NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfAccessList_To_v1alpha3_NnfAccessList(a.(*NnfAccessList), b.(*v1alpha3.NnfAccessList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessList)(nil), (*NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessList_To_v1alpha1_NnfAccessList(a.(*v1alpha3.NnfAccessList), b.(*NnfAccessList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfAccessSpec)(nil), (*v1alpha3.NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(a.(*NnfAccessSpec), b.(*v1alpha3.NnfAccessSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessSpec)(nil), (*NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec(a.(*v1alpha3.NnfAccessSpec), b.(*NnfAccessSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfAccessStatus)(nil), (*v1alpha3.NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(a.(*NnfAccessStatus), b.(*v1alpha3.NnfAccessStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessStatus)(nil), (*NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus(a.(*v1alpha3.NnfAccessStatus), b.(*NnfAccessStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfile)(nil), (*v1alpha3.NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(a.(*NnfContainerProfile), b.(*v1alpha3.NnfContainerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfile)(nil), (*NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(a.(*v1alpha3.NnfContainerProfile), b.(*NnfContainerProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileData)(nil), (*v1alpha3.NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(a.(*NnfContainerProfileData), b.(*v1alpha3.NnfContainerProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileData)(nil), (*NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData(a.(*v1alpha3.NnfContainerProfileData), b.(*NnfContainerProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileList)(nil), (*v1alpha3.NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(a.(*NnfContainerProfileList), b.(*v1alpha3.NnfContainerProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileList)(nil), (*NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileList_To_v1alpha1_NnfContainerProfileList(a.(*v1alpha3.NnfContainerProfileList), b.(*NnfContainerProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileStorage)(nil), (*v1alpha3.NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(a.(*NnfContainerProfileStorage), b.(*v1alpha3.NnfContainerProfileStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileStorage)(nil), (*NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha1_NnfContainerProfileStorage(a.(*v1alpha3.NnfContainerProfileStorage), b.(*NnfContainerProfileStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovement)(nil), (*v1alpha3.NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(a.(*NnfDataMovement), b.(*v1alpha3.NnfDataMovement), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovement)(nil), (*NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement(a.(*v1alpha3.NnfDataMovement), b.(*NnfDataMovement), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementCommandStatus)(nil), (*v1alpha3.NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(a.(*NnfDataMovementCommandStatus), b.(*v1alpha3.NnfDataMovementCommandStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementCommandStatus)(nil), (*NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha1_NnfDataMovementCommandStatus(a.(*v1alpha3.NnfDataMovementCommandStatus), b.(*NnfDataMovementCommandStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementConfig)(nil), (*v1alpha3.NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(a.(*NnfDataMovementConfig), b.(*v1alpha3.NnfDataMovementConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementConfig)(nil), (*NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha1_NnfDataMovementConfig(a.(*v1alpha3.NnfDataMovementConfig), b.(*NnfDataMovementConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementList)(nil), (*v1alpha3.NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(a.(*NnfDataMovementList), b.(*v1alpha3.NnfDataMovementList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementList)(nil), (*NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementList_To_v1alpha1_NnfDataMovementList(a.(*v1alpha3.NnfDataMovementList), b.(*NnfDataMovementList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManager)(nil), (*v1alpha3.NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(a.(*NnfDataMovementManager), b.(*v1alpha3.NnfDataMovementManager), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManager)(nil), (*NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(a.(*v1alpha3.NnfDataMovementManager), b.(*NnfDataMovementManager), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerList)(nil), (*v1alpha3.NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(a.(*NnfDataMovementManagerList), b.(*v1alpha3.NnfDataMovementManagerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerList)(nil), (*NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha1_NnfDataMovementManagerList(a.(*v1alpha3.NnfDataMovementManagerList), b.(*NnfDataMovementManagerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerSpec)(nil), (*v1alpha3.NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(a.(*NnfDataMovementManagerSpec), b.(*v1alpha3.NnfDataMovementManagerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerSpec)(nil), (*NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec(a.(*v1alpha3.NnfDataMovementManagerSpec), b.(*NnfDataMovementManagerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerStatus)(nil), (*v1alpha3.NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(a.(*NnfDataMovementManagerStatus), b.(*v1alpha3.NnfDataMovementManagerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerStatus)(nil), (*NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus(a.(*v1alpha3.NnfDataMovementManagerStatus), b.(*NnfDataMovementManagerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfile)(nil), (*v1alpha3.NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(a.(*NnfDataMovementProfile), b.(*v1alpha3.NnfDataMovementProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfile)(nil), (*NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(a.(*v1alpha3.NnfDataMovementProfile), b.(*NnfDataMovementProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileData)(nil), (*v1alpha3.NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(a.(*NnfDataMovementProfileData), b.(*v1alpha3.NnfDataMovementProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfileData)(nil), (*NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData(a.(*v1alpha3.NnfDataMovementProfileData), b.(*NnfDataMovementProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileList)(nil), (*v1alpha3.NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(a.(*NnfDataMovementProfileList), b.(*v1alpha3.NnfDataMovementProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfileList)(nil), (*NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha1_NnfDataMovementProfileList(a.(*v1alpha3.NnfDataMovementProfileList), b.(*NnfDataMovementProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpec)(nil), (*v1alpha3.NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(a.(*NnfDataMovementSpec), b.(*v1alpha3.NnfDataMovementSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementSpec)(nil), (*NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec(a.(*v1alpha3.NnfDataMovementSpec), b.(*NnfDataMovementSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpecSourceDestination)(nil), (*v1alpha3.NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(a.(*NnfDataMovementSpecSourceDestination), b.(*v1alpha3.NnfDataMovementSpecSourceDestination), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementSpecSourceDestination)(nil), (*NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha1_NnfDataMovementSpecSourceDestination(a.(*v1alpha3.NnfDataMovementSpecSourceDestination), b.(*NnfDataMovementSpecSourceDestination), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementStatus)(nil), (*v1alpha3.NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(a.(*NnfDataMovementStatus), b.(*v1alpha3.NnfDataMovementStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementStatus)(nil), (*NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus(a.(*v1alpha3.NnfDataMovementStatus), b.(*NnfDataMovementStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfDriveStatus)(nil), (*v1alpha3.NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(a.(*NnfDriveStatus), b.(*v1alpha3.NnfDriveStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDriveStatus)(nil), (*NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDriveStatus_To_v1alpha1_NnfDriveStatus(a.(*v1alpha3.NnfDriveStatus), b.(*NnfDriveStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGT)(nil), (*v1alpha3.NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(a.(*NnfLustreMGT), b.(*v1alpha3.NnfLustreMGT), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGT)(nil), (*NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(a.(*v1alpha3.NnfLustreMGT), b.(*NnfLustreMGT), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTList)(nil), (*v1alpha3.NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(a.(*NnfLustreMGTList), b.(*v1alpha3.NnfLustreMGTList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTList)(nil), (*NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTList_To_v1alpha1_NnfLustreMGTList(a.(*v1alpha3.NnfLustreMGTList), b.(*NnfLustreMGTList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTSpec)(nil), (*v1alpha3.NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(a.(*NnfLustreMGTSpec), b.(*v1alpha3.NnfLustreMGTSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTSpec)(nil), (*NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec(a.(*v1alpha3.NnfLustreMGTSpec), b.(*NnfLustreMGTSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatus)(nil), (*v1alpha3.NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(a.(*NnfLustreMGTStatus), b.(*v1alpha3.NnfLustreMGTStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTStatus)(nil), (*NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus(a.(*v1alpha3.NnfLustreMGTStatus), b.(*NnfLustreMGTStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatusClaim)(nil), (*v1alpha3.NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(a.(*NnfLustreMGTStatusClaim), b.(*v1alpha3.NnfLustreMGTStatusClaim), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTStatusClaim)(nil), (*NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha1_NnfLustreMGTStatusClaim(a.(*v1alpha3.NnfLustreMGTStatusClaim), b.(*NnfLustreMGTStatusClaim), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNode)(nil), (*v1alpha3.NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(a.(*NnfNode), b.(*v1alpha3.NnfNode), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNode)(nil), (*NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNode_To_v1alpha1_NnfNode(a.(*v1alpha3.NnfNode), b.(*NnfNode), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorage)(nil), (*v1alpha3.NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(a.(*NnfNodeBlockStorage), b.(*v1alpha3.NnfNodeBlockStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorage)(nil), (*NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(a.(*v1alpha3.NnfNodeBlockStorage), b.(*NnfNodeBlockStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAccessStatus)(nil), (*v1alpha3.NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(a.(*NnfNodeBlockStorageAccessStatus), b.(*v1alpha3.NnfNodeBlockStorageAccessStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAccessStatus)(nil), (*NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha1_NnfNodeBlockStorageAccessStatus(a.(*v1alpha3.NnfNodeBlockStorageAccessStatus), b.(*NnfNodeBlockStorageAccessStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationSpec)(nil), (*v1alpha3.NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(a.(*NnfNodeBlockStorageAllocationSpec), b.(*v1alpha3.NnfNodeBlockStorageAllocationSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAllocationSpec)(nil), (*NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha1_NnfNodeBlockStorageAllocationSpec(a.(*v1alpha3.NnfNodeBlockStorageAllocationSpec), b.(*NnfNodeBlockStorageAllocationSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationStatus)(nil), (*v1alpha3.NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(a.(*NnfNodeBlockStorageAllocationStatus), b.(*v1alpha3.NnfNodeBlockStorageAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAllocationStatus)(nil), (*NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha1_NnfNodeBlockStorageAllocationStatus(a.(*v1alpha3.NnfNodeBlockStorageAllocationStatus), b.(*NnfNodeBlockStorageAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageDeviceStatus)(nil), (*v1alpha3.NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(a.(*NnfNodeBlockStorageDeviceStatus), b.(*v1alpha3.NnfNodeBlockStorageDeviceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageDeviceStatus)(nil), (*NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha1_NnfNodeBlockStorageDeviceStatus(a.(*v1alpha3.NnfNodeBlockStorageDeviceStatus), b.(*NnfNodeBlockStorageDeviceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageList)(nil), (*v1alpha3.NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(a.(*NnfNodeBlockStorageList), b.(*v1alpha3.NnfNodeBlockStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageList)(nil), (*NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha1_NnfNodeBlockStorageList(a.(*v1alpha3.NnfNodeBlockStorageList), b.(*NnfNodeBlockStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageSpec)(nil), (*v1alpha3.NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(a.(*NnfNodeBlockStorageSpec), b.(*v1alpha3.NnfNodeBlockStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageSpec)(nil), (*NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec(a.(*v1alpha3.NnfNodeBlockStorageSpec), b.(*NnfNodeBlockStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageStatus)(nil), (*v1alpha3.NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(a.(*NnfNodeBlockStorageStatus), b.(*v1alpha3.NnfNodeBlockStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageStatus)(nil), (*NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus(a.(*v1alpha3.NnfNodeBlockStorageStatus), b.(*NnfNodeBlockStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeECData)(nil), (*v1alpha3.NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(a.(*NnfNodeECData), b.(*v1alpha3.NnfNodeECData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECData)(nil), (*NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData(a.(*v1alpha3.NnfNodeECData), b.(*NnfNodeECData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataList)(nil), (*v1alpha3.NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(a.(*NnfNodeECDataList), b.(*v1alpha3.NnfNodeECDataList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataList)(nil), (*NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataList_To_v1alpha1_NnfNodeECDataList(a.(*v1alpha3.NnfNodeECDataList), b.(*NnfNodeECDataList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataSpec)(nil), (*v1alpha3.NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(a.(*NnfNodeECDataSpec), b.(*v1alpha3.NnfNodeECDataSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataSpec)(nil), (*NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec(a.(*v1alpha3.NnfNodeECDataSpec), b.(*NnfNodeECDataSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataStatus)(nil), (*v1alpha3.NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(a.(*NnfNodeECDataStatus), b.(*v1alpha3.NnfNodeECDataStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataStatus)(nil), (*NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus(a.(*v1alpha3.NnfNodeECDataStatus), b.(*NnfNodeECDataStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeList)(nil), (*v1alpha3.NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeList_To_v1alpha3_NnfNodeList(a.(*NnfNodeList), b.(*v1alpha3.NnfNodeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeList)(nil), (*NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeList_To_v1alpha1_NnfNodeList(a.(*v1alpha3.NnfNodeList), b.(*NnfNodeList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeSpec)(nil), (*v1alpha3.NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(a.(*NnfNodeSpec), b.(*v1alpha3.NnfNodeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeSpec)(nil), (*NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec(a.(*v1alpha3.NnfNodeSpec), b.(*NnfNodeSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStatus)(nil), (*v1alpha3.NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(a.(*NnfNodeStatus), b.(*v1alpha3.NnfNodeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStatus)(nil), (*NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus(a.(*v1alpha3.NnfNodeStatus), b.(*NnfNodeStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorage)(nil), (*v1alpha3.NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(a.(*NnfNodeStorage), b.(*v1alpha3.NnfNodeStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorage)(nil), (*NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(a.(*v1alpha3.NnfNodeStorage), b.(*NnfNodeStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageAllocationStatus)(nil), (*v1alpha3.NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(a.(*NnfNodeStorageAllocationStatus), b.(*v1alpha3.NnfNodeStorageAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageAllocationStatus)(nil), (*NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha1_NnfNodeStorageAllocationStatus(a.(*v1alpha3.NnfNodeStorageAllocationStatus), b.(*NnfNodeStorageAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageList)(nil), (*v1alpha3.NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(a.(*NnfNodeStorageList), b.(*v1alpha3.NnfNodeStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageList)(nil), (*NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageList_To_v1alpha1_NnfNodeStorageList(a.(*v1alpha3.NnfNodeStorageList), b.(*NnfNodeStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageSpec)(nil), (*v1alpha3.NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(a.(*NnfNodeStorageSpec), b.(*v1alpha3.NnfNodeStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageSpec)(nil), (*NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec(a.(*v1alpha3.NnfNodeStorageSpec), b.(*NnfNodeStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageStatus)(nil), (*v1alpha3.NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(a.(*NnfNodeStorageStatus), b.(*v1alpha3.NnfNodeStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageStatus)(nil), (*NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus(a.(*v1alpha3.NnfNodeStorageStatus), b.(*NnfNodeStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManager)(nil), (*v1alpha3.NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(a.(*NnfPortManager), b.(*v1alpha3.NnfPortManager), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManager)(nil), (*NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager(a.(*v1alpha3.NnfPortManager), b.(*NnfPortManager), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationSpec)(nil), (*v1alpha3.NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(a.(*NnfPortManagerAllocationSpec), b.(*v1alpha3.NnfPortManagerAllocationSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerAllocationSpec)(nil), (*NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha1_NnfPortManagerAllocationSpec(a.(*v1alpha3.NnfPortManagerAllocationSpec), b.(*NnfPortManagerAllocationSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationStatus)(nil), (*v1alpha3.NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(a.(*NnfPortManagerAllocationStatus), b.(*v1alpha3.NnfPortManagerAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerAllocationStatus)(nil), (*NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha1_NnfPortManagerAllocationStatus(a.(*v1alpha3.NnfPortManagerAllocationStatus), b.(*NnfPortManagerAllocationStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerList)(nil), (*v1alpha3.NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(a.(*NnfPortManagerList), b.(*v1alpha3.NnfPortManagerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerList)(nil), (*NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerList_To_v1alpha1_NnfPortManagerList(a.(*v1alpha3.NnfPortManagerList), b.(*NnfPortManagerList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerSpec)(nil), (*v1alpha3.NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(a.(*NnfPortManagerSpec), b.(*v1alpha3.NnfPortManagerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerSpec)(nil), (*NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec(a.(*v1alpha3.NnfPortManagerSpec), b.(*NnfPortManagerSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerStatus)(nil), (*v1alpha3.NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(a.(*NnfPortManagerStatus), b.(*v1alpha3.NnfPortManagerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerStatus)(nil), (*NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus(a.(*v1alpha3.NnfPortManagerStatus), b.(*NnfPortManagerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfResourceStatus)(nil), (*v1alpha3.NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(a.(*NnfResourceStatus), b.(*v1alpha3.NnfResourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfResourceStatus)(nil), (*NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(a.(*v1alpha3.NnfResourceStatus), b.(*NnfResourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfServerStatus)(nil), (*v1alpha3.NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfServerStatus_To_v1alpha3_NnfServerStatus(a.(*NnfServerStatus), b.(*v1alpha3.NnfServerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfServerStatus)(nil), (*NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfServerStatus_To_v1alpha1_NnfServerStatus(a.(*v1alpha3.NnfServerStatus), b.(*NnfServerStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorage)(nil), (*v1alpha3.NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(a.(*NnfStorage), b.(*v1alpha3.NnfStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorage)(nil), (*NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage(a.(*v1alpha3.NnfStorage), b.(*NnfStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationNodes)(nil), (*v1alpha3.NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(a.(*NnfStorageAllocationNodes), b.(*v1alpha3.NnfStorageAllocationNodes), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationNodes)(nil), (*NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha1_NnfStorageAllocationNodes(a.(*v1alpha3.NnfStorageAllocationNodes), b.(*NnfStorageAllocationNodes), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetSpec)(nil), (*v1alpha3.NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(a.(*NnfStorageAllocationSetSpec), b.(*v1alpha3.NnfStorageAllocationSetSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationSetSpec)(nil), (*NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha1_NnfStorageAllocationSetSpec(a.(*v1alpha3.NnfStorageAllocationSetSpec), b.(*NnfStorageAllocationSetSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetStatus)(nil), (*v1alpha3.NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(a.(*NnfStorageAllocationSetStatus), b.(*v1alpha3.NnfStorageAllocationSetStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationSetStatus)(nil), (*NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha1_NnfStorageAllocationSetStatus(a.(*v1alpha3.NnfStorageAllocationSetStatus), b.(*NnfStorageAllocationSetStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageList)(nil), (*v1alpha3.NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageList_To_v1alpha3_NnfStorageList(a.(*NnfStorageList), b.(*v1alpha3.NnfStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageList)(nil), (*NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageList_To_v1alpha1_NnfStorageList(a.(*v1alpha3.NnfStorageList), b.(*NnfStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageLustreSpec)(nil), (*v1alpha3.NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(a.(*NnfStorageLustreSpec), b.(*v1alpha3.NnfStorageLustreSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageLustreSpec)(nil), (*NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec(a.(*v1alpha3.NnfStorageLustreSpec), b.(*NnfStorageLustreSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageLustreStatus)(nil), (*v1alpha3.NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(a.(*NnfStorageLustreStatus), b.(*v1alpha3.NnfStorageLustreStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageLustreStatus)(nil), (*NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus(a.(*v1alpha3.NnfStorageLustreStatus), b.(*NnfStorageLustreStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfile)(nil), (*v1alpha3.NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(a.(*NnfStorageProfile), b.(*v1alpha3.NnfStorageProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfile)(nil), (*NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(a.(*v1alpha3.NnfStorageProfile), b.(*NnfStorageProfile), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileCmdLines)(nil), (*v1alpha3.NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(a.(*NnfStorageProfileCmdLines), b.(*v1alpha3.NnfStorageProfileCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileData)(nil), (*v1alpha3.NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(a.(*NnfStorageProfileData), b.(*v1alpha3.NnfStorageProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileData)(nil), (*NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData(a.(*v1alpha3.NnfStorageProfileData), b.(*NnfStorageProfileData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileGFS2Data)(nil), (*v1alpha3.NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(a.(*NnfStorageProfileGFS2Data), b.(*v1alpha3.NnfStorageProfileGFS2Data), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileGFS2Data)(nil), (*NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data(a.(*v1alpha3.NnfStorageProfileGFS2Data), b.(*NnfStorageProfileGFS2Data), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMLvChangeCmdLines)(nil), (*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(a.(*NnfStorageProfileLVMLvChangeCmdLines), b.(*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines)(nil), (*NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines(a.(*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines), b.(*NnfStorageProfileLVMLvChangeCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMVgChangeCmdLines)(nil), (*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(a.(*NnfStorageProfileLVMVgChangeCmdLines), b.(*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines)(nil), (*NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines(a.(*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines), b.(*NnfStorageProfileLVMVgChangeCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileList)(nil), (*v1alpha3.NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(a.(*NnfStorageProfileList), b.(*v1alpha3.NnfStorageProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileList)(nil), (*NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileList_To_v1alpha1_NnfStorageProfileList(a.(*v1alpha3.NnfStorageProfileList), b.(*NnfStorageProfileList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreCmdLines)(nil), (*v1alpha3.NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(a.(*NnfStorageProfileLustreCmdLines), b.(*v1alpha3.NnfStorageProfileLustreCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreData)(nil), (*v1alpha3.NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(a.(*NnfStorageProfileLustreData), b.(*v1alpha3.NnfStorageProfileLustreData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLustreData)(nil), (*NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData(a.(*v1alpha3.NnfStorageProfileLustreData), b.(*NnfStorageProfileLustreData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreMiscOptions)(nil), (*v1alpha3.NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(a.(*NnfStorageProfileLustreMiscOptions), b.(*v1alpha3.NnfStorageProfileLustreMiscOptions), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLustreMiscOptions)(nil), (*NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(a.(*v1alpha3.NnfStorageProfileLustreMiscOptions), b.(*NnfStorageProfileLustreMiscOptions), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileRawData)(nil), (*v1alpha3.NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(a.(*NnfStorageProfileRawData), b.(*v1alpha3.NnfStorageProfileRawData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileRawData)(nil), (*NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData(a.(*v1alpha3.NnfStorageProfileRawData), b.(*NnfStorageProfileRawData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileXFSData)(nil), (*v1alpha3.NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(a.(*NnfStorageProfileXFSData), b.(*v1alpha3.NnfStorageProfileXFSData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileXFSData)(nil), (*NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData(a.(*v1alpha3.NnfStorageProfileXFSData), b.(*NnfStorageProfileXFSData), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageSpec)(nil), (*v1alpha3.NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(a.(*NnfStorageSpec), b.(*v1alpha3.NnfStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageSpec)(nil), (*NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec(a.(*v1alpha3.NnfStorageSpec), b.(*NnfStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfStorageStatus)(nil), (*v1alpha3.NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(a.(*NnfStorageStatus), b.(*v1alpha3.NnfStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageStatus)(nil), (*NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus(a.(*v1alpha3.NnfStorageStatus), b.(*NnfStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorage)(nil), (*v1alpha3.NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(a.(*NnfSystemStorage), b.(*v1alpha3.NnfSystemStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorage)(nil), (*NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(a.(*v1alpha3.NnfSystemStorage), b.(*NnfSystemStorage), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageList)(nil), (*v1alpha3.NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(a.(*NnfSystemStorageList), b.(*v1alpha3.NnfSystemStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorageList)(nil), (*NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageList_To_v1alpha1_NnfSystemStorageList(a.(*v1alpha3.NnfSystemStorageList), b.(*NnfSystemStorageList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageSpec)(nil), (*v1alpha3.NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(a.(*NnfSystemStorageSpec), b.(*v1alpha3.NnfSystemStorageSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageStatus)(nil), (*v1alpha3.NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(a.(*NnfSystemStorageStatus), b.(*v1alpha3.NnfSystemStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorageStatus)(nil), (*NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus(a.(*v1alpha3.NnfSystemStorageStatus), b.(*NnfSystemStorageStatus), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha3.NnfStorageProfileCmdLines)(nil), (*NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(a.(*v1alpha3.NnfStorageProfileCmdLines), b.(*NnfStorageProfileCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha3.NnfStorageProfileLustreCmdLines)(nil), (*NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(a.(*v1alpha3.NnfStorageProfileLustreCmdLines), b.(*NnfStorageProfileLustreCmdLines), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*v1alpha3.NnfSystemStorageSpec)(nil), (*NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(a.(*v1alpha3.NnfSystemStorageSpec), b.(*NnfSystemStorageSpec), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha3.LustreStorageSpec, s conversion.Scope) error { - out.FileSystemName = in.FileSystemName - out.TargetType = in.TargetType - out.StartIndex = in.StartIndex - out.MgsAddress = in.MgsAddress - out.BackFs = in.BackFs - return nil -} - -// Convert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec is an autogenerated conversion function. -func Convert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha3.LustreStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in, out, s) -} - -func autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec(in *v1alpha3.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { - out.FileSystemName = in.FileSystemName - out.TargetType = in.TargetType - out.StartIndex = in.StartIndex - out.MgsAddress = in.MgsAddress - out.BackFs = in.BackFs - return nil -} - -// Convert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec(in *v1alpha3.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(in *NnfAccess, out *v1alpha3.NnfAccess, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess is an autogenerated conversion function. -func Convert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(in *NnfAccess, out *v1alpha3.NnfAccess, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfAccess_To_v1alpha3_NnfAccess(in, out, s) -} - -func autoConvert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess(in *v1alpha3.NnfAccess, out *NnfAccess, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess(in *v1alpha3.NnfAccess, out *NnfAccess, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccess_To_v1alpha1_NnfAccess(in, out, s) -} - -func autoConvert_v1alpha1_NnfAccessList_To_v1alpha3_NnfAccessList(in *NnfAccessList, out *v1alpha3.NnfAccessList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfAccess)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfAccessList_To_v1alpha3_NnfAccessList is an autogenerated conversion function. -func Convert_v1alpha1_NnfAccessList_To_v1alpha3_NnfAccessList(in *NnfAccessList, out *v1alpha3.NnfAccessList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfAccessList_To_v1alpha3_NnfAccessList(in, out, s) -} - -func autoConvert_v1alpha3_NnfAccessList_To_v1alpha1_NnfAccessList(in *v1alpha3.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfAccess)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfAccessList_To_v1alpha1_NnfAccessList is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessList_To_v1alpha1_NnfAccessList(in *v1alpha3.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessList_To_v1alpha1_NnfAccessList(in, out, s) -} - -func autoConvert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha3.NnfAccessSpec, s conversion.Scope) error { - out.DesiredState = in.DesiredState - out.TeardownState = v1alpha2.WorkflowState(in.TeardownState) - out.Target = in.Target - out.UserID = in.UserID - out.GroupID = in.GroupID - out.ClientReference = in.ClientReference - out.MountPath = in.MountPath - out.MakeClientMounts = in.MakeClientMounts - out.MountPathPrefix = in.MountPathPrefix - out.StorageReference = in.StorageReference - return nil -} - -// Convert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha3.NnfAccessSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec(in *v1alpha3.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { - out.DesiredState = in.DesiredState - out.TeardownState = v1alpha2.WorkflowState(in.TeardownState) - out.Target = in.Target - out.UserID = in.UserID - out.GroupID = in.GroupID - out.ClientReference = in.ClientReference - out.MountPath = in.MountPath - out.MakeClientMounts = in.MakeClientMounts - out.MountPathPrefix = in.MountPathPrefix - out.StorageReference = in.StorageReference - return nil -} - -// Convert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec(in *v1alpha3.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha1_NnfAccessSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha3.NnfAccessStatus, s conversion.Scope) error { - out.State = in.State - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha3.NnfAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus(in *v1alpha3.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { - out.State = in.State - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus(in *v1alpha3.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha1_NnfAccessStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha3.NnfContainerProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile is an autogenerated conversion function. -func Convert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha3.NnfContainerProfile, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in, out, s) -} - -func autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(in *v1alpha3.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(in *v1alpha3.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha1_NnfContainerProfile(in, out, s) -} - -func autoConvert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha3.NnfContainerProfileData, s conversion.Scope) error { - out.Pinned = in.Pinned - out.Storages = *(*[]v1alpha3.NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) - out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) - out.PostRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PostRunTimeoutSeconds)) - out.RetryLimit = in.RetryLimit - out.UserID = (*uint32)(unsafe.Pointer(in.UserID)) - out.GroupID = (*uint32)(unsafe.Pointer(in.GroupID)) - out.NumPorts = in.NumPorts - out.Spec = (*v1.PodSpec)(unsafe.Pointer(in.Spec)) - out.MPISpec = (*v2beta1.MPIJobSpec)(unsafe.Pointer(in.MPISpec)) - return nil -} - -// Convert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData is an autogenerated conversion function. -func Convert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha3.NnfContainerProfileData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in, out, s) -} - -func autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData(in *v1alpha3.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { - out.Pinned = in.Pinned - out.Storages = *(*[]NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) - out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) - out.PostRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PostRunTimeoutSeconds)) - out.RetryLimit = in.RetryLimit - out.UserID = (*uint32)(unsafe.Pointer(in.UserID)) - out.GroupID = (*uint32)(unsafe.Pointer(in.GroupID)) - out.NumPorts = in.NumPorts - out.Spec = (*v1.PodSpec)(unsafe.Pointer(in.Spec)) - out.MPISpec = (*v2beta1.MPIJobSpec)(unsafe.Pointer(in.MPISpec)) - return nil -} - -// Convert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData(in *v1alpha3.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha1_NnfContainerProfileData(in, out, s) -} - -func autoConvert_v1alpha1_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha3.NnfContainerProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfContainerProfile)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList is an autogenerated conversion function. -func Convert_v1alpha1_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha3.NnfContainerProfileList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in, out, s) -} - -func autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha1_NnfContainerProfileList(in *v1alpha3.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfContainerProfile)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfContainerProfileList_To_v1alpha1_NnfContainerProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileList_To_v1alpha1_NnfContainerProfileList(in *v1alpha3.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha1_NnfContainerProfileList(in, out, s) -} - -func autoConvert_v1alpha1_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha3.NnfContainerProfileStorage, s conversion.Scope) error { - out.Name = in.Name - out.Optional = in.Optional - out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) - return nil -} - -// Convert_v1alpha1_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage is an autogenerated conversion function. -func Convert_v1alpha1_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha3.NnfContainerProfileStorage, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in, out, s) -} - -func autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha1_NnfContainerProfileStorage(in *v1alpha3.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { - out.Name = in.Name - out.Optional = in.Optional - out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) - return nil -} - -// Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha1_NnfContainerProfileStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha1_NnfContainerProfileStorage(in *v1alpha3.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha1_NnfContainerProfileStorage(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *NnfDataMovement, out *v1alpha3.NnfDataMovement, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *NnfDataMovement, out *v1alpha3.NnfDataMovement, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovement_To_v1alpha3_NnfDataMovement(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement(in *v1alpha3.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement(in *v1alpha3.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovement_To_v1alpha1_NnfDataMovement(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha3.NnfDataMovementCommandStatus, s conversion.Scope) error { - out.Command = in.Command - out.ElapsedTime = in.ElapsedTime - out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) - out.LastMessage = in.LastMessage - out.LastMessageTime = in.LastMessageTime - out.Seconds = in.Seconds - out.Items = (*int32)(unsafe.Pointer(in.Items)) - out.Directories = (*int32)(unsafe.Pointer(in.Directories)) - out.Files = (*int32)(unsafe.Pointer(in.Files)) - out.Links = (*int32)(unsafe.Pointer(in.Links)) - out.Data = in.Data - out.Rate = in.Rate - return nil -} - -// Convert_v1alpha1_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha3.NnfDataMovementCommandStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha1_NnfDataMovementCommandStatus(in *v1alpha3.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { - out.Command = in.Command - out.ElapsedTime = in.ElapsedTime - out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) - out.LastMessage = in.LastMessage - out.LastMessageTime = in.LastMessageTime - out.Seconds = in.Seconds - out.Items = (*int32)(unsafe.Pointer(in.Items)) - out.Directories = (*int32)(unsafe.Pointer(in.Directories)) - out.Files = (*int32)(unsafe.Pointer(in.Files)) - out.Links = (*int32)(unsafe.Pointer(in.Links)) - out.Data = in.Data - out.Rate = in.Rate - return nil -} - -// Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha1_NnfDataMovementCommandStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha1_NnfDataMovementCommandStatus(in *v1alpha3.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha1_NnfDataMovementCommandStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha3.NnfDataMovementConfig, s conversion.Scope) error { - out.Dryrun = in.Dryrun - out.MpirunOptions = in.MpirunOptions - out.DcpOptions = in.DcpOptions - out.LogStdout = in.LogStdout - out.StoreStdout = in.StoreStdout - out.Slots = (*int)(unsafe.Pointer(in.Slots)) - out.MaxSlots = (*int)(unsafe.Pointer(in.MaxSlots)) - return nil -} - -// Convert_v1alpha1_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha3.NnfDataMovementConfig, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha1_NnfDataMovementConfig(in *v1alpha3.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { - out.Dryrun = in.Dryrun - out.MpirunOptions = in.MpirunOptions - out.DcpOptions = in.DcpOptions - out.LogStdout = in.LogStdout - out.StoreStdout = in.StoreStdout - out.Slots = (*int)(unsafe.Pointer(in.Slots)) - out.MaxSlots = (*int)(unsafe.Pointer(in.MaxSlots)) - return nil -} - -// Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha1_NnfDataMovementConfig is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha1_NnfDataMovementConfig(in *v1alpha3.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha1_NnfDataMovementConfig(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha3.NnfDataMovementList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovement)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfDataMovementList_To_v1alpha3_NnfDataMovementList is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha3.NnfDataMovementList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha1_NnfDataMovementList(in *v1alpha3.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfDataMovement)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfDataMovementList_To_v1alpha1_NnfDataMovementList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementList_To_v1alpha1_NnfDataMovementList(in *v1alpha3.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha1_NnfDataMovementList(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha3.NnfDataMovementManager, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha3.NnfDataMovementManager, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(in *v1alpha3.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(in *v1alpha3.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha1_NnfDataMovementManager(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha3.NnfDataMovementManagerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovementManager)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha3.NnfDataMovementManagerList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha1_NnfDataMovementManagerList(in *v1alpha3.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfDataMovementManager)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha1_NnfDataMovementManagerList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha1_NnfDataMovementManagerList(in *v1alpha3.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha1_NnfDataMovementManagerList(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha3.NnfDataMovementManagerSpec, s conversion.Scope) error { - out.Selector = in.Selector - out.Template = in.Template - out.UpdateStrategy = in.UpdateStrategy - out.HostPath = in.HostPath - out.MountPath = in.MountPath - return nil -} - -// Convert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha3.NnfDataMovementManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec(in *v1alpha3.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { - out.Selector = in.Selector - out.Template = in.Template - out.UpdateStrategy = in.UpdateStrategy - out.HostPath = in.HostPath - out.MountPath = in.MountPath - return nil -} - -// Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec(in *v1alpha3.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha1_NnfDataMovementManagerSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha3.NnfDataMovementManagerStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha3.NnfDataMovementManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus(in *v1alpha3.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus(in *v1alpha3.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha1_NnfDataMovementManagerStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha3.NnfDataMovementProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha3.NnfDataMovementProfile, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(in *v1alpha3.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(in *v1alpha3.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha1_NnfDataMovementProfile(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha3.NnfDataMovementProfileData, s conversion.Scope) error { - out.Default = in.Default - out.Pinned = in.Pinned - out.Slots = in.Slots - out.MaxSlots = in.MaxSlots - out.Command = in.Command - out.LogStdout = in.LogStdout - out.StoreStdout = in.StoreStdout - out.ProgressIntervalSeconds = in.ProgressIntervalSeconds - out.CreateDestDir = in.CreateDestDir - out.StatCommand = in.StatCommand - return nil -} - -// Convert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha3.NnfDataMovementProfileData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData(in *v1alpha3.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { - out.Default = in.Default - out.Pinned = in.Pinned - out.Slots = in.Slots - out.MaxSlots = in.MaxSlots - out.Command = in.Command - out.LogStdout = in.LogStdout - out.StoreStdout = in.StoreStdout - out.ProgressIntervalSeconds = in.ProgressIntervalSeconds - out.CreateDestDir = in.CreateDestDir - out.StatCommand = in.StatCommand - return nil -} - -// Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData(in *v1alpha3.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha1_NnfDataMovementProfileData(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha3.NnfDataMovementProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovementProfile)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha3.NnfDataMovementProfileList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha1_NnfDataMovementProfileList(in *v1alpha3.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfDataMovementProfile)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha1_NnfDataMovementProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha1_NnfDataMovementProfileList(in *v1alpha3.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha1_NnfDataMovementProfileList(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha3.NnfDataMovementSpec, s conversion.Scope) error { - out.Source = (*v1alpha3.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) - out.Destination = (*v1alpha3.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) - out.UserId = in.UserId - out.GroupId = in.GroupId - out.Cancel = in.Cancel - out.ProfileReference = in.ProfileReference - out.UserConfig = (*v1alpha3.NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) - return nil -} - -// Convert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha3.NnfDataMovementSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec(in *v1alpha3.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { - out.Source = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) - out.Destination = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) - out.UserId = in.UserId - out.GroupId = in.GroupId - out.Cancel = in.Cancel - out.ProfileReference = in.ProfileReference - out.UserConfig = (*NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) - return nil -} - -// Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec(in *v1alpha3.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha1_NnfDataMovementSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha3.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - out.Path = in.Path - out.StorageReference = in.StorageReference - return nil -} - -// Convert_v1alpha1_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha3.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha1_NnfDataMovementSpecSourceDestination(in *v1alpha3.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - out.Path = in.Path - out.StorageReference = in.StorageReference - return nil -} - -// Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha1_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha1_NnfDataMovementSpecSourceDestination(in *v1alpha3.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha1_NnfDataMovementSpecSourceDestination(in, out, s) -} - -func autoConvert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha3.NnfDataMovementStatus, s conversion.Scope) error { - out.State = in.State - out.Status = in.Status - out.Message = in.Message - out.StartTime = (*metav1.MicroTime)(unsafe.Pointer(in.StartTime)) - out.EndTime = (*metav1.MicroTime)(unsafe.Pointer(in.EndTime)) - out.Restarts = in.Restarts - out.CommandStatus = (*v1alpha3.NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha3.NnfDataMovementStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus(in *v1alpha3.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { - out.State = in.State - out.Status = in.Status - out.Message = in.Message - out.StartTime = (*metav1.MicroTime)(unsafe.Pointer(in.StartTime)) - out.EndTime = (*metav1.MicroTime)(unsafe.Pointer(in.EndTime)) - out.Restarts = in.Restarts - out.CommandStatus = (*NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus(in *v1alpha3.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha1_NnfDataMovementStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha3.NnfDriveStatus, s conversion.Scope) error { - out.Model = in.Model - out.SerialNumber = in.SerialNumber - out.FirmwareVersion = in.FirmwareVersion - out.Slot = in.Slot - out.Capacity = in.Capacity - out.WearLevel = in.WearLevel - if err := Convert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfDriveStatus_To_v1alpha3_NnfDriveStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha3.NnfDriveStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha1_NnfDriveStatus(in *v1alpha3.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { - out.Model = in.Model - out.SerialNumber = in.SerialNumber - out.FirmwareVersion = in.FirmwareVersion - out.Slot = in.Slot - out.Capacity = in.Capacity - out.WearLevel = in.WearLevel - if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfDriveStatus_To_v1alpha1_NnfDriveStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDriveStatus_To_v1alpha1_NnfDriveStatus(in *v1alpha3.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha1_NnfDriveStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha3.NnfLustreMGT, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT is an autogenerated conversion function. -func Convert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha3.NnfLustreMGT, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in, out, s) -} - -func autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(in *v1alpha3.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(in *v1alpha3.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha1_NnfLustreMGT(in, out, s) -} - -func autoConvert_v1alpha1_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha3.NnfLustreMGTList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfLustreMGT)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList is an autogenerated conversion function. -func Convert_v1alpha1_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha3.NnfLustreMGTList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in, out, s) -} - -func autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha1_NnfLustreMGTList(in *v1alpha3.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfLustreMGT)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfLustreMGTList_To_v1alpha1_NnfLustreMGTList is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTList_To_v1alpha1_NnfLustreMGTList(in *v1alpha3.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha1_NnfLustreMGTList(in, out, s) -} - -func autoConvert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha3.NnfLustreMGTSpec, s conversion.Scope) error { - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) - out.FsNameStart = in.FsNameStart - out.FsNameStartReference = in.FsNameStartReference - out.ClaimList = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.ClaimList)) - return nil -} - -// Convert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha3.NnfLustreMGTSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec(in *v1alpha3.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { - out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) - out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) - out.FsNameStart = in.FsNameStart - out.FsNameStartReference = in.FsNameStartReference - out.ClaimList = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.ClaimList)) - return nil -} - -// Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec(in *v1alpha3.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha1_NnfLustreMGTSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha3.NnfLustreMGTStatus, s conversion.Scope) error { - out.FsNameNext = in.FsNameNext - out.ClaimList = *(*[]v1alpha3.NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha3.NnfLustreMGTStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus(in *v1alpha3.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { - out.FsNameNext = in.FsNameNext - out.ClaimList = *(*[]NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus(in *v1alpha3.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha1_NnfLustreMGTStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha3.NnfLustreMGTStatusClaim, s conversion.Scope) error { - out.Reference = in.Reference - out.FsName = in.FsName - return nil -} - -// Convert_v1alpha1_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim is an autogenerated conversion function. -func Convert_v1alpha1_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha3.NnfLustreMGTStatusClaim, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in, out, s) -} - -func autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha1_NnfLustreMGTStatusClaim(in *v1alpha3.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { - out.Reference = in.Reference - out.FsName = in.FsName - return nil -} - -// Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha1_NnfLustreMGTStatusClaim is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha1_NnfLustreMGTStatusClaim(in *v1alpha3.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha1_NnfLustreMGTStatusClaim(in, out, s) -} - -func autoConvert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(in *NnfNode, out *v1alpha3.NnfNode, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfNode_To_v1alpha3_NnfNode is an autogenerated conversion function. -func Convert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(in *NnfNode, out *v1alpha3.NnfNode, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNode_To_v1alpha3_NnfNode(in, out, s) -} - -func autoConvert_v1alpha3_NnfNode_To_v1alpha1_NnfNode(in *v1alpha3.NnfNode, out *NnfNode, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfNode_To_v1alpha1_NnfNode is an autogenerated conversion function. -func Convert_v1alpha3_NnfNode_To_v1alpha1_NnfNode(in *v1alpha3.NnfNode, out *NnfNode, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNode_To_v1alpha1_NnfNode(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha3.NnfNodeBlockStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha3.NnfNodeBlockStorage, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(in *v1alpha3.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(in *v1alpha3.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha1_NnfNodeBlockStorage(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha3.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) - out.StorageGroupId = in.StorageGroupId - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha3.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha1_NnfNodeBlockStorageAccessStatus(in *v1alpha3.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) - out.StorageGroupId = in.StorageGroupId - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha1_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha1_NnfNodeBlockStorageAccessStatus(in *v1alpha3.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha1_NnfNodeBlockStorageAccessStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha3.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - out.Capacity = in.Capacity - out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha3.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha1_NnfNodeBlockStorageAllocationSpec(in *v1alpha3.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - out.Capacity = in.Capacity - out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha1_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha1_NnfNodeBlockStorageAllocationSpec(in *v1alpha3.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha1_NnfNodeBlockStorageAllocationSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha3.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - out.Accesses = *(*map[string]v1alpha3.NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) - out.Devices = *(*[]v1alpha3.NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) - out.CapacityAllocated = in.CapacityAllocated - out.StoragePoolId = in.StoragePoolId - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha3.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha1_NnfNodeBlockStorageAllocationStatus(in *v1alpha3.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - out.Accesses = *(*map[string]NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) - out.Devices = *(*[]NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) - out.CapacityAllocated = in.CapacityAllocated - out.StoragePoolId = in.StoragePoolId - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha1_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha1_NnfNodeBlockStorageAllocationStatus(in *v1alpha3.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha1_NnfNodeBlockStorageAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha3.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - out.NQN = in.NQN - out.NamespaceId = in.NamespaceId - out.CapacityAllocated = in.CapacityAllocated - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha3.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha1_NnfNodeBlockStorageDeviceStatus(in *v1alpha3.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - out.NQN = in.NQN - out.NamespaceId = in.NamespaceId - out.CapacityAllocated = in.CapacityAllocated - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha1_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha1_NnfNodeBlockStorageDeviceStatus(in *v1alpha3.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha1_NnfNodeBlockStorageDeviceStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha3.NnfNodeBlockStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha3.NnfNodeBlockStorageList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha1_NnfNodeBlockStorageList(in *v1alpha3.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha1_NnfNodeBlockStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha1_NnfNodeBlockStorageList(in *v1alpha3.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha1_NnfNodeBlockStorageList(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha3.NnfNodeBlockStorageSpec, s conversion.Scope) error { - out.SharedAllocation = in.SharedAllocation - out.Allocations = *(*[]v1alpha3.NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha3.NnfNodeBlockStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec(in *v1alpha3.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { - out.SharedAllocation = in.SharedAllocation - out.Allocations = *(*[]NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec(in *v1alpha3.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha1_NnfNodeBlockStorageSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha3.NnfNodeBlockStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.ResourceError = in.ResourceError - out.PodStartTime = in.PodStartTime - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha3.NnfNodeBlockStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus(in *v1alpha3.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.ResourceError = in.ResourceError - out.PodStartTime = in.PodStartTime - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus(in *v1alpha3.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha1_NnfNodeBlockStorageStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *NnfNodeECData, out *v1alpha3.NnfNodeECData, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *NnfNodeECData, out *v1alpha3.NnfNodeECData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeECData_To_v1alpha3_NnfNodeECData(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData(in *v1alpha3.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData(in *v1alpha3.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECData_To_v1alpha1_NnfNodeECData(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha3.NnfNodeECDataList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeECData)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha3.NnfNodeECDataList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha1_NnfNodeECDataList(in *v1alpha3.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfNodeECData)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfNodeECDataList_To_v1alpha1_NnfNodeECDataList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataList_To_v1alpha1_NnfNodeECDataList(in *v1alpha3.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha1_NnfNodeECDataList(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha3.NnfNodeECDataSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha3.NnfNodeECDataSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec(in *v1alpha3.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { - return nil -} - -// Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec(in *v1alpha3.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha1_NnfNodeECDataSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha3.NnfNodeECDataStatus, s conversion.Scope) error { - out.Data = *(*map[string]v1alpha3.NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) - return nil -} - -// Convert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha3.NnfNodeECDataStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus(in *v1alpha3.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { - out.Data = *(*map[string]NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) - return nil -} - -// Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus(in *v1alpha3.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha1_NnfNodeECDataStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeList_To_v1alpha3_NnfNodeList(in *NnfNodeList, out *v1alpha3.NnfNodeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNode)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfNodeList_To_v1alpha3_NnfNodeList is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeList_To_v1alpha3_NnfNodeList(in *NnfNodeList, out *v1alpha3.NnfNodeList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeList_To_v1alpha3_NnfNodeList(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeList_To_v1alpha1_NnfNodeList(in *v1alpha3.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfNode)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfNodeList_To_v1alpha1_NnfNodeList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeList_To_v1alpha1_NnfNodeList(in *v1alpha3.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeList_To_v1alpha1_NnfNodeList(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha3.NnfNodeSpec, s conversion.Scope) error { - out.Name = in.Name - out.Pod = in.Pod - out.State = v1alpha3.NnfResourceStateType(in.State) - return nil -} - -// Convert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha3.NnfNodeSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec(in *v1alpha3.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { - out.Name = in.Name - out.Pod = in.Pod - out.State = NnfResourceStateType(in.State) - return nil -} - -// Convert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec(in *v1alpha3.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha1_NnfNodeSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha3.NnfNodeStatus, s conversion.Scope) error { - out.Status = v1alpha3.NnfResourceStatusType(in.Status) - out.Health = v1alpha3.NnfResourceHealthType(in.Health) - out.Fenced = in.Fenced - out.LNetNid = in.LNetNid - out.Capacity = in.Capacity - out.CapacityAllocated = in.CapacityAllocated - out.Servers = *(*[]v1alpha3.NnfServerStatus)(unsafe.Pointer(&in.Servers)) - out.Drives = *(*[]v1alpha3.NnfDriveStatus)(unsafe.Pointer(&in.Drives)) - return nil -} - -// Convert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha3.NnfNodeStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus(in *v1alpha3.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { - out.Status = NnfResourceStatusType(in.Status) - out.Health = NnfResourceHealthType(in.Health) - out.Fenced = in.Fenced - out.LNetNid = in.LNetNid - out.Capacity = in.Capacity - out.CapacityAllocated = in.CapacityAllocated - out.Servers = *(*[]NnfServerStatus)(unsafe.Pointer(&in.Servers)) - out.Drives = *(*[]NnfDriveStatus)(unsafe.Pointer(&in.Drives)) - return nil -} - -// Convert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus(in *v1alpha3.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha1_NnfNodeStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha3.NnfNodeStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha3.NnfNodeStorage, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(in *v1alpha3.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(in *v1alpha3.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha1_NnfNodeStorage(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha3.NnfNodeStorageAllocationStatus, s conversion.Scope) error { - out.VolumeGroup = in.VolumeGroup - out.LogicalVolume = in.LogicalVolume - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha1_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha3.NnfNodeStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha1_NnfNodeStorageAllocationStatus(in *v1alpha3.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { - out.VolumeGroup = in.VolumeGroup - out.LogicalVolume = in.LogicalVolume - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha1_NnfNodeStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha1_NnfNodeStorageAllocationStatus(in *v1alpha3.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha1_NnfNodeStorageAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha3.NnfNodeStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha3.NnfNodeStorageList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha1_NnfNodeStorageList(in *v1alpha3.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfNodeStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfNodeStorageList_To_v1alpha1_NnfNodeStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageList_To_v1alpha1_NnfNodeStorageList(in *v1alpha3.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha1_NnfNodeStorageList(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha3.NnfNodeStorageSpec, s conversion.Scope) error { - out.Count = in.Count - out.SharedAllocation = in.SharedAllocation - out.Capacity = in.Capacity - out.UserID = in.UserID - out.GroupID = in.GroupID - out.FileSystemType = in.FileSystemType - if err := Convert_v1alpha1_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { - return err - } - out.BlockReference = in.BlockReference - return nil -} - -// Convert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha3.NnfNodeStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec(in *v1alpha3.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { - out.Count = in.Count - out.SharedAllocation = in.SharedAllocation - out.Capacity = in.Capacity - out.UserID = in.UserID - out.GroupID = in.GroupID - out.FileSystemType = in.FileSystemType - if err := Convert_v1alpha3_LustreStorageSpec_To_v1alpha1_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { - return err - } - out.BlockReference = in.BlockReference - return nil -} - -// Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec(in *v1alpha3.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha1_NnfNodeStorageSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha3.NnfNodeStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha3.NnfNodeStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus(in *v1alpha3.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus(in *v1alpha3.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha1_NnfNodeStorageStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(in *NnfPortManager, out *v1alpha3.NnfPortManager, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(in *NnfPortManager, out *v1alpha3.NnfPortManager, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManager_To_v1alpha3_NnfPortManager(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager(in *v1alpha3.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager(in *v1alpha3.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManager_To_v1alpha1_NnfPortManager(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha3.NnfPortManagerAllocationSpec, s conversion.Scope) error { - out.Requester = in.Requester - out.Count = in.Count - return nil -} - -// Convert_v1alpha1_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha3.NnfPortManagerAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha1_NnfPortManagerAllocationSpec(in *v1alpha3.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { - out.Requester = in.Requester - out.Count = in.Count - return nil -} - -// Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha1_NnfPortManagerAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha1_NnfPortManagerAllocationSpec(in *v1alpha3.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha1_NnfPortManagerAllocationSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha3.NnfPortManagerAllocationStatus, s conversion.Scope) error { - out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) - out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) - out.Status = v1alpha3.NnfPortManagerAllocationStatusStatus(in.Status) - out.TimeUnallocated = (*metav1.Time)(unsafe.Pointer(in.TimeUnallocated)) - return nil -} - -// Convert_v1alpha1_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha3.NnfPortManagerAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha1_NnfPortManagerAllocationStatus(in *v1alpha3.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { - out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) - out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) - out.Status = NnfPortManagerAllocationStatusStatus(in.Status) - out.TimeUnallocated = (*metav1.Time)(unsafe.Pointer(in.TimeUnallocated)) - return nil -} - -// Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha1_NnfPortManagerAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha1_NnfPortManagerAllocationStatus(in *v1alpha3.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha1_NnfPortManagerAllocationStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha3.NnfPortManagerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfPortManager)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfPortManagerList_To_v1alpha3_NnfPortManagerList is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha3.NnfPortManagerList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha1_NnfPortManagerList(in *v1alpha3.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfPortManager)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfPortManagerList_To_v1alpha1_NnfPortManagerList is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerList_To_v1alpha1_NnfPortManagerList(in *v1alpha3.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha1_NnfPortManagerList(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha3.NnfPortManagerSpec, s conversion.Scope) error { - out.SystemConfiguration = in.SystemConfiguration - out.Allocations = *(*[]v1alpha3.NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) - return nil -} - -// Convert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha3.NnfPortManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec(in *v1alpha3.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { - out.SystemConfiguration = in.SystemConfiguration - out.Allocations = *(*[]NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) - return nil -} - -// Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec(in *v1alpha3.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha1_NnfPortManagerSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha3.NnfPortManagerStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.Status = v1alpha3.NnfPortManagerStatusStatus(in.Status) - return nil -} - -// Convert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha3.NnfPortManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus(in *v1alpha3.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { - out.Allocations = *(*[]NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.Status = NnfPortManagerStatusStatus(in.Status) - return nil -} - -// Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus(in *v1alpha3.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha1_NnfPortManagerStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha3.NnfResourceStatus, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.Status = v1alpha3.NnfResourceStatusType(in.Status) - out.Health = v1alpha3.NnfResourceHealthType(in.Health) - return nil -} - -// Convert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha3.NnfResourceStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(in *v1alpha3.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { - out.ID = in.ID - out.Name = in.Name - out.Status = NnfResourceStatusType(in.Status) - out.Health = NnfResourceHealthType(in.Health) - return nil -} - -// Convert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(in *v1alpha3.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *NnfServerStatus, out *v1alpha3.NnfServerStatus, s conversion.Scope) error { - out.Hostname = in.Hostname - if err := Convert_v1alpha1_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfServerStatus_To_v1alpha3_NnfServerStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *NnfServerStatus, out *v1alpha3.NnfServerStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfServerStatus_To_v1alpha3_NnfServerStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfServerStatus_To_v1alpha1_NnfServerStatus(in *v1alpha3.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { - out.Hostname = in.Hostname - if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha1_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfServerStatus_To_v1alpha1_NnfServerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfServerStatus_To_v1alpha1_NnfServerStatus(in *v1alpha3.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfServerStatus_To_v1alpha1_NnfServerStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(in *NnfStorage, out *v1alpha3.NnfStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(in *NnfStorage, out *v1alpha3.NnfStorage, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorage_To_v1alpha3_NnfStorage(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage(in *v1alpha3.NnfStorage, out *NnfStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage(in *v1alpha3.NnfStorage, out *NnfStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorage_To_v1alpha1_NnfStorage(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha3.NnfStorageAllocationNodes, s conversion.Scope) error { - out.Name = in.Name - out.Count = in.Count - return nil -} - -// Convert_v1alpha1_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha3.NnfStorageAllocationNodes, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha1_NnfStorageAllocationNodes(in *v1alpha3.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { - out.Name = in.Name - out.Count = in.Count - return nil -} - -// Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha1_NnfStorageAllocationNodes is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha1_NnfStorageAllocationNodes(in *v1alpha3.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha1_NnfStorageAllocationNodes(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha3.NnfStorageAllocationSetSpec, s conversion.Scope) error { - out.Name = in.Name - out.Capacity = in.Capacity - if err := Convert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { - return err - } - out.SharedAllocation = in.SharedAllocation - out.Nodes = *(*[]v1alpha3.NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) - return nil -} - -// Convert_v1alpha1_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha3.NnfStorageAllocationSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha1_NnfStorageAllocationSetSpec(in *v1alpha3.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { - out.Name = in.Name - out.Capacity = in.Capacity - if err := Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { - return err - } - out.SharedAllocation = in.SharedAllocation - out.Nodes = *(*[]NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) - return nil -} - -// Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha1_NnfStorageAllocationSetSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha1_NnfStorageAllocationSetSpec(in *v1alpha3.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha1_NnfStorageAllocationSetSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha3.NnfStorageAllocationSetStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.AllocationCount = in.AllocationCount - return nil -} - -// Convert_v1alpha1_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha3.NnfStorageAllocationSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha1_NnfStorageAllocationSetStatus(in *v1alpha3.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.AllocationCount = in.AllocationCount - return nil -} - -// Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha1_NnfStorageAllocationSetStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha1_NnfStorageAllocationSetStatus(in *v1alpha3.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha1_NnfStorageAllocationSetStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageList_To_v1alpha3_NnfStorageList(in *NnfStorageList, out *v1alpha3.NnfStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_NnfStorageList_To_v1alpha3_NnfStorageList is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageList_To_v1alpha3_NnfStorageList(in *NnfStorageList, out *v1alpha3.NnfStorageList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageList_To_v1alpha3_NnfStorageList(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageList_To_v1alpha1_NnfStorageList(in *v1alpha3.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]NnfStorage)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_NnfStorageList_To_v1alpha1_NnfStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageList_To_v1alpha1_NnfStorageList(in *v1alpha3.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageList_To_v1alpha1_NnfStorageList(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha3.NnfStorageLustreSpec, s conversion.Scope) error { - out.TargetType = in.TargetType - out.BackFs = in.BackFs - out.MgsAddress = in.MgsAddress - out.PersistentMgsReference = in.PersistentMgsReference - return nil -} - -// Convert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha3.NnfStorageLustreSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec(in *v1alpha3.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { - out.TargetType = in.TargetType - out.BackFs = in.BackFs - out.MgsAddress = in.MgsAddress - out.PersistentMgsReference = in.PersistentMgsReference - return nil -} - -// Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec(in *v1alpha3.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha1_NnfStorageLustreSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha3.NnfStorageLustreStatus, s conversion.Scope) error { - out.MgsAddress = in.MgsAddress - out.FileSystemName = in.FileSystemName - out.LustreMgtReference = in.LustreMgtReference - return nil -} - -// Convert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha3.NnfStorageLustreStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus(in *v1alpha3.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { - out.MgsAddress = in.MgsAddress - out.FileSystemName = in.FileSystemName - out.LustreMgtReference = in.LustreMgtReference - return nil -} - -// Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus(in *v1alpha3.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha3.NnfStorageProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha3.NnfStorageProfile, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(in *v1alpha3.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(in *v1alpha3.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha3.NnfStorageProfileCmdLines, s conversion.Scope) error { - out.Mkfs = in.Mkfs - out.SharedVg = in.SharedVg - out.PvCreate = in.PvCreate - out.PvRemove = in.PvRemove - out.VgCreate = in.VgCreate - if err := Convert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { - return err - } - out.VgRemove = in.VgRemove - out.LvCreate = in.LvCreate - if err := Convert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { - return err - } - out.LvRemove = in.LvRemove - out.MountRabbit = in.MountRabbit - out.MountCompute = in.MountCompute - return nil -} - -// Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha3.NnfStorageProfileCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(in *v1alpha3.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s conversion.Scope) error { - out.Mkfs = in.Mkfs - out.SharedVg = in.SharedVg - out.PvCreate = in.PvCreate - out.PvRemove = in.PvRemove - out.VgCreate = in.VgCreate - if err := Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { - return err - } - out.VgRemove = in.VgRemove - out.LvCreate = in.LvCreate - if err := Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { - return err - } - out.LvRemove = in.LvRemove - out.MountRabbit = in.MountRabbit - // WARNING: in.PostActivate requires manual conversion: does not exist in peer-type - out.MountCompute = in.MountCompute - // WARNING: in.PreDeactivate requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha3.NnfStorageProfileData, s conversion.Scope) error { - out.Default = in.Default - out.Pinned = in.Pinned - if err := Convert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha3.NnfStorageProfileData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData(in *v1alpha3.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { - out.Default = in.Default - out.Pinned = in.Pinned - if err := Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData(in *v1alpha3.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha1_NnfStorageProfileData(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha3.NnfStorageProfileGFS2Data, s conversion.Scope) error { - if err := Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha3.NnfStorageProfileGFS2Data, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data(in *v1alpha3.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data(in *v1alpha3.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha1_NnfStorageProfileGFS2Data(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - out.Activate = in.Activate - out.Deactivate = in.Deactivate - return nil -} - -// Convert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - out.Activate = in.Activate - out.Deactivate = in.Deactivate - return nil -} - -// Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - out.LockStart = in.LockStart - out.LockStop = in.LockStop - return nil -} - -// Convert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - out.LockStart = in.LockStart - out.LockStop = in.LockStop - return nil -} - -// Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha1_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha3.NnfStorageProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha3.NnfStorageProfile, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha3.NnfStorageProfileList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha1_NnfStorageProfileList(in *v1alpha3.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NnfStorageProfile, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha1_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_NnfStorageProfileList_To_v1alpha1_NnfStorageProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileList_To_v1alpha1_NnfStorageProfileList(in *v1alpha3.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha1_NnfStorageProfileList(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha3.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { - out.ZpoolCreate = in.ZpoolCreate - out.Mkfs = in.Mkfs - out.MountTarget = in.MountTarget - return nil -} - -// Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha3.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(in *v1alpha3.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s conversion.Scope) error { - out.ZpoolCreate = in.ZpoolCreate - out.Mkfs = in.Mkfs - out.MountTarget = in.MountTarget - // WARNING: in.PostActivate requires manual conversion: does not exist in peer-type - // WARNING: in.PreDeactivate requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha3.NnfStorageProfileLustreData, s conversion.Scope) error { - out.CombinedMGTMDT = in.CombinedMGTMDT - out.ExternalMGS = in.ExternalMGS - out.CapacityMGT = in.CapacityMGT - out.CapacityMDT = in.CapacityMDT - out.ExclusiveMDT = in.ExclusiveMDT - out.CapacityScalingFactor = in.CapacityScalingFactor - out.StandaloneMGTPoolName = in.StandaloneMGTPoolName - if err := Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { - return err - } - out.MountRabbit = in.MountRabbit - out.MountCompute = in.MountCompute - return nil -} - -// Convert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha3.NnfStorageProfileLustreData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData(in *v1alpha3.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { - out.CombinedMGTMDT = in.CombinedMGTMDT - out.ExternalMGS = in.ExternalMGS - out.CapacityMGT = in.CapacityMGT - out.CapacityMDT = in.CapacityMDT - out.ExclusiveMDT = in.ExclusiveMDT - out.CapacityScalingFactor = in.CapacityScalingFactor - out.StandaloneMGTPoolName = in.StandaloneMGTPoolName - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha1_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { - return err - } - out.MountRabbit = in.MountRabbit - out.MountCompute = in.MountCompute - return nil -} - -// Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData(in *v1alpha3.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha1_NnfStorageProfileLustreData(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha3.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - out.ColocateComputes = in.ColocateComputes - out.Count = in.Count - out.Scale = in.Scale - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - return nil -} - -// Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha3.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(in *v1alpha3.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - out.ColocateComputes = in.ColocateComputes - out.Count = in.Count - out.Scale = in.Scale - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - return nil -} - -// Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(in *v1alpha3.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha1_NnfStorageProfileLustreMiscOptions(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha3.NnfStorageProfileRawData, s conversion.Scope) error { - if err := Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha3.NnfStorageProfileRawData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData(in *v1alpha3.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData(in *v1alpha3.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha1_NnfStorageProfileRawData(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha3.NnfStorageProfileXFSData, s conversion.Scope) error { - if err := Convert_v1alpha1_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha3.NnfStorageProfileXFSData, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData(in *v1alpha3.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha1_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { - return err - } - out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) - out.CapacityScalingFactor = in.CapacityScalingFactor - return nil -} - -// Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData(in *v1alpha3.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha1_NnfStorageProfileXFSData(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha3.NnfStorageSpec, s conversion.Scope) error { - out.FileSystemType = in.FileSystemType - out.UserID = in.UserID - out.GroupID = in.GroupID - out.AllocationSets = *(*[]v1alpha3.NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) - return nil -} - -// Convert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha3.NnfStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec(in *v1alpha3.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { - out.FileSystemType = in.FileSystemType - out.UserID = in.UserID - out.GroupID = in.GroupID - out.AllocationSets = *(*[]NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) - return nil -} - -// Convert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec(in *v1alpha3.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha1_NnfStorageSpec(in, out, s) -} - -func autoConvert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha3.NnfStorageStatus, s conversion.Scope) error { - if err := Convert_v1alpha1_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { - return err - } - out.AllocationSets = *(*[]v1alpha3.NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) - out.ResourceError = in.ResourceError - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha3.NnfStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus(in *v1alpha3.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha1_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { - return err - } - out.AllocationSets = *(*[]NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) - out.ResourceError = in.ResourceError - out.Ready = in.Ready - return nil -} - -// Convert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus(in *v1alpha3.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha1_NnfStorageStatus(in, out, s) -} - -func autoConvert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha3.NnfSystemStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage is an autogenerated conversion function. -func Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha3.NnfSystemStorage, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in, out, s) -} - -func autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(in *v1alpha3.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(in *v1alpha3.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(in, out, s) -} - -func autoConvert_v1alpha1_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha3.NnfSystemStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha3.NnfSystemStorage, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha1_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList is an autogenerated conversion function. -func Convert_v1alpha1_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha3.NnfSystemStorageList, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in, out, s) -} - -func autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha1_NnfSystemStorageList(in *v1alpha3.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NnfSystemStorage, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_NnfSystemStorage_To_v1alpha1_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_NnfSystemStorageList_To_v1alpha1_NnfSystemStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorageList_To_v1alpha1_NnfSystemStorageList(in *v1alpha3.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha1_NnfSystemStorageList(in, out, s) -} - -func autoConvert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha3.NnfSystemStorageSpec, s conversion.Scope) error { - out.SystemConfiguration = in.SystemConfiguration - out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) - out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) - out.ExcludeComputes = *(*[]string)(unsafe.Pointer(&in.ExcludeComputes)) - out.IncludeComputes = *(*[]string)(unsafe.Pointer(&in.IncludeComputes)) - out.ComputesTarget = v1alpha3.NnfSystemStorageComputesTarget(in.ComputesTarget) - out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) - out.Capacity = in.Capacity - out.Type = in.Type - out.StorageProfile = in.StorageProfile - out.MakeClientMounts = in.MakeClientMounts - out.ClientMountPath = in.ClientMountPath - return nil -} - -// Convert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec is an autogenerated conversion function. -func Convert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha3.NnfSystemStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in, out, s) -} - -func autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha1_NnfSystemStorageSpec(in *v1alpha3.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s conversion.Scope) error { - out.SystemConfiguration = in.SystemConfiguration - out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) - out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) - // WARNING: in.ExcludeDisabledRabbits requires manual conversion: does not exist in peer-type - out.ExcludeComputes = *(*[]string)(unsafe.Pointer(&in.ExcludeComputes)) - out.IncludeComputes = *(*[]string)(unsafe.Pointer(&in.IncludeComputes)) - out.ComputesTarget = NnfSystemStorageComputesTarget(in.ComputesTarget) - out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) - out.Capacity = in.Capacity - out.Type = in.Type - out.StorageProfile = in.StorageProfile - out.MakeClientMounts = in.MakeClientMounts - out.ClientMountPath = in.ClientMountPath - return nil -} - -func autoConvert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha3.NnfSystemStorageStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus is an autogenerated conversion function. -func Convert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha3.NnfSystemStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in, out, s) -} - -func autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus(in *v1alpha3.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { - out.Ready = in.Ready - out.ResourceError = in.ResourceError - return nil -} - -// Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus(in *v1alpha3.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha1_NnfSystemStorageStatus(in, out, s) -} diff --git a/api/v1alpha2/conversion.go b/api/v1alpha2/conversion.go index 9b8d409f1..1049d3bfc 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,29 +34,36 @@ 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{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + restored := &nnfv1alpha4.NnfAccess{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { return err } // EDIT THIS FUNCTION! If the annotation is holding anything that is // hub-specific then copy it into 'dst' from 'restored'. // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Spec.IgnoreOfflineComputes = restored.Spec.IgnoreOfflineComputes + } else { + dst.Spec.IgnoreOfflineComputes = false + } + return nil } 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 +73,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 +92,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 +105,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 +124,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 +137,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 +156,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,29 +169,35 @@ 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{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + restored := &nnfv1alpha4.NnfDataMovementProfile{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { return err } + // EDIT THIS FUNCTION! If the annotation is holding anything that is // hub-specific then copy it into 'dst' from 'restored'. // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Data.MkdirCommand = restored.Data.MkdirCommand + } + return nil } 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 +207,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 +226,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 +239,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 +258,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 +271,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 +290,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 +303,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 +322,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,29 +335,37 @@ 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{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + restored := &nnfv1alpha4.NnfNodeStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { return err } // EDIT THIS FUNCTION! If the annotation is holding anything that is // hub-specific then copy it into 'dst' from 'restored'. // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Spec.LustreStorage.LustreComponents.MDTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MDTs...) + dst.Spec.LustreStorage.LustreComponents.MGTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MGTs...) + dst.Spec.LustreStorage.LustreComponents.MGTMDTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MGTMDTs...) + dst.Spec.LustreStorage.LustreComponents.OSTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.OSTs...) + dst.Spec.LustreStorage.LustreComponents.NNFNodes = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.NNFNodes...) + } return nil } 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 +375,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 +394,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,29 +407,38 @@ 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{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + restored := &nnfv1alpha4.NnfStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { return err } + // EDIT THIS FUNCTION! If the annotation is holding anything that is // hub-specific then copy it into 'dst' from 'restored'. // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Status.LustreComponents.MDTs = append([]string(nil), restored.Status.LustreComponents.MDTs...) + dst.Status.LustreComponents.MGTs = append([]string(nil), restored.Status.LustreComponents.MGTs...) + dst.Status.LustreComponents.MGTMDTs = append([]string(nil), restored.Status.LustreComponents.MGTMDTs...) + dst.Status.LustreComponents.OSTs = append([]string(nil), restored.Status.LustreComponents.OSTs...) + dst.Status.LustreComponents.NNFNodes = append([]string(nil), restored.Status.LustreComponents.NNFNodes...) + } return nil } 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 +448,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 @@ -437,28 +467,36 @@ func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { if hasAnno { dst.Data.LustreStorage.MgtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PostActivate...) dst.Data.LustreStorage.MgtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PreDeactivate...) + dst.Data.LustreStorage.MgtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PostMount...) + dst.Data.LustreStorage.MgtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PreUnmount...) dst.Data.LustreStorage.MgtMdtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PostActivate...) dst.Data.LustreStorage.MgtMdtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PreDeactivate...) + dst.Data.LustreStorage.MgtMdtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PostMount...) + dst.Data.LustreStorage.MgtMdtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PreUnmount...) dst.Data.LustreStorage.MdtCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PostActivate...) dst.Data.LustreStorage.MdtCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PreDeactivate...) + dst.Data.LustreStorage.MdtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PostMount...) + dst.Data.LustreStorage.MdtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PreUnmount...) dst.Data.LustreStorage.OstCmdLines.PostActivate = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PostActivate...) dst.Data.LustreStorage.OstCmdLines.PreDeactivate = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PreDeactivate...) - dst.Data.RawStorage.CmdLines.PostActivate = append([]string(nil), restored.Data.RawStorage.CmdLines.PostActivate...) - dst.Data.RawStorage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.RawStorage.CmdLines.PreDeactivate...) - dst.Data.XFSStorage.CmdLines.PostActivate = append([]string(nil), restored.Data.XFSStorage.CmdLines.PostActivate...) - dst.Data.XFSStorage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.XFSStorage.CmdLines.PreDeactivate...) - dst.Data.GFS2Storage.CmdLines.PostActivate = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PostActivate...) - dst.Data.GFS2Storage.CmdLines.PreDeactivate = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PreDeactivate...) + dst.Data.LustreStorage.OstCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PostMount...) + dst.Data.LustreStorage.OstCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PreUnmount...) + dst.Data.RawStorage.CmdLines.PostMount = append([]string(nil), restored.Data.RawStorage.CmdLines.PostMount...) + dst.Data.RawStorage.CmdLines.PreUnmount = append([]string(nil), restored.Data.RawStorage.CmdLines.PreUnmount...) + dst.Data.XFSStorage.CmdLines.PostMount = append([]string(nil), restored.Data.XFSStorage.CmdLines.PostMount...) + dst.Data.XFSStorage.CmdLines.PreUnmount = append([]string(nil), restored.Data.XFSStorage.CmdLines.PreUnmount...) + dst.Data.GFS2Storage.CmdLines.PostMount = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PostMount...) + dst.Data.GFS2Storage.CmdLines.PreUnmount = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PreUnmount...) } return nil } 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,29 +506,38 @@ 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{} - if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + restored := &nnfv1alpha4.NnfSystemStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { return err } // EDIT THIS FUNCTION! If the annotation is holding anything that is // hub-specific then copy it into 'dst' from 'restored'. // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Spec.Shared = restored.Spec.Shared + dst.Spec.IgnoreOfflineComputes = restored.Spec.IgnoreOfflineComputes + } else { + dst.Spec.Shared = true + dst.Spec.IgnoreOfflineComputes = false + } + return nil } 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 +669,30 @@ 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_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in *nnfv1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in, out, s) +} + +func Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in *nnfv1alpha4.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in, out, s) +} + +func Convert_v1alpha4_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in *nnfv1alpha4.NnfAccessSpec, out *NnfAccessSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in, out, s) +} + +func Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in *nnfv1alpha4.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in, out, s) +} + +func Convert_v1alpha4_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(in *nnfv1alpha4.LustreStorageSpec, out *LustreStorageSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(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_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in *nnfv1alpha4.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in, out, s) } diff --git a/api/v1alpha2/conversion_test.go b/api/v1alpha2/conversion_test.go index a3ef55b98..ed0bd7501 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 3abb1764f..d98f23f90 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 diff --git a/api/v1alpha2/zz_generated.conversion.go b/api/v1alpha2/zz_generated.conversion.go index 31e804b18..bd69100dd 100644 --- a/api/v1alpha2/zz_generated.conversion.go +++ b/api/v1alpha2/zz_generated.conversion.go @@ -28,7 +28,7 @@ import ( unsafe "unsafe" apiv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - v1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + v1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" v2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,840 +43,840 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*LustreStorageSpec)(nil), (*v1alpha3.LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(a.(*LustreStorageSpec), b.(*v1alpha3.LustreStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*LustreStorageSpec)(nil), (*v1alpha4.LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(a.(*LustreStorageSpec), b.(*v1alpha4.LustreStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.LustreStorageSpec)(nil), (*LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(a.(*v1alpha3.LustreStorageSpec), b.(*LustreStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfAccess)(nil), (*v1alpha4.NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(a.(*NnfAccess), b.(*v1alpha4.NnfAccess), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfAccess)(nil), (*v1alpha3.NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess(a.(*NnfAccess), b.(*v1alpha3.NnfAccess), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccess)(nil), (*NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(a.(*v1alpha4.NnfAccess), b.(*NnfAccess), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccess)(nil), (*NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess(a.(*v1alpha3.NnfAccess), b.(*NnfAccess), scope) + if err := s.AddGeneratedConversionFunc((*NnfAccessList)(nil), (*v1alpha4.NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfAccessList_To_v1alpha4_NnfAccessList(a.(*NnfAccessList), b.(*v1alpha4.NnfAccessList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfAccessList)(nil), (*v1alpha3.NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfAccessList_To_v1alpha3_NnfAccessList(a.(*NnfAccessList), b.(*v1alpha3.NnfAccessList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccessList)(nil), (*NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessList_To_v1alpha2_NnfAccessList(a.(*v1alpha4.NnfAccessList), b.(*NnfAccessList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessList)(nil), (*NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessList_To_v1alpha2_NnfAccessList(a.(*v1alpha3.NnfAccessList), b.(*NnfAccessList), scope) + if err := s.AddGeneratedConversionFunc((*NnfAccessSpec)(nil), (*v1alpha4.NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(a.(*NnfAccessSpec), b.(*v1alpha4.NnfAccessSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfAccessSpec)(nil), (*v1alpha3.NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(a.(*NnfAccessSpec), b.(*v1alpha3.NnfAccessSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfAccessStatus)(nil), (*v1alpha4.NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(a.(*NnfAccessStatus), b.(*v1alpha4.NnfAccessStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessSpec)(nil), (*NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(a.(*v1alpha3.NnfAccessSpec), b.(*NnfAccessSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccessStatus)(nil), (*NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(a.(*v1alpha4.NnfAccessStatus), b.(*NnfAccessStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfAccessStatus)(nil), (*v1alpha3.NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(a.(*NnfAccessStatus), b.(*v1alpha3.NnfAccessStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfContainerProfile)(nil), (*v1alpha4.NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(a.(*NnfContainerProfile), b.(*v1alpha4.NnfContainerProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfAccessStatus)(nil), (*NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(a.(*v1alpha3.NnfAccessStatus), b.(*NnfAccessStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfile)(nil), (*NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(a.(*v1alpha4.NnfContainerProfile), b.(*NnfContainerProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfile)(nil), (*v1alpha3.NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(a.(*NnfContainerProfile), b.(*v1alpha3.NnfContainerProfile), scope) + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileData)(nil), (*v1alpha4.NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(a.(*NnfContainerProfileData), b.(*v1alpha4.NnfContainerProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfile)(nil), (*NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(a.(*v1alpha3.NnfContainerProfile), b.(*NnfContainerProfile), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileData)(nil), (*NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(a.(*v1alpha4.NnfContainerProfileData), b.(*NnfContainerProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileData)(nil), (*v1alpha3.NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(a.(*NnfContainerProfileData), b.(*v1alpha3.NnfContainerProfileData), scope) + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileList)(nil), (*v1alpha4.NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(a.(*NnfContainerProfileList), b.(*v1alpha4.NnfContainerProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileData)(nil), (*NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(a.(*v1alpha3.NnfContainerProfileData), b.(*NnfContainerProfileData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileList)(nil), (*NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(a.(*v1alpha4.NnfContainerProfileList), b.(*NnfContainerProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileList)(nil), (*v1alpha3.NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(a.(*NnfContainerProfileList), b.(*v1alpha3.NnfContainerProfileList), scope) + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileStorage)(nil), (*v1alpha4.NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(a.(*NnfContainerProfileStorage), b.(*v1alpha4.NnfContainerProfileStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileList)(nil), (*NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(a.(*v1alpha3.NnfContainerProfileList), b.(*NnfContainerProfileList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileStorage)(nil), (*NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(a.(*v1alpha4.NnfContainerProfileStorage), b.(*NnfContainerProfileStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfContainerProfileStorage)(nil), (*v1alpha3.NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(a.(*NnfContainerProfileStorage), b.(*v1alpha3.NnfContainerProfileStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovement)(nil), (*v1alpha4.NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement(a.(*NnfDataMovement), b.(*v1alpha4.NnfDataMovement), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfContainerProfileStorage)(nil), (*NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(a.(*v1alpha3.NnfContainerProfileStorage), b.(*NnfContainerProfileStorage), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovement)(nil), (*NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement(a.(*v1alpha4.NnfDataMovement), b.(*NnfDataMovement), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovement)(nil), (*v1alpha3.NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement(a.(*NnfDataMovement), b.(*v1alpha3.NnfDataMovement), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementCommandStatus)(nil), (*v1alpha4.NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(a.(*NnfDataMovementCommandStatus), b.(*v1alpha4.NnfDataMovementCommandStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovement)(nil), (*NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement(a.(*v1alpha3.NnfDataMovement), b.(*NnfDataMovement), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementCommandStatus)(nil), (*NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(a.(*v1alpha4.NnfDataMovementCommandStatus), b.(*NnfDataMovementCommandStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementCommandStatus)(nil), (*v1alpha3.NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(a.(*NnfDataMovementCommandStatus), b.(*v1alpha3.NnfDataMovementCommandStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementConfig)(nil), (*v1alpha4.NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(a.(*NnfDataMovementConfig), b.(*v1alpha4.NnfDataMovementConfig), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementCommandStatus)(nil), (*NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(a.(*v1alpha3.NnfDataMovementCommandStatus), b.(*NnfDataMovementCommandStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementConfig)(nil), (*NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(a.(*v1alpha4.NnfDataMovementConfig), b.(*NnfDataMovementConfig), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementConfig)(nil), (*v1alpha3.NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(a.(*NnfDataMovementConfig), b.(*v1alpha3.NnfDataMovementConfig), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementList)(nil), (*v1alpha4.NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(a.(*NnfDataMovementList), b.(*v1alpha4.NnfDataMovementList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementConfig)(nil), (*NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(a.(*v1alpha3.NnfDataMovementConfig), b.(*NnfDataMovementConfig), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementList)(nil), (*NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(a.(*v1alpha4.NnfDataMovementList), b.(*NnfDataMovementList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementList)(nil), (*v1alpha3.NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(a.(*NnfDataMovementList), b.(*v1alpha3.NnfDataMovementList), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManager)(nil), (*v1alpha4.NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(a.(*NnfDataMovementManager), b.(*v1alpha4.NnfDataMovementManager), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementList)(nil), (*NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(a.(*v1alpha3.NnfDataMovementList), b.(*NnfDataMovementList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManager)(nil), (*NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(a.(*v1alpha4.NnfDataMovementManager), b.(*NnfDataMovementManager), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManager)(nil), (*v1alpha3.NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(a.(*NnfDataMovementManager), b.(*v1alpha3.NnfDataMovementManager), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerList)(nil), (*v1alpha4.NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(a.(*NnfDataMovementManagerList), b.(*v1alpha4.NnfDataMovementManagerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManager)(nil), (*NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(a.(*v1alpha3.NnfDataMovementManager), b.(*NnfDataMovementManager), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerList)(nil), (*NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(a.(*v1alpha4.NnfDataMovementManagerList), b.(*NnfDataMovementManagerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerList)(nil), (*v1alpha3.NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(a.(*NnfDataMovementManagerList), b.(*v1alpha3.NnfDataMovementManagerList), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerSpec)(nil), (*v1alpha4.NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(a.(*NnfDataMovementManagerSpec), b.(*v1alpha4.NnfDataMovementManagerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerList)(nil), (*NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(a.(*v1alpha3.NnfDataMovementManagerList), b.(*NnfDataMovementManagerList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerSpec)(nil), (*NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(a.(*v1alpha4.NnfDataMovementManagerSpec), b.(*NnfDataMovementManagerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerSpec)(nil), (*v1alpha3.NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(a.(*NnfDataMovementManagerSpec), b.(*v1alpha3.NnfDataMovementManagerSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerStatus)(nil), (*v1alpha4.NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(a.(*NnfDataMovementManagerStatus), b.(*v1alpha4.NnfDataMovementManagerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerSpec)(nil), (*NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(a.(*v1alpha3.NnfDataMovementManagerSpec), b.(*NnfDataMovementManagerSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerStatus)(nil), (*NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(a.(*v1alpha4.NnfDataMovementManagerStatus), b.(*NnfDataMovementManagerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerStatus)(nil), (*v1alpha3.NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(a.(*NnfDataMovementManagerStatus), b.(*v1alpha3.NnfDataMovementManagerStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfile)(nil), (*v1alpha4.NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(a.(*NnfDataMovementProfile), b.(*v1alpha4.NnfDataMovementProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementManagerStatus)(nil), (*NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(a.(*v1alpha3.NnfDataMovementManagerStatus), b.(*NnfDataMovementManagerStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementProfile)(nil), (*NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(a.(*v1alpha4.NnfDataMovementProfile), b.(*NnfDataMovementProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfile)(nil), (*v1alpha3.NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(a.(*NnfDataMovementProfile), b.(*v1alpha3.NnfDataMovementProfile), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileData)(nil), (*v1alpha4.NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(a.(*NnfDataMovementProfileData), b.(*v1alpha4.NnfDataMovementProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfile)(nil), (*NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(a.(*v1alpha3.NnfDataMovementProfile), b.(*NnfDataMovementProfile), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileList)(nil), (*v1alpha4.NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(a.(*NnfDataMovementProfileList), b.(*v1alpha4.NnfDataMovementProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileData)(nil), (*v1alpha3.NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(a.(*NnfDataMovementProfileData), b.(*v1alpha3.NnfDataMovementProfileData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementProfileList)(nil), (*NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(a.(*v1alpha4.NnfDataMovementProfileList), b.(*NnfDataMovementProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfileData)(nil), (*NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(a.(*v1alpha3.NnfDataMovementProfileData), b.(*NnfDataMovementProfileData), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpec)(nil), (*v1alpha4.NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(a.(*NnfDataMovementSpec), b.(*v1alpha4.NnfDataMovementSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileList)(nil), (*v1alpha3.NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(a.(*NnfDataMovementProfileList), b.(*v1alpha3.NnfDataMovementProfileList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementSpec)(nil), (*NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(a.(*v1alpha4.NnfDataMovementSpec), b.(*NnfDataMovementSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementProfileList)(nil), (*NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(a.(*v1alpha3.NnfDataMovementProfileList), b.(*NnfDataMovementProfileList), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpecSourceDestination)(nil), (*v1alpha4.NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(a.(*NnfDataMovementSpecSourceDestination), b.(*v1alpha4.NnfDataMovementSpecSourceDestination), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpec)(nil), (*v1alpha3.NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(a.(*NnfDataMovementSpec), b.(*v1alpha3.NnfDataMovementSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementSpecSourceDestination)(nil), (*NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(a.(*v1alpha4.NnfDataMovementSpecSourceDestination), b.(*NnfDataMovementSpecSourceDestination), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementSpec)(nil), (*NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(a.(*v1alpha3.NnfDataMovementSpec), b.(*NnfDataMovementSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfDataMovementStatus)(nil), (*v1alpha4.NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(a.(*NnfDataMovementStatus), b.(*v1alpha4.NnfDataMovementStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpecSourceDestination)(nil), (*v1alpha3.NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(a.(*NnfDataMovementSpecSourceDestination), b.(*v1alpha3.NnfDataMovementSpecSourceDestination), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementStatus)(nil), (*NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(a.(*v1alpha4.NnfDataMovementStatus), b.(*NnfDataMovementStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementSpecSourceDestination)(nil), (*NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(a.(*v1alpha3.NnfDataMovementSpecSourceDestination), b.(*NnfDataMovementSpecSourceDestination), scope) + if err := s.AddGeneratedConversionFunc((*NnfDriveStatus)(nil), (*v1alpha4.NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(a.(*NnfDriveStatus), b.(*v1alpha4.NnfDriveStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDataMovementStatus)(nil), (*v1alpha3.NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(a.(*NnfDataMovementStatus), b.(*v1alpha3.NnfDataMovementStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDriveStatus)(nil), (*NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(a.(*v1alpha4.NnfDriveStatus), b.(*NnfDriveStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDataMovementStatus)(nil), (*NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(a.(*v1alpha3.NnfDataMovementStatus), b.(*NnfDataMovementStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfLustreMGT)(nil), (*v1alpha4.NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(a.(*NnfLustreMGT), b.(*v1alpha4.NnfLustreMGT), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfDriveStatus)(nil), (*v1alpha3.NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(a.(*NnfDriveStatus), b.(*v1alpha3.NnfDriveStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGT)(nil), (*NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(a.(*v1alpha4.NnfLustreMGT), b.(*NnfLustreMGT), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfDriveStatus)(nil), (*NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(a.(*v1alpha3.NnfDriveStatus), b.(*NnfDriveStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTList)(nil), (*v1alpha4.NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(a.(*NnfLustreMGTList), b.(*v1alpha4.NnfLustreMGTList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGT)(nil), (*v1alpha3.NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(a.(*NnfLustreMGT), b.(*v1alpha3.NnfLustreMGT), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTList)(nil), (*NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(a.(*v1alpha4.NnfLustreMGTList), b.(*NnfLustreMGTList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGT)(nil), (*NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(a.(*v1alpha3.NnfLustreMGT), b.(*NnfLustreMGT), scope) + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTSpec)(nil), (*v1alpha4.NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(a.(*NnfLustreMGTSpec), b.(*v1alpha4.NnfLustreMGTSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTList)(nil), (*v1alpha3.NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(a.(*NnfLustreMGTList), b.(*v1alpha3.NnfLustreMGTList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTSpec)(nil), (*NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(a.(*v1alpha4.NnfLustreMGTSpec), b.(*NnfLustreMGTSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTList)(nil), (*NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(a.(*v1alpha3.NnfLustreMGTList), b.(*NnfLustreMGTList), scope) + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatus)(nil), (*v1alpha4.NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(a.(*NnfLustreMGTStatus), b.(*v1alpha4.NnfLustreMGTStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTSpec)(nil), (*v1alpha3.NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(a.(*NnfLustreMGTSpec), b.(*v1alpha3.NnfLustreMGTSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTStatus)(nil), (*NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(a.(*v1alpha4.NnfLustreMGTStatus), b.(*NnfLustreMGTStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTSpec)(nil), (*NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(a.(*v1alpha3.NnfLustreMGTSpec), b.(*NnfLustreMGTSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatusClaim)(nil), (*v1alpha4.NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(a.(*NnfLustreMGTStatusClaim), b.(*v1alpha4.NnfLustreMGTStatusClaim), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatus)(nil), (*v1alpha3.NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(a.(*NnfLustreMGTStatus), b.(*v1alpha3.NnfLustreMGTStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTStatusClaim)(nil), (*NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(a.(*v1alpha4.NnfLustreMGTStatusClaim), b.(*NnfLustreMGTStatusClaim), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTStatus)(nil), (*NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(a.(*v1alpha3.NnfLustreMGTStatus), b.(*NnfLustreMGTStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNode)(nil), (*v1alpha4.NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNode_To_v1alpha4_NnfNode(a.(*NnfNode), b.(*v1alpha4.NnfNode), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatusClaim)(nil), (*v1alpha3.NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(a.(*NnfLustreMGTStatusClaim), b.(*v1alpha3.NnfLustreMGTStatusClaim), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNode)(nil), (*NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNode_To_v1alpha2_NnfNode(a.(*v1alpha4.NnfNode), b.(*NnfNode), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfLustreMGTStatusClaim)(nil), (*NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(a.(*v1alpha3.NnfLustreMGTStatusClaim), b.(*NnfLustreMGTStatusClaim), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorage)(nil), (*v1alpha4.NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(a.(*NnfNodeBlockStorage), b.(*v1alpha4.NnfNodeBlockStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNode)(nil), (*v1alpha3.NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNode_To_v1alpha3_NnfNode(a.(*NnfNode), b.(*v1alpha3.NnfNode), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorage)(nil), (*NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(a.(*v1alpha4.NnfNodeBlockStorage), b.(*NnfNodeBlockStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNode)(nil), (*NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNode_To_v1alpha2_NnfNode(a.(*v1alpha3.NnfNode), b.(*NnfNode), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAccessStatus)(nil), (*v1alpha4.NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(a.(*NnfNodeBlockStorageAccessStatus), b.(*v1alpha4.NnfNodeBlockStorageAccessStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorage)(nil), (*v1alpha3.NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(a.(*NnfNodeBlockStorage), b.(*v1alpha3.NnfNodeBlockStorage), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAccessStatus)(nil), (*NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(a.(*v1alpha4.NnfNodeBlockStorageAccessStatus), b.(*NnfNodeBlockStorageAccessStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorage)(nil), (*NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(a.(*v1alpha3.NnfNodeBlockStorage), b.(*NnfNodeBlockStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationSpec)(nil), (*v1alpha4.NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(a.(*NnfNodeBlockStorageAllocationSpec), b.(*v1alpha4.NnfNodeBlockStorageAllocationSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAccessStatus)(nil), (*v1alpha3.NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(a.(*NnfNodeBlockStorageAccessStatus), b.(*v1alpha3.NnfNodeBlockStorageAccessStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAllocationSpec)(nil), (*NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(a.(*v1alpha4.NnfNodeBlockStorageAllocationSpec), b.(*NnfNodeBlockStorageAllocationSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAccessStatus)(nil), (*NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(a.(*v1alpha3.NnfNodeBlockStorageAccessStatus), b.(*NnfNodeBlockStorageAccessStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationStatus)(nil), (*v1alpha4.NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(a.(*NnfNodeBlockStorageAllocationStatus), b.(*v1alpha4.NnfNodeBlockStorageAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationSpec)(nil), (*v1alpha3.NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(a.(*NnfNodeBlockStorageAllocationSpec), b.(*v1alpha3.NnfNodeBlockStorageAllocationSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAllocationStatus)(nil), (*NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(a.(*v1alpha4.NnfNodeBlockStorageAllocationStatus), b.(*NnfNodeBlockStorageAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAllocationSpec)(nil), (*NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(a.(*v1alpha3.NnfNodeBlockStorageAllocationSpec), b.(*NnfNodeBlockStorageAllocationSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageDeviceStatus)(nil), (*v1alpha4.NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(a.(*NnfNodeBlockStorageDeviceStatus), b.(*v1alpha4.NnfNodeBlockStorageDeviceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationStatus)(nil), (*v1alpha3.NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(a.(*NnfNodeBlockStorageAllocationStatus), b.(*v1alpha3.NnfNodeBlockStorageAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageDeviceStatus)(nil), (*NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(a.(*v1alpha4.NnfNodeBlockStorageDeviceStatus), b.(*NnfNodeBlockStorageDeviceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageAllocationStatus)(nil), (*NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(a.(*v1alpha3.NnfNodeBlockStorageAllocationStatus), b.(*NnfNodeBlockStorageAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageList)(nil), (*v1alpha4.NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(a.(*NnfNodeBlockStorageList), b.(*v1alpha4.NnfNodeBlockStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageDeviceStatus)(nil), (*v1alpha3.NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(a.(*NnfNodeBlockStorageDeviceStatus), b.(*v1alpha3.NnfNodeBlockStorageDeviceStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageList)(nil), (*NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(a.(*v1alpha4.NnfNodeBlockStorageList), b.(*NnfNodeBlockStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageDeviceStatus)(nil), (*NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(a.(*v1alpha3.NnfNodeBlockStorageDeviceStatus), b.(*NnfNodeBlockStorageDeviceStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageSpec)(nil), (*v1alpha4.NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(a.(*NnfNodeBlockStorageSpec), b.(*v1alpha4.NnfNodeBlockStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageList)(nil), (*v1alpha3.NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(a.(*NnfNodeBlockStorageList), b.(*v1alpha3.NnfNodeBlockStorageList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageSpec)(nil), (*NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(a.(*v1alpha4.NnfNodeBlockStorageSpec), b.(*NnfNodeBlockStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageList)(nil), (*NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(a.(*v1alpha3.NnfNodeBlockStorageList), b.(*NnfNodeBlockStorageList), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageStatus)(nil), (*v1alpha4.NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(a.(*NnfNodeBlockStorageStatus), b.(*v1alpha4.NnfNodeBlockStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageSpec)(nil), (*v1alpha3.NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(a.(*NnfNodeBlockStorageSpec), b.(*v1alpha3.NnfNodeBlockStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageStatus)(nil), (*NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(a.(*v1alpha4.NnfNodeBlockStorageStatus), b.(*NnfNodeBlockStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageSpec)(nil), (*NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(a.(*v1alpha3.NnfNodeBlockStorageSpec), b.(*NnfNodeBlockStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeECData)(nil), (*v1alpha4.NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData(a.(*NnfNodeECData), b.(*v1alpha4.NnfNodeECData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageStatus)(nil), (*v1alpha3.NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(a.(*NnfNodeBlockStorageStatus), b.(*v1alpha3.NnfNodeBlockStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECData)(nil), (*NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData(a.(*v1alpha4.NnfNodeECData), b.(*NnfNodeECData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeBlockStorageStatus)(nil), (*NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(a.(*v1alpha3.NnfNodeBlockStorageStatus), b.(*NnfNodeBlockStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataList)(nil), (*v1alpha4.NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(a.(*NnfNodeECDataList), b.(*v1alpha4.NnfNodeECDataList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeECData)(nil), (*v1alpha3.NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData(a.(*NnfNodeECData), b.(*v1alpha3.NnfNodeECData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataList)(nil), (*NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(a.(*v1alpha4.NnfNodeECDataList), b.(*NnfNodeECDataList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECData)(nil), (*NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData(a.(*v1alpha3.NnfNodeECData), b.(*NnfNodeECData), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataSpec)(nil), (*v1alpha4.NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(a.(*NnfNodeECDataSpec), b.(*v1alpha4.NnfNodeECDataSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataList)(nil), (*v1alpha3.NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(a.(*NnfNodeECDataList), b.(*v1alpha3.NnfNodeECDataList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataSpec)(nil), (*NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(a.(*v1alpha4.NnfNodeECDataSpec), b.(*NnfNodeECDataSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataList)(nil), (*NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(a.(*v1alpha3.NnfNodeECDataList), b.(*NnfNodeECDataList), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataStatus)(nil), (*v1alpha4.NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(a.(*NnfNodeECDataStatus), b.(*v1alpha4.NnfNodeECDataStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataSpec)(nil), (*v1alpha3.NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(a.(*NnfNodeECDataSpec), b.(*v1alpha3.NnfNodeECDataSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataStatus)(nil), (*NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(a.(*v1alpha4.NnfNodeECDataStatus), b.(*NnfNodeECDataStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataSpec)(nil), (*NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(a.(*v1alpha3.NnfNodeECDataSpec), b.(*NnfNodeECDataSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeList)(nil), (*v1alpha4.NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeList_To_v1alpha4_NnfNodeList(a.(*NnfNodeList), b.(*v1alpha4.NnfNodeList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeECDataStatus)(nil), (*v1alpha3.NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(a.(*NnfNodeECDataStatus), b.(*v1alpha3.NnfNodeECDataStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeList)(nil), (*NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeList_To_v1alpha2_NnfNodeList(a.(*v1alpha4.NnfNodeList), b.(*NnfNodeList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeECDataStatus)(nil), (*NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(a.(*v1alpha3.NnfNodeECDataStatus), b.(*NnfNodeECDataStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeSpec)(nil), (*v1alpha4.NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(a.(*NnfNodeSpec), b.(*v1alpha4.NnfNodeSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeList)(nil), (*v1alpha3.NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeList_To_v1alpha3_NnfNodeList(a.(*NnfNodeList), b.(*v1alpha3.NnfNodeList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeSpec)(nil), (*NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(a.(*v1alpha4.NnfNodeSpec), b.(*NnfNodeSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeList)(nil), (*NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeList_To_v1alpha2_NnfNodeList(a.(*v1alpha3.NnfNodeList), b.(*NnfNodeList), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStatus)(nil), (*v1alpha4.NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(a.(*NnfNodeStatus), b.(*v1alpha4.NnfNodeStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeSpec)(nil), (*v1alpha3.NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(a.(*NnfNodeSpec), b.(*v1alpha3.NnfNodeSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStatus)(nil), (*NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(a.(*v1alpha4.NnfNodeStatus), b.(*NnfNodeStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeSpec)(nil), (*NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(a.(*v1alpha3.NnfNodeSpec), b.(*NnfNodeSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStorage)(nil), (*v1alpha4.NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(a.(*NnfNodeStorage), b.(*v1alpha4.NnfNodeStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStatus)(nil), (*v1alpha3.NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(a.(*NnfNodeStatus), b.(*v1alpha3.NnfNodeStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorage)(nil), (*NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(a.(*v1alpha4.NnfNodeStorage), b.(*NnfNodeStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStatus)(nil), (*NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(a.(*v1alpha3.NnfNodeStatus), b.(*NnfNodeStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageAllocationStatus)(nil), (*v1alpha4.NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(a.(*NnfNodeStorageAllocationStatus), b.(*v1alpha4.NnfNodeStorageAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorage)(nil), (*v1alpha3.NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(a.(*NnfNodeStorage), b.(*v1alpha3.NnfNodeStorage), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageAllocationStatus)(nil), (*NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(a.(*v1alpha4.NnfNodeStorageAllocationStatus), b.(*NnfNodeStorageAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorage)(nil), (*NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(a.(*v1alpha3.NnfNodeStorage), b.(*NnfNodeStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageList)(nil), (*v1alpha4.NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(a.(*NnfNodeStorageList), b.(*v1alpha4.NnfNodeStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageAllocationStatus)(nil), (*v1alpha3.NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(a.(*NnfNodeStorageAllocationStatus), b.(*v1alpha3.NnfNodeStorageAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageList)(nil), (*NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(a.(*v1alpha4.NnfNodeStorageList), b.(*NnfNodeStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageAllocationStatus)(nil), (*NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(a.(*v1alpha3.NnfNodeStorageAllocationStatus), b.(*NnfNodeStorageAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageSpec)(nil), (*v1alpha4.NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(a.(*NnfNodeStorageSpec), b.(*v1alpha4.NnfNodeStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageList)(nil), (*v1alpha3.NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(a.(*NnfNodeStorageList), b.(*v1alpha3.NnfNodeStorageList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageSpec)(nil), (*NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(a.(*v1alpha4.NnfNodeStorageSpec), b.(*NnfNodeStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageList)(nil), (*NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(a.(*v1alpha3.NnfNodeStorageList), b.(*NnfNodeStorageList), scope) + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageStatus)(nil), (*v1alpha4.NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(a.(*NnfNodeStorageStatus), b.(*v1alpha4.NnfNodeStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageSpec)(nil), (*v1alpha3.NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(a.(*NnfNodeStorageSpec), b.(*v1alpha3.NnfNodeStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageStatus)(nil), (*NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(a.(*v1alpha4.NnfNodeStorageStatus), b.(*NnfNodeStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageSpec)(nil), (*NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(a.(*v1alpha3.NnfNodeStorageSpec), b.(*NnfNodeStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManager)(nil), (*v1alpha4.NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager(a.(*NnfPortManager), b.(*v1alpha4.NnfPortManager), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfNodeStorageStatus)(nil), (*v1alpha3.NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(a.(*NnfNodeStorageStatus), b.(*v1alpha3.NnfNodeStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManager)(nil), (*NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager(a.(*v1alpha4.NnfPortManager), b.(*NnfPortManager), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfNodeStorageStatus)(nil), (*NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(a.(*v1alpha3.NnfNodeStorageStatus), b.(*NnfNodeStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationSpec)(nil), (*v1alpha4.NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(a.(*NnfPortManagerAllocationSpec), b.(*v1alpha4.NnfPortManagerAllocationSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManager)(nil), (*v1alpha3.NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager(a.(*NnfPortManager), b.(*v1alpha3.NnfPortManager), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerAllocationSpec)(nil), (*NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(a.(*v1alpha4.NnfPortManagerAllocationSpec), b.(*NnfPortManagerAllocationSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManager)(nil), (*NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager(a.(*v1alpha3.NnfPortManager), b.(*NnfPortManager), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationStatus)(nil), (*v1alpha4.NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(a.(*NnfPortManagerAllocationStatus), b.(*v1alpha4.NnfPortManagerAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationSpec)(nil), (*v1alpha3.NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(a.(*NnfPortManagerAllocationSpec), b.(*v1alpha3.NnfPortManagerAllocationSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerAllocationStatus)(nil), (*NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(a.(*v1alpha4.NnfPortManagerAllocationStatus), b.(*NnfPortManagerAllocationStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerAllocationSpec)(nil), (*NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(a.(*v1alpha3.NnfPortManagerAllocationSpec), b.(*NnfPortManagerAllocationSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManagerList)(nil), (*v1alpha4.NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(a.(*NnfPortManagerList), b.(*v1alpha4.NnfPortManagerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationStatus)(nil), (*v1alpha3.NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(a.(*NnfPortManagerAllocationStatus), b.(*v1alpha3.NnfPortManagerAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerList)(nil), (*NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(a.(*v1alpha4.NnfPortManagerList), b.(*NnfPortManagerList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerAllocationStatus)(nil), (*NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(a.(*v1alpha3.NnfPortManagerAllocationStatus), b.(*NnfPortManagerAllocationStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManagerSpec)(nil), (*v1alpha4.NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(a.(*NnfPortManagerSpec), b.(*v1alpha4.NnfPortManagerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerList)(nil), (*v1alpha3.NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(a.(*NnfPortManagerList), b.(*v1alpha3.NnfPortManagerList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerSpec)(nil), (*NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(a.(*v1alpha4.NnfPortManagerSpec), b.(*NnfPortManagerSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerList)(nil), (*NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(a.(*v1alpha3.NnfPortManagerList), b.(*NnfPortManagerList), scope) + if err := s.AddGeneratedConversionFunc((*NnfPortManagerStatus)(nil), (*v1alpha4.NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(a.(*NnfPortManagerStatus), b.(*v1alpha4.NnfPortManagerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerSpec)(nil), (*v1alpha3.NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(a.(*NnfPortManagerSpec), b.(*v1alpha3.NnfPortManagerSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerStatus)(nil), (*NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(a.(*v1alpha4.NnfPortManagerStatus), b.(*NnfPortManagerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerSpec)(nil), (*NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(a.(*v1alpha3.NnfPortManagerSpec), b.(*NnfPortManagerSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfResourceStatus)(nil), (*v1alpha4.NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(a.(*NnfResourceStatus), b.(*v1alpha4.NnfResourceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfPortManagerStatus)(nil), (*v1alpha3.NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(a.(*NnfPortManagerStatus), b.(*v1alpha3.NnfPortManagerStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfResourceStatus)(nil), (*NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(a.(*v1alpha4.NnfResourceStatus), b.(*NnfResourceStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfPortManagerStatus)(nil), (*NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(a.(*v1alpha3.NnfPortManagerStatus), b.(*NnfPortManagerStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfServerStatus)(nil), (*v1alpha4.NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfServerStatus_To_v1alpha4_NnfServerStatus(a.(*NnfServerStatus), b.(*v1alpha4.NnfServerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfResourceStatus)(nil), (*v1alpha3.NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(a.(*NnfResourceStatus), b.(*v1alpha3.NnfResourceStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfServerStatus)(nil), (*NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfServerStatus_To_v1alpha2_NnfServerStatus(a.(*v1alpha4.NnfServerStatus), b.(*NnfServerStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfResourceStatus)(nil), (*NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(a.(*v1alpha3.NnfResourceStatus), b.(*NnfResourceStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorage)(nil), (*v1alpha4.NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(a.(*NnfStorage), b.(*v1alpha4.NnfStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfServerStatus)(nil), (*v1alpha3.NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfServerStatus_To_v1alpha3_NnfServerStatus(a.(*NnfServerStatus), b.(*v1alpha3.NnfServerStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorage)(nil), (*NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(a.(*v1alpha4.NnfStorage), b.(*NnfStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfServerStatus)(nil), (*NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfServerStatus_To_v1alpha2_NnfServerStatus(a.(*v1alpha3.NnfServerStatus), b.(*NnfServerStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationNodes)(nil), (*v1alpha4.NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(a.(*NnfStorageAllocationNodes), b.(*v1alpha4.NnfStorageAllocationNodes), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorage)(nil), (*v1alpha3.NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage(a.(*NnfStorage), b.(*v1alpha3.NnfStorage), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationNodes)(nil), (*NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(a.(*v1alpha4.NnfStorageAllocationNodes), b.(*NnfStorageAllocationNodes), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorage)(nil), (*NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage(a.(*v1alpha3.NnfStorage), b.(*NnfStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetSpec)(nil), (*v1alpha4.NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(a.(*NnfStorageAllocationSetSpec), b.(*v1alpha4.NnfStorageAllocationSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationNodes)(nil), (*v1alpha3.NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(a.(*NnfStorageAllocationNodes), b.(*v1alpha3.NnfStorageAllocationNodes), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationSetSpec)(nil), (*NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(a.(*v1alpha4.NnfStorageAllocationSetSpec), b.(*NnfStorageAllocationSetSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationNodes)(nil), (*NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(a.(*v1alpha3.NnfStorageAllocationNodes), b.(*NnfStorageAllocationNodes), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetStatus)(nil), (*v1alpha4.NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(a.(*NnfStorageAllocationSetStatus), b.(*v1alpha4.NnfStorageAllocationSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetSpec)(nil), (*v1alpha3.NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(a.(*NnfStorageAllocationSetSpec), b.(*v1alpha3.NnfStorageAllocationSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationSetStatus)(nil), (*NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(a.(*v1alpha4.NnfStorageAllocationSetStatus), b.(*NnfStorageAllocationSetStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationSetSpec)(nil), (*NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(a.(*v1alpha3.NnfStorageAllocationSetSpec), b.(*NnfStorageAllocationSetSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageList)(nil), (*v1alpha4.NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageList_To_v1alpha4_NnfStorageList(a.(*NnfStorageList), b.(*v1alpha4.NnfStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetStatus)(nil), (*v1alpha3.NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(a.(*NnfStorageAllocationSetStatus), b.(*v1alpha3.NnfStorageAllocationSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageList)(nil), (*NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageList_To_v1alpha2_NnfStorageList(a.(*v1alpha4.NnfStorageList), b.(*NnfStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageAllocationSetStatus)(nil), (*NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(a.(*v1alpha3.NnfStorageAllocationSetStatus), b.(*NnfStorageAllocationSetStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageLustreSpec)(nil), (*v1alpha4.NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(a.(*NnfStorageLustreSpec), b.(*v1alpha4.NnfStorageLustreSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageList)(nil), (*v1alpha3.NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageList_To_v1alpha3_NnfStorageList(a.(*NnfStorageList), b.(*v1alpha3.NnfStorageList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageLustreSpec)(nil), (*NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(a.(*v1alpha4.NnfStorageLustreSpec), b.(*NnfStorageLustreSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageList)(nil), (*NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageList_To_v1alpha2_NnfStorageList(a.(*v1alpha3.NnfStorageList), b.(*NnfStorageList), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageLustreStatus)(nil), (*v1alpha4.NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(a.(*NnfStorageLustreStatus), b.(*v1alpha4.NnfStorageLustreStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageLustreSpec)(nil), (*v1alpha3.NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(a.(*NnfStorageLustreSpec), b.(*v1alpha3.NnfStorageLustreSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfile)(nil), (*v1alpha4.NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(a.(*NnfStorageProfile), b.(*v1alpha4.NnfStorageProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageLustreSpec)(nil), (*NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(a.(*v1alpha3.NnfStorageLustreSpec), b.(*NnfStorageLustreSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfile)(nil), (*NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(a.(*v1alpha4.NnfStorageProfile), b.(*NnfStorageProfile), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageLustreStatus)(nil), (*v1alpha3.NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(a.(*NnfStorageLustreStatus), b.(*v1alpha3.NnfStorageLustreStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileCmdLines)(nil), (*v1alpha4.NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(a.(*NnfStorageProfileCmdLines), b.(*v1alpha4.NnfStorageProfileCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageLustreStatus)(nil), (*NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(a.(*v1alpha3.NnfStorageLustreStatus), b.(*NnfStorageLustreStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileData)(nil), (*v1alpha4.NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(a.(*NnfStorageProfileData), b.(*v1alpha4.NnfStorageProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfile)(nil), (*v1alpha3.NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(a.(*NnfStorageProfile), b.(*v1alpha3.NnfStorageProfile), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileData)(nil), (*NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(a.(*v1alpha4.NnfStorageProfileData), b.(*NnfStorageProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfile)(nil), (*NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(a.(*v1alpha3.NnfStorageProfile), b.(*NnfStorageProfile), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileGFS2Data)(nil), (*v1alpha4.NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(a.(*NnfStorageProfileGFS2Data), b.(*v1alpha4.NnfStorageProfileGFS2Data), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileCmdLines)(nil), (*v1alpha3.NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(a.(*NnfStorageProfileCmdLines), b.(*v1alpha3.NnfStorageProfileCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileGFS2Data)(nil), (*NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(a.(*v1alpha4.NnfStorageProfileGFS2Data), b.(*NnfStorageProfileGFS2Data), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileData)(nil), (*v1alpha3.NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(a.(*NnfStorageProfileData), b.(*v1alpha3.NnfStorageProfileData), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMLvChangeCmdLines)(nil), (*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(a.(*NnfStorageProfileLVMLvChangeCmdLines), b.(*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileData)(nil), (*NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(a.(*v1alpha3.NnfStorageProfileData), b.(*NnfStorageProfileData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines)(nil), (*NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(a.(*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines), b.(*NnfStorageProfileLVMLvChangeCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileGFS2Data)(nil), (*v1alpha3.NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(a.(*NnfStorageProfileGFS2Data), b.(*v1alpha3.NnfStorageProfileGFS2Data), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMVgChangeCmdLines)(nil), (*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(a.(*NnfStorageProfileLVMVgChangeCmdLines), b.(*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileGFS2Data)(nil), (*NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(a.(*v1alpha3.NnfStorageProfileGFS2Data), b.(*NnfStorageProfileGFS2Data), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines)(nil), (*NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(a.(*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines), b.(*NnfStorageProfileLVMVgChangeCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMLvChangeCmdLines)(nil), (*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(a.(*NnfStorageProfileLVMLvChangeCmdLines), b.(*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileList)(nil), (*v1alpha4.NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(a.(*NnfStorageProfileList), b.(*v1alpha4.NnfStorageProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines)(nil), (*NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(a.(*v1alpha3.NnfStorageProfileLVMLvChangeCmdLines), b.(*NnfStorageProfileLVMLvChangeCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileList)(nil), (*NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(a.(*v1alpha4.NnfStorageProfileList), b.(*NnfStorageProfileList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMVgChangeCmdLines)(nil), (*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(a.(*NnfStorageProfileLVMVgChangeCmdLines), b.(*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreCmdLines)(nil), (*v1alpha4.NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(a.(*NnfStorageProfileLustreCmdLines), b.(*v1alpha4.NnfStorageProfileLustreCmdLines), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines)(nil), (*NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(a.(*v1alpha3.NnfStorageProfileLVMVgChangeCmdLines), b.(*NnfStorageProfileLVMVgChangeCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreData)(nil), (*v1alpha4.NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(a.(*NnfStorageProfileLustreData), b.(*v1alpha4.NnfStorageProfileLustreData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileList)(nil), (*v1alpha3.NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(a.(*NnfStorageProfileList), b.(*v1alpha3.NnfStorageProfileList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLustreData)(nil), (*NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(a.(*v1alpha4.NnfStorageProfileLustreData), b.(*NnfStorageProfileLustreData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileList)(nil), (*NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(a.(*v1alpha3.NnfStorageProfileList), b.(*NnfStorageProfileList), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreMiscOptions)(nil), (*v1alpha4.NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(a.(*NnfStorageProfileLustreMiscOptions), b.(*v1alpha4.NnfStorageProfileLustreMiscOptions), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreCmdLines)(nil), (*v1alpha3.NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(a.(*NnfStorageProfileLustreCmdLines), b.(*v1alpha3.NnfStorageProfileLustreCmdLines), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLustreMiscOptions)(nil), (*NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(a.(*v1alpha4.NnfStorageProfileLustreMiscOptions), b.(*NnfStorageProfileLustreMiscOptions), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreData)(nil), (*v1alpha3.NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(a.(*NnfStorageProfileLustreData), b.(*v1alpha3.NnfStorageProfileLustreData), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileRawData)(nil), (*v1alpha4.NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(a.(*NnfStorageProfileRawData), b.(*v1alpha4.NnfStorageProfileRawData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLustreData)(nil), (*NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(a.(*v1alpha3.NnfStorageProfileLustreData), b.(*NnfStorageProfileLustreData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileRawData)(nil), (*NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(a.(*v1alpha4.NnfStorageProfileRawData), b.(*NnfStorageProfileRawData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreMiscOptions)(nil), (*v1alpha3.NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(a.(*NnfStorageProfileLustreMiscOptions), b.(*v1alpha3.NnfStorageProfileLustreMiscOptions), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileXFSData)(nil), (*v1alpha4.NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(a.(*NnfStorageProfileXFSData), b.(*v1alpha4.NnfStorageProfileXFSData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileLustreMiscOptions)(nil), (*NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(a.(*v1alpha3.NnfStorageProfileLustreMiscOptions), b.(*NnfStorageProfileLustreMiscOptions), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileXFSData)(nil), (*NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(a.(*v1alpha4.NnfStorageProfileXFSData), b.(*NnfStorageProfileXFSData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileRawData)(nil), (*v1alpha3.NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(a.(*NnfStorageProfileRawData), b.(*v1alpha3.NnfStorageProfileRawData), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageSpec)(nil), (*v1alpha4.NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(a.(*NnfStorageSpec), b.(*v1alpha4.NnfStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileRawData)(nil), (*NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(a.(*v1alpha3.NnfStorageProfileRawData), b.(*NnfStorageProfileRawData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageSpec)(nil), (*NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(a.(*v1alpha4.NnfStorageSpec), b.(*NnfStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageProfileXFSData)(nil), (*v1alpha3.NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(a.(*NnfStorageProfileXFSData), b.(*v1alpha3.NnfStorageProfileXFSData), scope) + if err := s.AddGeneratedConversionFunc((*NnfStorageStatus)(nil), (*v1alpha4.NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(a.(*NnfStorageStatus), b.(*v1alpha4.NnfStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageProfileXFSData)(nil), (*NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(a.(*v1alpha3.NnfStorageProfileXFSData), b.(*NnfStorageProfileXFSData), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageStatus)(nil), (*NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(a.(*v1alpha4.NnfStorageStatus), b.(*NnfStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageSpec)(nil), (*v1alpha3.NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(a.(*NnfStorageSpec), b.(*v1alpha3.NnfStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*NnfSystemStorage)(nil), (*v1alpha4.NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(a.(*NnfSystemStorage), b.(*v1alpha4.NnfSystemStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageSpec)(nil), (*NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(a.(*v1alpha3.NnfStorageSpec), b.(*NnfStorageSpec), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorage)(nil), (*NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(a.(*v1alpha4.NnfSystemStorage), b.(*NnfSystemStorage), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfStorageStatus)(nil), (*v1alpha3.NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(a.(*NnfStorageStatus), b.(*v1alpha3.NnfStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageList)(nil), (*v1alpha4.NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(a.(*NnfSystemStorageList), b.(*v1alpha4.NnfSystemStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfStorageStatus)(nil), (*NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(a.(*v1alpha3.NnfStorageStatus), b.(*NnfStorageStatus), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorageList)(nil), (*NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(a.(*v1alpha4.NnfSystemStorageList), b.(*NnfSystemStorageList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorage)(nil), (*v1alpha3.NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(a.(*NnfSystemStorage), b.(*v1alpha3.NnfSystemStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageSpec)(nil), (*v1alpha4.NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(a.(*NnfSystemStorageSpec), b.(*v1alpha4.NnfSystemStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorage)(nil), (*NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(a.(*v1alpha3.NnfSystemStorage), b.(*NnfSystemStorage), scope) + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageStatus)(nil), (*v1alpha4.NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(a.(*NnfSystemStorageStatus), b.(*v1alpha4.NnfSystemStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageList)(nil), (*v1alpha3.NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(a.(*NnfSystemStorageList), b.(*v1alpha3.NnfSystemStorageList), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorageStatus)(nil), (*NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(a.(*v1alpha4.NnfSystemStorageStatus), b.(*NnfSystemStorageStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorageList)(nil), (*NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(a.(*v1alpha3.NnfSystemStorageList), b.(*NnfSystemStorageList), scope) + if err := s.AddConversionFunc((*v1alpha4.LustreStorageSpec)(nil), (*LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(a.(*v1alpha4.LustreStorageSpec), b.(*LustreStorageSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageSpec)(nil), (*v1alpha3.NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(a.(*NnfSystemStorageSpec), b.(*v1alpha3.NnfSystemStorageSpec), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfAccessSpec)(nil), (*NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(a.(*v1alpha4.NnfAccessSpec), b.(*NnfAccessSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorageSpec)(nil), (*NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(a.(*v1alpha3.NnfSystemStorageSpec), b.(*NnfSystemStorageSpec), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfDataMovementProfileData)(nil), (*NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(a.(*v1alpha4.NnfDataMovementProfileData), b.(*NnfDataMovementProfileData), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*NnfSystemStorageStatus)(nil), (*v1alpha3.NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(a.(*NnfSystemStorageStatus), b.(*v1alpha3.NnfSystemStorageStatus), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfStorageLustreStatus)(nil), (*NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(a.(*v1alpha4.NnfStorageLustreStatus), b.(*NnfStorageLustreStatus), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NnfSystemStorageStatus)(nil), (*NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(a.(*v1alpha3.NnfSystemStorageStatus), b.(*NnfSystemStorageStatus), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfStorageProfileCmdLines)(nil), (*NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(a.(*v1alpha4.NnfStorageProfileCmdLines), b.(*NnfStorageProfileCmdLines), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha3.NnfStorageProfileCmdLines)(nil), (*NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(a.(*v1alpha3.NnfStorageProfileCmdLines), b.(*NnfStorageProfileCmdLines), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfStorageProfileLustreCmdLines)(nil), (*NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(a.(*v1alpha4.NnfStorageProfileLustreCmdLines), b.(*NnfStorageProfileLustreCmdLines), scope) }); err != nil { return err } - if err := s.AddConversionFunc((*v1alpha3.NnfStorageProfileLustreCmdLines)(nil), (*NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(a.(*v1alpha3.NnfStorageProfileLustreCmdLines), b.(*NnfStorageProfileLustreCmdLines), scope) + if err := s.AddConversionFunc((*v1alpha4.NnfSystemStorageSpec)(nil), (*NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(a.(*v1alpha4.NnfSystemStorageSpec), b.(*NnfSystemStorageSpec), scope) }); err != nil { return err } return nil } -func autoConvert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha3.LustreStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha4.LustreStorageSpec, s conversion.Scope) error { out.FileSystemName = in.FileSystemName out.TargetType = in.TargetType out.StartIndex = in.StartIndex @@ -885,80 +885,96 @@ func autoConvert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *Lu return nil } -// Convert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec is an autogenerated conversion function. -func Convert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha3.LustreStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in, out, s) +// Convert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec is an autogenerated conversion function. +func Convert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha4.LustreStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in, out, s) } -func autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(in *v1alpha3.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(in *v1alpha4.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { out.FileSystemName = in.FileSystemName out.TargetType = in.TargetType out.StartIndex = in.StartIndex out.MgsAddress = in.MgsAddress out.BackFs = in.BackFs + // WARNING: in.LustreComponents requires manual conversion: does not exist in peer-type return nil } -// Convert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(in *v1alpha3.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(in, out, s) -} - -func autoConvert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess(in *NnfAccess, out *v1alpha3.NnfAccess, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(in *NnfAccess, out *v1alpha4.NnfAccess, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess is an autogenerated conversion function. -func Convert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess(in *NnfAccess, out *v1alpha3.NnfAccess, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfAccess_To_v1alpha3_NnfAccess(in, out, s) +// Convert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess is an autogenerated conversion function. +func Convert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(in *NnfAccess, out *v1alpha4.NnfAccess, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(in, out, s) } -func autoConvert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess(in *v1alpha3.NnfAccess, out *NnfAccess, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(in *v1alpha4.NnfAccess, out *NnfAccess, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess(in *v1alpha3.NnfAccess, out *NnfAccess, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccess_To_v1alpha2_NnfAccess(in, out, s) +// Convert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(in *v1alpha4.NnfAccess, out *NnfAccess, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(in, out, s) } -func autoConvert_v1alpha2_NnfAccessList_To_v1alpha3_NnfAccessList(in *NnfAccessList, out *v1alpha3.NnfAccessList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfAccessList_To_v1alpha4_NnfAccessList(in *NnfAccessList, out *v1alpha4.NnfAccessList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfAccess)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfAccess, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_NnfAccess_To_v1alpha4_NnfAccess(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha2_NnfAccessList_To_v1alpha3_NnfAccessList is an autogenerated conversion function. -func Convert_v1alpha2_NnfAccessList_To_v1alpha3_NnfAccessList(in *NnfAccessList, out *v1alpha3.NnfAccessList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfAccessList_To_v1alpha3_NnfAccessList(in, out, s) +// Convert_v1alpha2_NnfAccessList_To_v1alpha4_NnfAccessList is an autogenerated conversion function. +func Convert_v1alpha2_NnfAccessList_To_v1alpha4_NnfAccessList(in *NnfAccessList, out *v1alpha4.NnfAccessList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfAccessList_To_v1alpha4_NnfAccessList(in, out, s) } -func autoConvert_v1alpha3_NnfAccessList_To_v1alpha2_NnfAccessList(in *v1alpha3.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfAccessList_To_v1alpha2_NnfAccessList(in *v1alpha4.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]NnfAccess)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfAccess, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfAccess_To_v1alpha2_NnfAccess(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha3_NnfAccessList_To_v1alpha2_NnfAccessList is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessList_To_v1alpha2_NnfAccessList(in *v1alpha3.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessList_To_v1alpha2_NnfAccessList(in, out, s) +// Convert_v1alpha4_NnfAccessList_To_v1alpha2_NnfAccessList is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccessList_To_v1alpha2_NnfAccessList(in *v1alpha4.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessList_To_v1alpha2_NnfAccessList(in, out, s) } -func autoConvert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha3.NnfAccessSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha4.NnfAccessSpec, s conversion.Scope) error { out.DesiredState = in.DesiredState out.TeardownState = apiv1alpha2.WorkflowState(in.TeardownState) out.Target = in.Target @@ -972,12 +988,12 @@ func autoConvert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *NnfAccessS return nil } -// Convert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha3.NnfAccessSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in, out, s) +// Convert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha4.NnfAccessSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in, out, s) } -func autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in *v1alpha3.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in *v1alpha4.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { out.DesiredState = in.DesiredState out.TeardownState = apiv1alpha2.WorkflowState(in.TeardownState) out.Target = in.Target @@ -988,67 +1004,63 @@ func autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in *v1alpha3.N out.MakeClientMounts = in.MakeClientMounts out.MountPathPrefix = in.MountPathPrefix out.StorageReference = in.StorageReference + // WARNING: in.IgnoreOfflineComputes requires manual conversion: does not exist in peer-type return nil } -// Convert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in *v1alpha3.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha2_NnfAccessSpec(in, out, s) -} - -func autoConvert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha3.NnfAccessStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha4.NnfAccessStatus, s conversion.Scope) error { out.State = in.State out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha3.NnfAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in, out, s) +// Convert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha4.NnfAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in, out, s) } -func autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in *v1alpha3.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in *v1alpha4.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { out.State = in.State out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in *v1alpha3.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in, out, s) +// Convert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in *v1alpha4.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessStatus_To_v1alpha2_NnfAccessStatus(in, out, s) } -func autoConvert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha3.NnfContainerProfile, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha4.NnfContainerProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile is an autogenerated conversion function. -func Convert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha3.NnfContainerProfile, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in, out, s) +// Convert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile is an autogenerated conversion function. +func Convert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha4.NnfContainerProfile, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in, out, s) } -func autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in *v1alpha3.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in *v1alpha4.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in *v1alpha3.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in, out, s) +// Convert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in *v1alpha4.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfile_To_v1alpha2_NnfContainerProfile(in, out, s) } -func autoConvert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha3.NnfContainerProfileData, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha4.NnfContainerProfileData, s conversion.Scope) error { out.Pinned = in.Pinned - out.Storages = *(*[]v1alpha3.NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) + out.Storages = *(*[]v1alpha4.NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) out.PostRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PostRunTimeoutSeconds)) out.RetryLimit = in.RetryLimit @@ -1060,12 +1072,12 @@ func autoConvert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfil return nil } -// Convert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData is an autogenerated conversion function. -func Convert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha3.NnfContainerProfileData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in, out, s) +// Convert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData is an autogenerated conversion function. +func Convert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha4.NnfContainerProfileData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in, out, s) } -func autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in *v1alpha3.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in *v1alpha4.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { out.Pinned = in.Pinned out.Storages = *(*[]NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) @@ -1079,90 +1091,90 @@ func autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfil return nil } -// Convert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in *v1alpha3.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in, out, s) +// Convert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in *v1alpha4.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileData_To_v1alpha2_NnfContainerProfileData(in, out, s) } -func autoConvert_v1alpha2_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha3.NnfContainerProfileList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha4.NnfContainerProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfContainerProfile)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfContainerProfile)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList is an autogenerated conversion function. -func Convert_v1alpha2_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha3.NnfContainerProfileList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in, out, s) +// Convert_v1alpha2_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList is an autogenerated conversion function. +func Convert_v1alpha2_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha4.NnfContainerProfileList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in, out, s) } -func autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in *v1alpha3.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in *v1alpha4.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfContainerProfile)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in *v1alpha3.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in, out, s) +// Convert_v1alpha4_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in *v1alpha4.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileList_To_v1alpha2_NnfContainerProfileList(in, out, s) } -func autoConvert_v1alpha2_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha3.NnfContainerProfileStorage, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha4.NnfContainerProfileStorage, s conversion.Scope) error { out.Name = in.Name out.Optional = in.Optional out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) return nil } -// Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage is an autogenerated conversion function. -func Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha3.NnfContainerProfileStorage, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in, out, s) +// Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage is an autogenerated conversion function. +func Convert_v1alpha2_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha4.NnfContainerProfileStorage, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in, out, s) } -func autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in *v1alpha3.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in *v1alpha4.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { out.Name = in.Name out.Optional = in.Optional out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) return nil } -// Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in *v1alpha3.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in, out, s) +// Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in *v1alpha4.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileStorage_To_v1alpha2_NnfContainerProfileStorage(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *NnfDataMovement, out *v1alpha3.NnfDataMovement, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement(in *NnfDataMovement, out *v1alpha4.NnfDataMovement, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *NnfDataMovement, out *v1alpha3.NnfDataMovement, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovement_To_v1alpha3_NnfDataMovement(in, out, s) +// Convert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement(in *NnfDataMovement, out *v1alpha4.NnfDataMovement, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovement_To_v1alpha4_NnfDataMovement(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement(in *v1alpha3.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement(in *v1alpha4.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement(in *v1alpha3.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovement_To_v1alpha2_NnfDataMovement(in, out, s) +// Convert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement(in *v1alpha4.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovement_To_v1alpha2_NnfDataMovement(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha3.NnfDataMovementCommandStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha4.NnfDataMovementCommandStatus, s conversion.Scope) error { out.Command = in.Command out.ElapsedTime = in.ElapsedTime out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) @@ -1178,12 +1190,12 @@ func autoConvert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMoveme return nil } -// Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha3.NnfDataMovementCommandStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in, out, s) +// Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha4.NnfDataMovementCommandStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in *v1alpha3.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in *v1alpha4.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { out.Command = in.Command out.ElapsedTime = in.ElapsedTime out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) @@ -1199,12 +1211,12 @@ func autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMoveme return nil } -// Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in *v1alpha3.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in, out, s) +// Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in *v1alpha4.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha2_NnfDataMovementCommandStatus(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha3.NnfDataMovementConfig, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha4.NnfDataMovementConfig, s conversion.Scope) error { out.Dryrun = in.Dryrun out.MpirunOptions = in.MpirunOptions out.DcpOptions = in.DcpOptions @@ -1215,12 +1227,12 @@ func autoConvert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfi return nil } -// Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha3.NnfDataMovementConfig, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in, out, s) +// Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha4.NnfDataMovementConfig, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in *v1alpha3.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in *v1alpha4.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { out.Dryrun = in.Dryrun out.MpirunOptions = in.MpirunOptions out.DcpOptions = in.DcpOptions @@ -1231,88 +1243,88 @@ func autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfi return nil } -// Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in *v1alpha3.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in, out, s) +// Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in *v1alpha4.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementConfig_To_v1alpha2_NnfDataMovementConfig(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha3.NnfDataMovementList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha4.NnfDataMovementList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovement)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfDataMovement)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfDataMovementList_To_v1alpha3_NnfDataMovementList is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha3.NnfDataMovementList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in, out, s) +// Convert_v1alpha2_NnfDataMovementList_To_v1alpha4_NnfDataMovementList is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha4.NnfDataMovementList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in *v1alpha3.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in *v1alpha4.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfDataMovement)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfDataMovementList_To_v1alpha2_NnfDataMovementList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in *v1alpha3.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in, out, s) +// Convert_v1alpha4_NnfDataMovementList_To_v1alpha2_NnfDataMovementList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in *v1alpha4.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementList_To_v1alpha2_NnfDataMovementList(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha3.NnfDataMovementManager, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha4.NnfDataMovementManager, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha3.NnfDataMovementManager, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in, out, s) +// Convert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha4.NnfDataMovementManager, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in *v1alpha3.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in *v1alpha4.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in *v1alpha3.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in, out, s) +// Convert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in *v1alpha4.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManager_To_v1alpha2_NnfDataMovementManager(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha3.NnfDataMovementManagerList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha4.NnfDataMovementManagerList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovementManager)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfDataMovementManager)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha3.NnfDataMovementManagerList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in, out, s) +// Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha4.NnfDataMovementManagerList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in *v1alpha3.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in *v1alpha4.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfDataMovementManager)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in *v1alpha3.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in, out, s) +// Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in *v1alpha4.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerList_To_v1alpha2_NnfDataMovementManagerList(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha3.NnfDataMovementManagerSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha4.NnfDataMovementManagerSpec, s conversion.Scope) error { out.Selector = in.Selector out.Template = in.Template out.UpdateStrategy = in.UpdateStrategy @@ -1321,12 +1333,12 @@ func autoConvert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovement return nil } -// Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha3.NnfDataMovementManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in, out, s) +// Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha4.NnfDataMovementManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in *v1alpha3.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in *v1alpha4.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { out.Selector = in.Selector out.Template = in.Template out.UpdateStrategy = in.UpdateStrategy @@ -1335,58 +1347,58 @@ func autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovement return nil } -// Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in *v1alpha3.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in, out, s) +// Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in *v1alpha4.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha2_NnfDataMovementManagerSpec(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha3.NnfDataMovementManagerStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha4.NnfDataMovementManagerStatus, s conversion.Scope) error { out.Ready = in.Ready return nil } -// Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha3.NnfDataMovementManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in, out, s) +// Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha4.NnfDataMovementManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in *v1alpha3.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in *v1alpha4.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { out.Ready = in.Ready return nil } -// Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in *v1alpha3.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in, out, s) +// Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in *v1alpha4.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha2_NnfDataMovementManagerStatus(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha3.NnfDataMovementProfile, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha4.NnfDataMovementProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha3.NnfDataMovementProfile, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in, out, s) +// Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha4.NnfDataMovementProfile, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in *v1alpha3.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in *v1alpha4.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in *v1alpha3.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in, out, s) +// Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in *v1alpha4.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha3.NnfDataMovementProfileData, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha4.NnfDataMovementProfileData, s conversion.Scope) error { out.Default = in.Default out.Pinned = in.Pinned out.Slots = in.Slots @@ -1400,12 +1412,12 @@ func autoConvert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovement return nil } -// Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha3.NnfDataMovementProfileData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in, out, s) +// Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha4.NnfDataMovementProfileData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in *v1alpha3.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in *v1alpha4.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { out.Default = in.Default out.Pinned = in.Pinned out.Slots = in.Slots @@ -1416,53 +1428,69 @@ func autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovement out.ProgressIntervalSeconds = in.ProgressIntervalSeconds out.CreateDestDir = in.CreateDestDir out.StatCommand = in.StatCommand + // WARNING: in.MkdirCommand requires manual conversion: does not exist in peer-type return nil } -// Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in *v1alpha3.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha2_NnfDataMovementProfileData(in, out, s) -} - -func autoConvert_v1alpha2_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha3.NnfDataMovementProfileList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha4.NnfDataMovementProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfDataMovementProfile)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfDataMovementProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha3.NnfDataMovementProfileList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in, out, s) +// Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha4.NnfDataMovementProfileList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in *v1alpha3.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in *v1alpha4.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]NnfDataMovementProfile)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfDataMovementProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha2_NnfDataMovementProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in *v1alpha3.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in, out, s) +// Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in *v1alpha4.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfileList_To_v1alpha2_NnfDataMovementProfileList(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha3.NnfDataMovementSpec, s conversion.Scope) error { - out.Source = (*v1alpha3.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) - out.Destination = (*v1alpha3.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) +func autoConvert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha4.NnfDataMovementSpec, s conversion.Scope) error { + out.Source = (*v1alpha4.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) + out.Destination = (*v1alpha4.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) out.UserId = in.UserId out.GroupId = in.GroupId out.Cancel = in.Cancel out.ProfileReference = in.ProfileReference - out.UserConfig = (*v1alpha3.NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) + out.UserConfig = (*v1alpha4.NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) return nil } -// Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha3.NnfDataMovementSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in, out, s) +// Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha4.NnfDataMovementSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in *v1alpha3.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in *v1alpha4.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { out.Source = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) out.Destination = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) out.UserId = in.UserId @@ -1473,51 +1501,51 @@ func autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in return nil } -// Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in *v1alpha3.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in, out, s) +// Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in *v1alpha4.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementSpec_To_v1alpha2_NnfDataMovementSpec(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha3.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha4.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { out.Path = in.Path out.StorageReference = in.StorageReference return nil } -// Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha3.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in, out, s) +// Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha4.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in *v1alpha3.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in *v1alpha4.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { out.Path = in.Path out.StorageReference = in.StorageReference return nil } -// Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in *v1alpha3.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in, out, s) +// Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in *v1alpha4.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha2_NnfDataMovementSpecSourceDestination(in, out, s) } -func autoConvert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha3.NnfDataMovementStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha4.NnfDataMovementStatus, s conversion.Scope) error { out.State = in.State out.Status = in.Status out.Message = in.Message out.StartTime = (*metav1.MicroTime)(unsafe.Pointer(in.StartTime)) out.EndTime = (*metav1.MicroTime)(unsafe.Pointer(in.EndTime)) out.Restarts = in.Restarts - out.CommandStatus = (*v1alpha3.NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) + out.CommandStatus = (*v1alpha4.NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha3.NnfDataMovementStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in, out, s) +// Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha4.NnfDataMovementStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in, out, s) } -func autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in *v1alpha3.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in *v1alpha4.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { out.State = in.State out.Status = in.Status out.Message = in.Message @@ -1529,102 +1557,102 @@ func autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatu return nil } -// Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in *v1alpha3.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in, out, s) +// Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in *v1alpha4.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementStatus_To_v1alpha2_NnfDataMovementStatus(in, out, s) } -func autoConvert_v1alpha2_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha3.NnfDriveStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha4.NnfDriveStatus, s conversion.Scope) error { out.Model = in.Model out.SerialNumber = in.SerialNumber out.FirmwareVersion = in.FirmwareVersion out.Slot = in.Slot out.Capacity = in.Capacity out.WearLevel = in.WearLevel - if err := Convert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + if err := Convert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfDriveStatus_To_v1alpha3_NnfDriveStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha3.NnfDriveStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in, out, s) +// Convert_v1alpha2_NnfDriveStatus_To_v1alpha4_NnfDriveStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha4.NnfDriveStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in, out, s) } -func autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in *v1alpha3.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in *v1alpha4.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { out.Model = in.Model out.SerialNumber = in.SerialNumber out.FirmwareVersion = in.FirmwareVersion out.Slot = in.Slot out.Capacity = in.Capacity out.WearLevel = in.WearLevel - if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + if err := Convert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfDriveStatus_To_v1alpha2_NnfDriveStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in *v1alpha3.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in, out, s) +// Convert_v1alpha4_NnfDriveStatus_To_v1alpha2_NnfDriveStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in *v1alpha4.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDriveStatus_To_v1alpha2_NnfDriveStatus(in, out, s) } -func autoConvert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha3.NnfLustreMGT, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha4.NnfLustreMGT, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT is an autogenerated conversion function. -func Convert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha3.NnfLustreMGT, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in, out, s) +// Convert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT is an autogenerated conversion function. +func Convert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha4.NnfLustreMGT, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in, out, s) } -func autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in *v1alpha3.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in *v1alpha4.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in *v1alpha3.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in, out, s) +// Convert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in *v1alpha4.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGT_To_v1alpha2_NnfLustreMGT(in, out, s) } -func autoConvert_v1alpha2_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha3.NnfLustreMGTList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha4.NnfLustreMGTList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfLustreMGT)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfLustreMGT)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList is an autogenerated conversion function. -func Convert_v1alpha2_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha3.NnfLustreMGTList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in, out, s) +// Convert_v1alpha2_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList is an autogenerated conversion function. +func Convert_v1alpha2_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha4.NnfLustreMGTList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in, out, s) } -func autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in *v1alpha3.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in *v1alpha4.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfLustreMGT)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in *v1alpha3.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in, out, s) +// Convert_v1alpha4_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in *v1alpha4.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTList_To_v1alpha2_NnfLustreMGTList(in, out, s) } -func autoConvert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha3.NnfLustreMGTSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha4.NnfLustreMGTSpec, s conversion.Scope) error { out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) out.FsNameStart = in.FsNameStart @@ -1633,12 +1661,12 @@ func autoConvert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *NnfL return nil } -// Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha3.NnfLustreMGTSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in, out, s) +// Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha4.NnfLustreMGTSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in, out, s) } -func autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in *v1alpha3.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in *v1alpha4.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) out.FsNameStart = in.FsNameStart @@ -1647,179 +1675,179 @@ func autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in *v1al return nil } -// Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in *v1alpha3.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in, out, s) +// Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in *v1alpha4.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTSpec_To_v1alpha2_NnfLustreMGTSpec(in, out, s) } -func autoConvert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha3.NnfLustreMGTStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha4.NnfLustreMGTStatus, s conversion.Scope) error { out.FsNameNext = in.FsNameNext - out.ClaimList = *(*[]v1alpha3.NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) + out.ClaimList = *(*[]v1alpha4.NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha3.NnfLustreMGTStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in, out, s) +// Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha4.NnfLustreMGTStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in, out, s) } -func autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in *v1alpha3.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in *v1alpha4.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { out.FsNameNext = in.FsNameNext out.ClaimList = *(*[]NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in *v1alpha3.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in, out, s) +// Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in *v1alpha4.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTStatus_To_v1alpha2_NnfLustreMGTStatus(in, out, s) } -func autoConvert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha3.NnfLustreMGTStatusClaim, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha4.NnfLustreMGTStatusClaim, s conversion.Scope) error { out.Reference = in.Reference out.FsName = in.FsName return nil } -// Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim is an autogenerated conversion function. -func Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha3.NnfLustreMGTStatusClaim, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in, out, s) +// Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim is an autogenerated conversion function. +func Convert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha4.NnfLustreMGTStatusClaim, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in, out, s) } -func autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in *v1alpha3.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in *v1alpha4.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { out.Reference = in.Reference out.FsName = in.FsName return nil } -// Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim is an autogenerated conversion function. -func Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in *v1alpha3.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in, out, s) +// Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in *v1alpha4.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha2_NnfLustreMGTStatusClaim(in, out, s) } -func autoConvert_v1alpha2_NnfNode_To_v1alpha3_NnfNode(in *NnfNode, out *v1alpha3.NnfNode, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNode_To_v1alpha4_NnfNode(in *NnfNode, out *v1alpha4.NnfNode, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfNode_To_v1alpha3_NnfNode is an autogenerated conversion function. -func Convert_v1alpha2_NnfNode_To_v1alpha3_NnfNode(in *NnfNode, out *v1alpha3.NnfNode, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNode_To_v1alpha3_NnfNode(in, out, s) +// Convert_v1alpha2_NnfNode_To_v1alpha4_NnfNode is an autogenerated conversion function. +func Convert_v1alpha2_NnfNode_To_v1alpha4_NnfNode(in *NnfNode, out *v1alpha4.NnfNode, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNode_To_v1alpha4_NnfNode(in, out, s) } -func autoConvert_v1alpha3_NnfNode_To_v1alpha2_NnfNode(in *v1alpha3.NnfNode, out *NnfNode, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNode_To_v1alpha2_NnfNode(in *v1alpha4.NnfNode, out *NnfNode, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfNode_To_v1alpha2_NnfNode is an autogenerated conversion function. -func Convert_v1alpha3_NnfNode_To_v1alpha2_NnfNode(in *v1alpha3.NnfNode, out *NnfNode, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNode_To_v1alpha2_NnfNode(in, out, s) +// Convert_v1alpha4_NnfNode_To_v1alpha2_NnfNode is an autogenerated conversion function. +func Convert_v1alpha4_NnfNode_To_v1alpha2_NnfNode(in *v1alpha4.NnfNode, out *NnfNode, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNode_To_v1alpha2_NnfNode(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha3.NnfNodeBlockStorage, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha4.NnfNodeBlockStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha3.NnfNodeBlockStorage, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha4.NnfNodeBlockStorage, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in *v1alpha3.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in *v1alpha4.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in *v1alpha3.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in *v1alpha4.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorage_To_v1alpha2_NnfNodeBlockStorage(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha3.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha4.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) out.StorageGroupId = in.StorageGroupId return nil } -// Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha3.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha4.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in *v1alpha3.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in *v1alpha4.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) out.StorageGroupId = in.StorageGroupId return nil } -// Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in *v1alpha3.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in *v1alpha4.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha2_NnfNodeBlockStorageAccessStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha3.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha4.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { out.Capacity = in.Capacity out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) return nil } -// Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha3.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha4.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in *v1alpha3.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in *v1alpha4.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { out.Capacity = in.Capacity out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) return nil } -// Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in *v1alpha3.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in *v1alpha4.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha2_NnfNodeBlockStorageAllocationSpec(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha3.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - out.Accesses = *(*map[string]v1alpha3.NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) - out.Devices = *(*[]v1alpha3.NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) +func autoConvert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha4.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + out.Accesses = *(*map[string]v1alpha4.NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) + out.Devices = *(*[]v1alpha4.NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) out.CapacityAllocated = in.CapacityAllocated out.StoragePoolId = in.StoragePoolId return nil } -// Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha3.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha4.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in *v1alpha3.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in *v1alpha4.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { out.Accesses = *(*map[string]NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) out.Devices = *(*[]NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) out.CapacityAllocated = in.CapacityAllocated @@ -1827,93 +1855,93 @@ func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNod return nil } -// Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in *v1alpha3.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in *v1alpha4.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha2_NnfNodeBlockStorageAllocationStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha3.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha4.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { out.NQN = in.NQN out.NamespaceId = in.NamespaceId out.CapacityAllocated = in.CapacityAllocated return nil } -// Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha3.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha4.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in *v1alpha3.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in *v1alpha4.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { out.NQN = in.NQN out.NamespaceId = in.NamespaceId out.CapacityAllocated = in.CapacityAllocated return nil } -// Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in *v1alpha3.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in *v1alpha4.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha2_NnfNodeBlockStorageDeviceStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha3.NnfNodeBlockStorageList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha4.NnfNodeBlockStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha3.NnfNodeBlockStorageList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha4.NnfNodeBlockStorageList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in *v1alpha3.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in *v1alpha4.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in *v1alpha3.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in *v1alpha4.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha2_NnfNodeBlockStorageList(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha3.NnfNodeBlockStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha4.NnfNodeBlockStorageSpec, s conversion.Scope) error { out.SharedAllocation = in.SharedAllocation - out.Allocations = *(*[]v1alpha3.NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) + out.Allocations = *(*[]v1alpha4.NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) return nil } -// Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha3.NnfNodeBlockStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha4.NnfNodeBlockStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in *v1alpha3.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in *v1alpha4.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { out.SharedAllocation = in.SharedAllocation out.Allocations = *(*[]NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) return nil } -// Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in *v1alpha3.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in *v1alpha4.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha2_NnfNodeBlockStorageSpec(in, out, s) } -func autoConvert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha3.NnfNodeBlockStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) +func autoConvert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha4.NnfNodeBlockStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) out.ResourceError = in.ResourceError out.PodStartTime = in.PodStartTime out.Ready = in.Ready return nil } -// Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha3.NnfNodeBlockStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in, out, s) +// Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha4.NnfNodeBlockStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in *v1alpha3.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in *v1alpha4.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { out.Allocations = *(*[]NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) out.ResourceError = in.ResourceError out.PodStartTime = in.PodStartTime @@ -1921,167 +1949,167 @@ func autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStor return nil } -// Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in *v1alpha3.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in, out, s) +// Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in *v1alpha4.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha2_NnfNodeBlockStorageStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *NnfNodeECData, out *v1alpha3.NnfNodeECData, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData(in *NnfNodeECData, out *v1alpha4.NnfNodeECData, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *NnfNodeECData, out *v1alpha3.NnfNodeECData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeECData_To_v1alpha3_NnfNodeECData(in, out, s) +// Convert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData(in *NnfNodeECData, out *v1alpha4.NnfNodeECData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeECData_To_v1alpha4_NnfNodeECData(in, out, s) } -func autoConvert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData(in *v1alpha3.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData(in *v1alpha4.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData(in *v1alpha3.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECData_To_v1alpha2_NnfNodeECData(in, out, s) +// Convert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData(in *v1alpha4.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECData_To_v1alpha2_NnfNodeECData(in, out, s) } -func autoConvert_v1alpha2_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha3.NnfNodeECDataList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha4.NnfNodeECDataList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeECData)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfNodeECData)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha3.NnfNodeECDataList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in, out, s) +// Convert_v1alpha2_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha4.NnfNodeECDataList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in, out, s) } -func autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in *v1alpha3.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in *v1alpha4.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfNodeECData)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in *v1alpha3.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in, out, s) +// Convert_v1alpha4_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in *v1alpha4.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataList_To_v1alpha2_NnfNodeECDataList(in, out, s) } -func autoConvert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha3.NnfNodeECDataSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha4.NnfNodeECDataSpec, s conversion.Scope) error { return nil } -// Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha3.NnfNodeECDataSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in, out, s) +// Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha4.NnfNodeECDataSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in, out, s) } -func autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in *v1alpha3.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in *v1alpha4.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { return nil } -// Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in *v1alpha3.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in, out, s) +// Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in *v1alpha4.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataSpec_To_v1alpha2_NnfNodeECDataSpec(in, out, s) } -func autoConvert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha3.NnfNodeECDataStatus, s conversion.Scope) error { - out.Data = *(*map[string]v1alpha3.NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) +func autoConvert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha4.NnfNodeECDataStatus, s conversion.Scope) error { + out.Data = *(*map[string]v1alpha4.NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) return nil } -// Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha3.NnfNodeECDataStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in, out, s) +// Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha4.NnfNodeECDataStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in *v1alpha3.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in *v1alpha4.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { out.Data = *(*map[string]NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) return nil } -// Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in *v1alpha3.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in, out, s) +// Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in *v1alpha4.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataStatus_To_v1alpha2_NnfNodeECDataStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeList_To_v1alpha3_NnfNodeList(in *NnfNodeList, out *v1alpha3.NnfNodeList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeList_To_v1alpha4_NnfNodeList(in *NnfNodeList, out *v1alpha4.NnfNodeList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNode)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfNode)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfNodeList_To_v1alpha3_NnfNodeList is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeList_To_v1alpha3_NnfNodeList(in *NnfNodeList, out *v1alpha3.NnfNodeList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeList_To_v1alpha3_NnfNodeList(in, out, s) +// Convert_v1alpha2_NnfNodeList_To_v1alpha4_NnfNodeList is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeList_To_v1alpha4_NnfNodeList(in *NnfNodeList, out *v1alpha4.NnfNodeList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeList_To_v1alpha4_NnfNodeList(in, out, s) } -func autoConvert_v1alpha3_NnfNodeList_To_v1alpha2_NnfNodeList(in *v1alpha3.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeList_To_v1alpha2_NnfNodeList(in *v1alpha4.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfNode)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfNodeList_To_v1alpha2_NnfNodeList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeList_To_v1alpha2_NnfNodeList(in *v1alpha3.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeList_To_v1alpha2_NnfNodeList(in, out, s) +// Convert_v1alpha4_NnfNodeList_To_v1alpha2_NnfNodeList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeList_To_v1alpha2_NnfNodeList(in *v1alpha4.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeList_To_v1alpha2_NnfNodeList(in, out, s) } -func autoConvert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha3.NnfNodeSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha4.NnfNodeSpec, s conversion.Scope) error { out.Name = in.Name out.Pod = in.Pod - out.State = v1alpha3.NnfResourceStateType(in.State) + out.State = v1alpha4.NnfResourceStateType(in.State) return nil } -// Convert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha3.NnfNodeSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in, out, s) +// Convert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha4.NnfNodeSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in, out, s) } -func autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in *v1alpha3.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in *v1alpha4.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { out.Name = in.Name out.Pod = in.Pod out.State = NnfResourceStateType(in.State) return nil } -// Convert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in *v1alpha3.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in, out, s) +// Convert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in *v1alpha4.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeSpec_To_v1alpha2_NnfNodeSpec(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha3.NnfNodeStatus, s conversion.Scope) error { - out.Status = v1alpha3.NnfResourceStatusType(in.Status) - out.Health = v1alpha3.NnfResourceHealthType(in.Health) +func autoConvert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha4.NnfNodeStatus, s conversion.Scope) error { + out.Status = v1alpha4.NnfResourceStatusType(in.Status) + out.Health = v1alpha4.NnfResourceHealthType(in.Health) out.Fenced = in.Fenced out.LNetNid = in.LNetNid out.Capacity = in.Capacity out.CapacityAllocated = in.CapacityAllocated - out.Servers = *(*[]v1alpha3.NnfServerStatus)(unsafe.Pointer(&in.Servers)) - out.Drives = *(*[]v1alpha3.NnfDriveStatus)(unsafe.Pointer(&in.Drives)) + out.Servers = *(*[]v1alpha4.NnfServerStatus)(unsafe.Pointer(&in.Servers)) + out.Drives = *(*[]v1alpha4.NnfDriveStatus)(unsafe.Pointer(&in.Drives)) return nil } -// Convert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha3.NnfNodeStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in, out, s) +// Convert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha4.NnfNodeStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in *v1alpha3.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in *v1alpha4.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { out.Status = NnfResourceStatusType(in.Status) out.Health = NnfResourceHealthType(in.Health) out.Fenced = in.Fenced @@ -2093,219 +2121,239 @@ func autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in *v1alpha3.N return nil } -// Convert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in *v1alpha3.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in, out, s) +// Convert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in *v1alpha4.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStatus_To_v1alpha2_NnfNodeStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha3.NnfNodeStorage, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha4.NnfNodeStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha3.NnfNodeStorage, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in, out, s) +// Convert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha4.NnfNodeStorage, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in *v1alpha3.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in *v1alpha4.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in *v1alpha3.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in, out, s) +// Convert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in *v1alpha4.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha3.NnfNodeStorageAllocationStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha4.NnfNodeStorageAllocationStatus, s conversion.Scope) error { out.VolumeGroup = in.VolumeGroup out.LogicalVolume = in.LogicalVolume out.Ready = in.Ready return nil } -// Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha3.NnfNodeStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in, out, s) +// Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha4.NnfNodeStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in *v1alpha3.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in *v1alpha4.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { out.VolumeGroup = in.VolumeGroup out.LogicalVolume = in.LogicalVolume out.Ready = in.Ready return nil } -// Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in *v1alpha3.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in, out, s) +// Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in *v1alpha4.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha2_NnfNodeStorageAllocationStatus(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha3.NnfNodeStorageList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha4.NnfNodeStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfNodeStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfNodeStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha2_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha3.NnfNodeStorageList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in, out, s) +// Convert_v1alpha2_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha4.NnfNodeStorageList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in *v1alpha3.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in *v1alpha4.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]NnfNodeStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfNodeStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfNodeStorage_To_v1alpha2_NnfNodeStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha3_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in *v1alpha3.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in, out, s) +// Convert_v1alpha4_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in *v1alpha4.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageList_To_v1alpha2_NnfNodeStorageList(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha3.NnfNodeStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha4.NnfNodeStorageSpec, s conversion.Scope) error { out.Count = in.Count out.SharedAllocation = in.SharedAllocation out.Capacity = in.Capacity out.UserID = in.UserID out.GroupID = in.GroupID out.FileSystemType = in.FileSystemType - if err := Convert_v1alpha2_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { + if err := Convert_v1alpha2_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { return err } out.BlockReference = in.BlockReference return nil } -// Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha3.NnfNodeStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in, out, s) +// Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha4.NnfNodeStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in *v1alpha3.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in *v1alpha4.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { out.Count = in.Count out.SharedAllocation = in.SharedAllocation out.Capacity = in.Capacity out.UserID = in.UserID out.GroupID = in.GroupID out.FileSystemType = in.FileSystemType - if err := Convert_v1alpha3_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { + if err := Convert_v1alpha4_LustreStorageSpec_To_v1alpha2_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { return err } out.BlockReference = in.BlockReference return nil } -// Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in *v1alpha3.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in, out, s) +// Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in *v1alpha4.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageSpec_To_v1alpha2_NnfNodeStorageSpec(in, out, s) } -func autoConvert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha3.NnfNodeStorageStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) +func autoConvert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha4.NnfNodeStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha3.NnfNodeStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in, out, s) +// Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha4.NnfNodeStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in, out, s) } -func autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in *v1alpha3.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in *v1alpha4.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { out.Allocations = *(*[]NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in *v1alpha3.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in, out, s) +// Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in *v1alpha4.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageStatus_To_v1alpha2_NnfNodeStorageStatus(in, out, s) } -func autoConvert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager(in *NnfPortManager, out *v1alpha3.NnfPortManager, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager(in *NnfPortManager, out *v1alpha4.NnfPortManager, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager(in *NnfPortManager, out *v1alpha3.NnfPortManager, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManager_To_v1alpha3_NnfPortManager(in, out, s) +// Convert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager(in *NnfPortManager, out *v1alpha4.NnfPortManager, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManager_To_v1alpha4_NnfPortManager(in, out, s) } -func autoConvert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager(in *v1alpha3.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager(in *v1alpha4.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager(in *v1alpha3.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManager_To_v1alpha2_NnfPortManager(in, out, s) +// Convert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager(in *v1alpha4.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManager_To_v1alpha2_NnfPortManager(in, out, s) } -func autoConvert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha3.NnfPortManagerAllocationSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha4.NnfPortManagerAllocationSpec, s conversion.Scope) error { out.Requester = in.Requester out.Count = in.Count return nil } -// Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha3.NnfPortManagerAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in, out, s) +// Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha4.NnfPortManagerAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in, out, s) } -func autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in *v1alpha3.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in *v1alpha4.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { out.Requester = in.Requester out.Count = in.Count return nil } -// Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in *v1alpha3.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in, out, s) +// Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in *v1alpha4.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha2_NnfPortManagerAllocationSpec(in, out, s) } -func autoConvert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha3.NnfPortManagerAllocationStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha4.NnfPortManagerAllocationStatus, s conversion.Scope) error { out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) - out.Status = v1alpha3.NnfPortManagerAllocationStatusStatus(in.Status) + out.Status = v1alpha4.NnfPortManagerAllocationStatusStatus(in.Status) out.TimeUnallocated = (*metav1.Time)(unsafe.Pointer(in.TimeUnallocated)) return nil } -// Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha3.NnfPortManagerAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in, out, s) +// Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha4.NnfPortManagerAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in, out, s) } -func autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in *v1alpha3.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in *v1alpha4.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) out.Status = NnfPortManagerAllocationStatusStatus(in.Status) @@ -2313,91 +2361,91 @@ func autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortMana return nil } -// Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in *v1alpha3.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in, out, s) +// Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in *v1alpha4.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha2_NnfPortManagerAllocationStatus(in, out, s) } -func autoConvert_v1alpha2_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha3.NnfPortManagerList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha4.NnfPortManagerList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfPortManager)(unsafe.Pointer(&in.Items)) + out.Items = *(*[]v1alpha4.NnfPortManager)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha2_NnfPortManagerList_To_v1alpha3_NnfPortManagerList is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha3.NnfPortManagerList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in, out, s) +// Convert_v1alpha2_NnfPortManagerList_To_v1alpha4_NnfPortManagerList is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha4.NnfPortManagerList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in, out, s) } -func autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in *v1alpha3.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in *v1alpha4.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { out.ListMeta = in.ListMeta out.Items = *(*[]NnfPortManager)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NnfPortManagerList_To_v1alpha2_NnfPortManagerList is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in *v1alpha3.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in, out, s) +// Convert_v1alpha4_NnfPortManagerList_To_v1alpha2_NnfPortManagerList is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in *v1alpha4.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerList_To_v1alpha2_NnfPortManagerList(in, out, s) } -func autoConvert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha3.NnfPortManagerSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha4.NnfPortManagerSpec, s conversion.Scope) error { out.SystemConfiguration = in.SystemConfiguration - out.Allocations = *(*[]v1alpha3.NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) + out.Allocations = *(*[]v1alpha4.NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) return nil } -// Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha3.NnfPortManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in, out, s) +// Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha4.NnfPortManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in, out, s) } -func autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in *v1alpha3.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in *v1alpha4.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { out.SystemConfiguration = in.SystemConfiguration out.Allocations = *(*[]NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) return nil } -// Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in *v1alpha3.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in, out, s) +// Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in *v1alpha4.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerSpec_To_v1alpha2_NnfPortManagerSpec(in, out, s) } -func autoConvert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha3.NnfPortManagerStatus, s conversion.Scope) error { - out.Allocations = *(*[]v1alpha3.NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) - out.Status = v1alpha3.NnfPortManagerStatusStatus(in.Status) +func autoConvert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha4.NnfPortManagerStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.Status = v1alpha4.NnfPortManagerStatusStatus(in.Status) return nil } -// Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha3.NnfPortManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in, out, s) +// Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha4.NnfPortManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in, out, s) } -func autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in *v1alpha3.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in *v1alpha4.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { out.Allocations = *(*[]NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) out.Status = NnfPortManagerStatusStatus(in.Status) return nil } -// Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in *v1alpha3.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in, out, s) +// Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in *v1alpha4.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerStatus_To_v1alpha2_NnfPortManagerStatus(in, out, s) } -func autoConvert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha3.NnfResourceStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha4.NnfResourceStatus, s conversion.Scope) error { out.ID = in.ID out.Name = in.Name - out.Status = v1alpha3.NnfResourceStatusType(in.Status) - out.Health = v1alpha3.NnfResourceHealthType(in.Health) + out.Status = v1alpha4.NnfResourceStatusType(in.Status) + out.Health = v1alpha4.NnfResourceHealthType(in.Health) return nil } -// Convert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha3.NnfResourceStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in, out, s) +// Convert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha4.NnfResourceStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in, out, s) } -func autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in *v1alpha3.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in *v1alpha4.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { out.ID = in.ID out.Name = in.Name out.Status = NnfResourceStatusType(in.Status) @@ -2405,111 +2453,111 @@ func autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in *v1 return nil } -// Convert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in *v1alpha3.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in, out, s) +// Convert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in *v1alpha4.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(in, out, s) } -func autoConvert_v1alpha2_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *NnfServerStatus, out *v1alpha3.NnfServerStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfServerStatus_To_v1alpha4_NnfServerStatus(in *NnfServerStatus, out *v1alpha4.NnfServerStatus, s conversion.Scope) error { out.Hostname = in.Hostname - if err := Convert_v1alpha2_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + if err := Convert_v1alpha2_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfServerStatus_To_v1alpha3_NnfServerStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *NnfServerStatus, out *v1alpha3.NnfServerStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfServerStatus_To_v1alpha3_NnfServerStatus(in, out, s) +// Convert_v1alpha2_NnfServerStatus_To_v1alpha4_NnfServerStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfServerStatus_To_v1alpha4_NnfServerStatus(in *NnfServerStatus, out *v1alpha4.NnfServerStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfServerStatus_To_v1alpha4_NnfServerStatus(in, out, s) } -func autoConvert_v1alpha3_NnfServerStatus_To_v1alpha2_NnfServerStatus(in *v1alpha3.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfServerStatus_To_v1alpha2_NnfServerStatus(in *v1alpha4.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { out.Hostname = in.Hostname - if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + if err := Convert_v1alpha4_NnfResourceStatus_To_v1alpha2_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfServerStatus_To_v1alpha2_NnfServerStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfServerStatus_To_v1alpha2_NnfServerStatus(in *v1alpha3.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfServerStatus_To_v1alpha2_NnfServerStatus(in, out, s) +// Convert_v1alpha4_NnfServerStatus_To_v1alpha2_NnfServerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfServerStatus_To_v1alpha2_NnfServerStatus(in *v1alpha4.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfServerStatus_To_v1alpha2_NnfServerStatus(in, out, s) } -func autoConvert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage(in *NnfStorage, out *v1alpha3.NnfStorage, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(in *NnfStorage, out *v1alpha4.NnfStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage(in *NnfStorage, out *v1alpha3.NnfStorage, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorage_To_v1alpha3_NnfStorage(in, out, s) +// Convert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(in *NnfStorage, out *v1alpha4.NnfStorage, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(in, out, s) } -func autoConvert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage(in *v1alpha3.NnfStorage, out *NnfStorage, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(in *v1alpha4.NnfStorage, out *NnfStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage(in *v1alpha3.NnfStorage, out *NnfStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorage_To_v1alpha2_NnfStorage(in, out, s) +// Convert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(in *v1alpha4.NnfStorage, out *NnfStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(in, out, s) } -func autoConvert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha3.NnfStorageAllocationNodes, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha4.NnfStorageAllocationNodes, s conversion.Scope) error { out.Name = in.Name out.Count = in.Count return nil } -// Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha3.NnfStorageAllocationNodes, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in, out, s) +// Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha4.NnfStorageAllocationNodes, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in, out, s) } -func autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in *v1alpha3.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in *v1alpha4.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { out.Name = in.Name out.Count = in.Count return nil } -// Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in *v1alpha3.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in, out, s) +// Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in *v1alpha4.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha2_NnfStorageAllocationNodes(in, out, s) } -func autoConvert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha3.NnfStorageAllocationSetSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha4.NnfStorageAllocationSetSpec, s conversion.Scope) error { out.Name = in.Name out.Capacity = in.Capacity - if err := Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { + if err := Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { return err } out.SharedAllocation = in.SharedAllocation - out.Nodes = *(*[]v1alpha3.NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) + out.Nodes = *(*[]v1alpha4.NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) return nil } -// Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha3.NnfStorageAllocationSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in, out, s) +// Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha4.NnfStorageAllocationSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in, out, s) } -func autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in *v1alpha3.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in *v1alpha4.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { out.Name = in.Name out.Capacity = in.Capacity - if err := Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { + if err := Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { return err } out.SharedAllocation = in.SharedAllocation @@ -2517,56 +2565,76 @@ func autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllo return nil } -// Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in *v1alpha3.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in, out, s) +// Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in *v1alpha4.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha2_NnfStorageAllocationSetSpec(in, out, s) } -func autoConvert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha3.NnfStorageAllocationSetStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha4.NnfStorageAllocationSetStatus, s conversion.Scope) error { out.Ready = in.Ready out.AllocationCount = in.AllocationCount return nil } -// Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha3.NnfStorageAllocationSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in, out, s) +// Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha4.NnfStorageAllocationSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in, out, s) } -func autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in *v1alpha3.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in *v1alpha4.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { out.Ready = in.Ready out.AllocationCount = in.AllocationCount return nil } -// Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in *v1alpha3.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in, out, s) +// Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in *v1alpha4.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha2_NnfStorageAllocationSetStatus(in, out, s) } -func autoConvert_v1alpha2_NnfStorageList_To_v1alpha3_NnfStorageList(in *NnfStorageList, out *v1alpha3.NnfStorageList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageList_To_v1alpha4_NnfStorageList(in *NnfStorageList, out *v1alpha4.NnfStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_NnfStorage_To_v1alpha4_NnfStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha2_NnfStorageList_To_v1alpha3_NnfStorageList is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageList_To_v1alpha3_NnfStorageList(in *NnfStorageList, out *v1alpha3.NnfStorageList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageList_To_v1alpha3_NnfStorageList(in, out, s) +// Convert_v1alpha2_NnfStorageList_To_v1alpha4_NnfStorageList is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageList_To_v1alpha4_NnfStorageList(in *NnfStorageList, out *v1alpha4.NnfStorageList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageList_To_v1alpha4_NnfStorageList(in, out, s) } -func autoConvert_v1alpha3_NnfStorageList_To_v1alpha2_NnfStorageList(in *v1alpha3.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageList_To_v1alpha2_NnfStorageList(in *v1alpha4.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]NnfStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfStorage_To_v1alpha2_NnfStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha3_NnfStorageList_To_v1alpha2_NnfStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageList_To_v1alpha2_NnfStorageList(in *v1alpha3.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageList_To_v1alpha2_NnfStorageList(in, out, s) +// Convert_v1alpha4_NnfStorageList_To_v1alpha2_NnfStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageList_To_v1alpha2_NnfStorageList(in *v1alpha4.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageList_To_v1alpha2_NnfStorageList(in, out, s) } -func autoConvert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha3.NnfStorageLustreSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha4.NnfStorageLustreSpec, s conversion.Scope) error { out.TargetType = in.TargetType out.BackFs = in.BackFs out.MgsAddress = in.MgsAddress @@ -2574,12 +2642,12 @@ func autoConvert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec( return nil } -// Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha3.NnfStorageLustreSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in, out, s) +// Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha4.NnfStorageLustreSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in, out, s) } -func autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in *v1alpha3.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in *v1alpha4.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { out.TargetType = in.TargetType out.BackFs = in.BackFs out.MgsAddress = in.MgsAddress @@ -2587,73 +2655,69 @@ func autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec( return nil } -// Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in *v1alpha3.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in, out, s) +// Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in *v1alpha4.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageLustreSpec_To_v1alpha2_NnfStorageLustreSpec(in, out, s) } -func autoConvert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha3.NnfStorageLustreStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha4.NnfStorageLustreStatus, s conversion.Scope) error { out.MgsAddress = in.MgsAddress out.FileSystemName = in.FileSystemName out.LustreMgtReference = in.LustreMgtReference return nil } -// Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha3.NnfStorageLustreStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in, out, s) +// Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha4.NnfStorageLustreStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in, out, s) } -func autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in *v1alpha3.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in *v1alpha4.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { out.MgsAddress = in.MgsAddress out.FileSystemName = in.FileSystemName out.LustreMgtReference = in.LustreMgtReference + // WARNING: in.LustreComponents requires manual conversion: does not exist in peer-type return nil } -// Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in *v1alpha3.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(in, out, s) -} - -func autoConvert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha3.NnfStorageProfile, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha4.NnfStorageProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha3.NnfStorageProfile, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in, out, s) +// Convert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha4.NnfStorageProfile, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in *v1alpha3.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in *v1alpha4.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in *v1alpha3.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in, out, s) +// Convert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in *v1alpha4.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha3.NnfStorageProfileCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha4.NnfStorageProfileCmdLines, s conversion.Scope) error { out.Mkfs = in.Mkfs out.SharedVg = in.SharedVg out.PvCreate = in.PvCreate out.PvRemove = in.PvRemove out.VgCreate = in.VgCreate - if err := Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { return err } out.VgRemove = in.VgRemove out.LvCreate = in.LvCreate - if err := Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { return err } out.LvRemove = in.LvRemove @@ -2662,81 +2726,81 @@ func autoConvert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfil return nil } -// Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha3.NnfStorageProfileCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in, out, s) +// Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha4.NnfStorageProfileCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in *v1alpha3.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(in *v1alpha4.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s conversion.Scope) error { out.Mkfs = in.Mkfs out.SharedVg = in.SharedVg out.PvCreate = in.PvCreate out.PvRemove = in.PvRemove out.VgCreate = in.VgCreate - if err := Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { return err } out.VgRemove = in.VgRemove out.LvCreate = in.LvCreate - if err := Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { return err } out.LvRemove = in.LvRemove out.MountRabbit = in.MountRabbit - // WARNING: in.PostActivate requires manual conversion: does not exist in peer-type + // WARNING: in.PostMount requires manual conversion: does not exist in peer-type out.MountCompute = in.MountCompute - // WARNING: in.PreDeactivate requires manual conversion: does not exist in peer-type + // WARNING: in.PreUnmount requires manual conversion: does not exist in peer-type return nil } -func autoConvert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha3.NnfStorageProfileData, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha4.NnfStorageProfileData, s conversion.Scope) error { out.Default = in.Default out.Pinned = in.Pinned - if err := Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha3.NnfStorageProfileData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in, out, s) +// Convert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha4.NnfStorageProfileData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in *v1alpha3.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in *v1alpha4.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { out.Default = in.Default out.Pinned = in.Pinned - if err := Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in *v1alpha3.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in, out, s) +// Convert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in *v1alpha4.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileData_To_v1alpha2_NnfStorageProfileData(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha3.NnfStorageProfileGFS2Data, s conversion.Scope) error { - if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha4.NnfStorageProfileGFS2Data, s conversion.Scope) error { + if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -2744,13 +2808,13 @@ func autoConvert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfil return nil } -// Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha3.NnfStorageProfileGFS2Data, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in, out, s) +// Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha4.NnfStorageProfileGFS2Data, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in *v1alpha3.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in *v1alpha4.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -2758,62 +2822,62 @@ func autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfil return nil } -// Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in *v1alpha3.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in, out, s) +// Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in *v1alpha4.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha2_NnfStorageProfileGFS2Data(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { out.Activate = in.Activate out.Deactivate = in.Deactivate return nil } -// Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) +// Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { out.Activate = in.Activate out.Deactivate = in.Deactivate return nil } -// Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) +// Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { out.LockStart = in.LockStart out.LockStop = in.LockStop return nil } -// Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) +// Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { out.LockStart = in.LockStart out.LockStop = in.LockStop return nil } -// Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha3.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) +// Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha2_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha3.NnfStorageProfileList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha4.NnfStorageProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]v1alpha3.NnfStorageProfile, len(*in)) + *out = make([]v1alpha4.NnfStorageProfile, len(*in)) for i := range *in { - if err := Convert_v1alpha2_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -2823,18 +2887,18 @@ func autoConvert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileLis return nil } -// Convert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha3.NnfStorageProfileList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in, out, s) +// Convert_v1alpha2_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha4.NnfStorageProfileList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in *v1alpha3.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in *v1alpha4.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]NnfStorageProfile, len(*in)) for i := range *in { - if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfile_To_v1alpha2_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -2844,33 +2908,35 @@ func autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileLis return nil } -// Convert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in *v1alpha3.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in, out, s) +// Convert_v1alpha4_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in *v1alpha4.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileList_To_v1alpha2_NnfStorageProfileList(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha3.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha4.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { out.ZpoolCreate = in.ZpoolCreate out.Mkfs = in.Mkfs out.MountTarget = in.MountTarget return nil } -// Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha3.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in, out, s) +// Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha4.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in *v1alpha3.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(in *v1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s conversion.Scope) error { out.ZpoolCreate = in.ZpoolCreate out.Mkfs = in.Mkfs out.MountTarget = in.MountTarget // WARNING: in.PostActivate requires manual conversion: does not exist in peer-type + // WARNING: in.PostMount requires manual conversion: does not exist in peer-type + // WARNING: in.PreUnmount requires manual conversion: does not exist in peer-type // WARNING: in.PreDeactivate requires manual conversion: does not exist in peer-type return nil } -func autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha3.NnfStorageProfileLustreData, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha4.NnfStorageProfileLustreData, s conversion.Scope) error { out.CombinedMGTMDT = in.CombinedMGTMDT out.ExternalMGS = in.ExternalMGS out.CapacityMGT = in.CapacityMGT @@ -2878,28 +2944,28 @@ func autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProf out.ExclusiveMDT = in.ExclusiveMDT out.CapacityScalingFactor = in.CapacityScalingFactor out.StandaloneMGTPoolName = in.StandaloneMGTPoolName - if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { return err } - if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { + if err := Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { return err } out.MountRabbit = in.MountRabbit @@ -2907,12 +2973,12 @@ func autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProf return nil } -// Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha3.NnfStorageProfileLustreData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in, out, s) +// Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha4.NnfStorageProfileLustreData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in *v1alpha3.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in *v1alpha4.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { out.CombinedMGTMDT = in.CombinedMGTMDT out.ExternalMGS = in.ExternalMGS out.CapacityMGT = in.CapacityMGT @@ -2920,28 +2986,28 @@ func autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProf out.ExclusiveMDT = in.ExclusiveMDT out.CapacityScalingFactor = in.CapacityScalingFactor out.StandaloneMGTPoolName = in.StandaloneMGTPoolName - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha2_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { return err } - if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { return err } out.MountRabbit = in.MountRabbit @@ -2949,12 +3015,12 @@ func autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProf return nil } -// Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in *v1alpha3.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in, out, s) +// Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in *v1alpha4.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha2_NnfStorageProfileLustreData(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha3.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha4.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { out.ColocateComputes = in.ColocateComputes out.Count = in.Count out.Scale = in.Scale @@ -2962,12 +3028,12 @@ func autoConvert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStor return nil } -// Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha3.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in, out, s) +// Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha4.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in *v1alpha3.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in *v1alpha4.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { out.ColocateComputes = in.ColocateComputes out.Count = in.Count out.Scale = in.Scale @@ -2975,13 +3041,13 @@ func autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStor return nil } -// Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in *v1alpha3.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in, out, s) +// Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in *v1alpha4.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha2_NnfStorageProfileLustreMiscOptions(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha3.NnfStorageProfileRawData, s conversion.Scope) error { - if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha4.NnfStorageProfileRawData, s conversion.Scope) error { + if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -2989,13 +3055,13 @@ func autoConvert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfile return nil } -// Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha3.NnfStorageProfileRawData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in, out, s) +// Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha4.NnfStorageProfileRawData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in *v1alpha3.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in *v1alpha4.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -3003,13 +3069,13 @@ func autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfile return nil } -// Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in *v1alpha3.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in, out, s) +// Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in *v1alpha4.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileRawData_To_v1alpha2_NnfStorageProfileRawData(in, out, s) } -func autoConvert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha3.NnfStorageProfileXFSData, s conversion.Scope) error { - if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha4.NnfStorageProfileXFSData, s conversion.Scope) error { + if err := Convert_v1alpha2_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -3017,13 +3083,13 @@ func autoConvert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfile return nil } -// Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha3.NnfStorageProfileXFSData, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in, out, s) +// Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha4.NnfStorageProfileXFSData, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in, out, s) } -func autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in *v1alpha3.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { +func autoConvert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in *v1alpha4.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha2_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { return err } out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) @@ -3031,25 +3097,25 @@ func autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfile return nil } -// Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in *v1alpha3.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in, out, s) +// Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in *v1alpha4.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha2_NnfStorageProfileXFSData(in, out, s) } -func autoConvert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha3.NnfStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha4.NnfStorageSpec, s conversion.Scope) error { out.FileSystemType = in.FileSystemType out.UserID = in.UserID out.GroupID = in.GroupID - out.AllocationSets = *(*[]v1alpha3.NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) + out.AllocationSets = *(*[]v1alpha4.NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) return nil } -// Convert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha3.NnfStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in, out, s) +// Convert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha4.NnfStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in, out, s) } -func autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in *v1alpha3.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in *v1alpha4.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { out.FileSystemType = in.FileSystemType out.UserID = in.UserID out.GroupID = in.GroupID @@ -3057,28 +3123,28 @@ func autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in *v1alpha3 return nil } -// Convert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in *v1alpha3.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in, out, s) +// Convert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in *v1alpha4.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageSpec_To_v1alpha2_NnfStorageSpec(in, out, s) } -func autoConvert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha3.NnfStorageStatus, s conversion.Scope) error { - if err := Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { +func autoConvert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha4.NnfStorageStatus, s conversion.Scope) error { + if err := Convert_v1alpha2_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { return err } - out.AllocationSets = *(*[]v1alpha3.NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) + out.AllocationSets = *(*[]v1alpha4.NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) out.ResourceError = in.ResourceError out.Ready = in.Ready return nil } -// Convert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha3.NnfStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in, out, s) +// Convert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha4.NnfStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in, out, s) } -func autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in *v1alpha3.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { - if err := Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { +func autoConvert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in *v1alpha4.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha2_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { return err } out.AllocationSets = *(*[]NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) @@ -3087,73 +3153,93 @@ func autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in *v1al return nil } -// Convert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in *v1alpha3.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in, out, s) +// Convert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in *v1alpha4.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageStatus_To_v1alpha2_NnfStorageStatus(in, out, s) } -func autoConvert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha3.NnfSystemStorage, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha4.NnfSystemStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage is an autogenerated conversion function. -func Convert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha3.NnfSystemStorage, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in, out, s) +// Convert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage is an autogenerated conversion function. +func Convert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha4.NnfSystemStorage, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in, out, s) } -func autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in *v1alpha3.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in *v1alpha4.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { + if err := Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { return err } - if err := Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { + if err := Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { return err } return nil } -// Convert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in *v1alpha3.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in, out, s) +// Convert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in *v1alpha4.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(in, out, s) } -func autoConvert_v1alpha2_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha3.NnfSystemStorageList, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha4.NnfSystemStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.NnfSystemStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfSystemStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha2_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha2_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList is an autogenerated conversion function. -func Convert_v1alpha2_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha3.NnfSystemStorageList, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in, out, s) +// Convert_v1alpha2_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList is an autogenerated conversion function. +func Convert_v1alpha2_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha4.NnfSystemStorageList, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in, out, s) } -func autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in *v1alpha3.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in *v1alpha4.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { out.ListMeta = in.ListMeta - out.Items = *(*[]NnfSystemStorage)(unsafe.Pointer(&in.Items)) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfSystemStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfSystemStorage_To_v1alpha2_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } return nil } -// Convert_v1alpha3_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in *v1alpha3.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in, out, s) +// Convert_v1alpha4_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in *v1alpha4.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageList_To_v1alpha2_NnfSystemStorageList(in, out, s) } -func autoConvert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha3.NnfSystemStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha4.NnfSystemStorageSpec, s conversion.Scope) error { out.SystemConfiguration = in.SystemConfiguration out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) out.ExcludeDisabledRabbits = in.ExcludeDisabledRabbits out.ExcludeComputes = *(*[]string)(unsafe.Pointer(&in.ExcludeComputes)) out.IncludeComputes = *(*[]string)(unsafe.Pointer(&in.IncludeComputes)) - out.ComputesTarget = v1alpha3.NnfSystemStorageComputesTarget(in.ComputesTarget) + out.ComputesTarget = v1alpha4.NnfSystemStorageComputesTarget(in.ComputesTarget) out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) out.Capacity = in.Capacity out.Type = in.Type @@ -3163,12 +3249,12 @@ func autoConvert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec( return nil } -// Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec is an autogenerated conversion function. -func Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha3.NnfSystemStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in, out, s) +// Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec is an autogenerated conversion function. +func Convert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha4.NnfSystemStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in, out, s) } -func autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in *v1alpha3.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in *v1alpha4.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s conversion.Scope) error { out.SystemConfiguration = in.SystemConfiguration out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) @@ -3179,35 +3265,32 @@ func autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec( out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) out.Capacity = in.Capacity out.Type = in.Type + // WARNING: in.Shared requires manual conversion: does not exist in peer-type out.StorageProfile = in.StorageProfile + // WARNING: in.IgnoreOfflineComputes requires manual conversion: does not exist in peer-type out.MakeClientMounts = in.MakeClientMounts out.ClientMountPath = in.ClientMountPath return nil } -// Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in *v1alpha3.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha2_NnfSystemStorageSpec(in, out, s) -} - -func autoConvert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha3.NnfSystemStorageStatus, s conversion.Scope) error { +func autoConvert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha4.NnfSystemStorageStatus, s conversion.Scope) error { out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus is an autogenerated conversion function. -func Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha3.NnfSystemStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in, out, s) +// Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus is an autogenerated conversion function. +func Convert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha4.NnfSystemStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha2_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in, out, s) } -func autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in *v1alpha3.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { +func autoConvert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in *v1alpha4.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { out.Ready = in.Ready out.ResourceError = in.ResourceError return nil } -// Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus is an autogenerated conversion function. -func Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in *v1alpha3.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { - return autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in, out, s) +// Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in *v1alpha4.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageStatus_To_v1alpha2_NnfSystemStorageStatus(in, out, s) } diff --git a/api/v1alpha3/conversion.go b/api/v1alpha3/conversion.go index ba2fc0ada..23682f1f3 100644 --- a/api/v1alpha3/conversion.go +++ b/api/v1alpha3/conversion.go @@ -19,33 +19,695 @@ package v1alpha3 -func (*NnfAccess) Hub() {} -func (*NnfContainerProfile) Hub() {} -func (*NnfDataMovement) Hub() {} -func (*NnfDataMovementManager) Hub() {} -func (*NnfDataMovementProfile) Hub() {} -func (*NnfLustreMGT) Hub() {} -func (*NnfNode) Hub() {} -func (*NnfNodeBlockStorage) Hub() {} -func (*NnfNodeECData) Hub() {} -func (*NnfNodeStorage) Hub() {} -func (*NnfPortManager) Hub() {} -func (*NnfStorage) Hub() {} -func (*NnfStorageProfile) Hub() {} -func (*NnfSystemStorage) Hub() {} - -// The conversion-verifier tool wants these...though they're never used. -func (*NnfAccessList) Hub() {} -func (*NnfContainerProfileList) Hub() {} -func (*NnfDataMovementList) Hub() {} -func (*NnfDataMovementManagerList) Hub() {} -func (*NnfDataMovementProfileList) Hub() {} -func (*NnfLustreMGTList) Hub() {} -func (*NnfNodeList) Hub() {} -func (*NnfNodeBlockStorageList) Hub() {} -func (*NnfNodeECDataList) Hub() {} -func (*NnfNodeStorageList) Hub() {} -func (*NnfPortManagerList) Hub() {} -func (*NnfStorageList) Hub() {} -func (*NnfStorageProfileList) Hub() {} -func (*NnfSystemStorageList) Hub() {} +import ( + apierrors "k8s.io/apimachinery/pkg/api/errors" + apiconversion "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/conversion" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" + utilconversion "github.com/NearNodeFlash/nnf-sos/github/cluster-api/util/conversion" +) + +var convertlog = logf.Log.V(2).WithName("convert-v1alpha3") + +func (src *NnfAccess) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfAccess To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfAccess) + + if err := Convert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfAccess{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + if hasAnno { + dst.Spec.IgnoreOfflineComputes = restored.Spec.IgnoreOfflineComputes + } else { + dst.Spec.IgnoreOfflineComputes = false + } + + return nil +} + +func (dst *NnfAccess) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfAccess) + convertlog.Info("Convert NnfAccess From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfContainerProfile) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfContainerProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfContainerProfile) + + if err := Convert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfContainerProfile{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfContainerProfile) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfContainerProfile) + convertlog.Info("Convert NnfContainerProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfDataMovement) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfDataMovement To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovement) + + if err := Convert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfDataMovement{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfDataMovement) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfDataMovement) + convertlog.Info("Convert NnfDataMovement From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfDataMovementManager) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfDataMovementManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementManager) + + if err := Convert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfDataMovementManager{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfDataMovementManager) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfDataMovementManager) + convertlog.Info("Convert NnfDataMovementManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfDataMovementProfile) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfDataMovementProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfDataMovementProfile) + + if err := Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfDataMovementProfile{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + if hasAnno { + dst.Data.MkdirCommand = restored.Data.MkdirCommand + } + + return nil +} + +func (dst *NnfDataMovementProfile) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfDataMovementProfile) + convertlog.Info("Convert NnfDataMovementProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfLustreMGT) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfLustreMGT To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfLustreMGT) + + if err := Convert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfLustreMGT{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfLustreMGT) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfLustreMGT) + convertlog.Info("Convert NnfLustreMGT From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfNode) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfNode To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfNode) + + if err := Convert_v1alpha3_NnfNode_To_v1alpha4_NnfNode(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfNode{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfNode) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfNode) + convertlog.Info("Convert NnfNode From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfNode_To_v1alpha3_NnfNode(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfNodeBlockStorage) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfNodeBlockStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfNodeBlockStorage) + + if err := Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfNodeBlockStorage{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfNodeBlockStorage) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfNodeBlockStorage) + convertlog.Info("Convert NnfNodeBlockStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfNodeECData) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfNodeECData To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfNodeECData) + + if err := Convert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfNodeECData{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfNodeECData) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfNodeECData) + convertlog.Info("Convert NnfNodeECData From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfNodeStorage) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfNodeStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfNodeStorage) + + if err := Convert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfNodeStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Spec.LustreStorage.LustreComponents.MDTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MDTs...) + dst.Spec.LustreStorage.LustreComponents.MGTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MGTs...) + dst.Spec.LustreStorage.LustreComponents.MGTMDTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.MGTMDTs...) + dst.Spec.LustreStorage.LustreComponents.OSTs = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.OSTs...) + dst.Spec.LustreStorage.LustreComponents.NNFNodes = append([]string(nil), restored.Spec.LustreStorage.LustreComponents.NNFNodes...) + } + + return nil +} + +func (dst *NnfNodeStorage) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfNodeStorage) + convertlog.Info("Convert NnfNodeStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfPortManager) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfPortManager To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfPortManager) + + if err := Convert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfPortManager{} + if ok, err := utilconversion.UnmarshalData(src, restored); err != nil || !ok { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + return nil +} + +func (dst *NnfPortManager) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfPortManager) + convertlog.Info("Convert NnfPortManager From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfStorage) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfStorage) + + if err := Convert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Status.LustreComponents.MDTs = append([]string(nil), restored.Status.LustreComponents.MDTs...) + dst.Status.LustreComponents.MGTs = append([]string(nil), restored.Status.LustreComponents.MGTs...) + dst.Status.LustreComponents.MGTMDTs = append([]string(nil), restored.Status.LustreComponents.MGTMDTs...) + dst.Status.LustreComponents.OSTs = append([]string(nil), restored.Status.LustreComponents.OSTs...) + dst.Status.LustreComponents.NNFNodes = append([]string(nil), restored.Status.LustreComponents.NNFNodes...) + } + + return nil +} + +func (dst *NnfStorage) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfStorage) + convertlog.Info("Convert NnfStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfStorageProfile) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfStorageProfile To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfStorageProfile) + + if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfStorageProfile{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + if hasAnno { + dst.Data.LustreStorage.MgtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PostMount...) + dst.Data.LustreStorage.MgtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MgtCmdLines.PreUnmount...) + dst.Data.LustreStorage.MgtMdtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PostMount...) + dst.Data.LustreStorage.MgtMdtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MgtMdtCmdLines.PreUnmount...) + dst.Data.LustreStorage.MdtCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PostMount...) + dst.Data.LustreStorage.MdtCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.MdtCmdLines.PreUnmount...) + dst.Data.LustreStorage.OstCmdLines.PostMount = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PostMount...) + dst.Data.LustreStorage.OstCmdLines.PreUnmount = append([]string(nil), restored.Data.LustreStorage.OstCmdLines.PreUnmount...) + dst.Data.RawStorage.CmdLines.PostMount = append([]string(nil), restored.Data.RawStorage.CmdLines.PostMount...) + dst.Data.RawStorage.CmdLines.PreUnmount = append([]string(nil), restored.Data.RawStorage.CmdLines.PreUnmount...) + dst.Data.XFSStorage.CmdLines.PostMount = append([]string(nil), restored.Data.XFSStorage.CmdLines.PostMount...) + dst.Data.XFSStorage.CmdLines.PreUnmount = append([]string(nil), restored.Data.XFSStorage.CmdLines.PreUnmount...) + dst.Data.GFS2Storage.CmdLines.PostMount = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PostMount...) + dst.Data.GFS2Storage.CmdLines.PreUnmount = append([]string(nil), restored.Data.GFS2Storage.CmdLines.PreUnmount...) + } else { + // For non-lustre, PostActivate is now PostMount and PreDeactivate is now PreUnmount + dst.Data.RawStorage.CmdLines.PostMount = src.Data.RawStorage.CmdLines.PostActivate + dst.Data.XFSStorage.CmdLines.PostMount = src.Data.XFSStorage.CmdLines.PostActivate + dst.Data.GFS2Storage.CmdLines.PostMount = src.Data.GFS2Storage.CmdLines.PostActivate + dst.Data.RawStorage.CmdLines.PreUnmount = src.Data.RawStorage.CmdLines.PreDeactivate + dst.Data.XFSStorage.CmdLines.PreUnmount = src.Data.XFSStorage.CmdLines.PreDeactivate + dst.Data.GFS2Storage.CmdLines.PreUnmount = src.Data.GFS2Storage.CmdLines.PreDeactivate + } + + return nil +} + +func (dst *NnfStorageProfile) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfStorageProfile) + convertlog.Info("Convert NnfStorageProfile From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(src, dst, nil); err != nil { + return err + } + + // For non-lustre, PostActivate is now PostMount and PreDeactivate is now PreUnmount + dst.Data.RawStorage.CmdLines.PostActivate = src.Data.RawStorage.CmdLines.PostMount + dst.Data.XFSStorage.CmdLines.PostActivate = src.Data.XFSStorage.CmdLines.PostMount + dst.Data.GFS2Storage.CmdLines.PostActivate = src.Data.GFS2Storage.CmdLines.PostMount + dst.Data.RawStorage.CmdLines.PreDeactivate = src.Data.RawStorage.CmdLines.PreUnmount + dst.Data.XFSStorage.CmdLines.PreDeactivate = src.Data.XFSStorage.CmdLines.PreUnmount + dst.Data.GFS2Storage.CmdLines.PreDeactivate = src.Data.GFS2Storage.CmdLines.PreUnmount + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +func (src *NnfSystemStorage) ConvertTo(dstRaw conversion.Hub) error { + convertlog.Info("Convert NnfSystemStorage To Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + dst := dstRaw.(*nnfv1alpha4.NnfSystemStorage) + + if err := Convert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(src, dst, nil); err != nil { + return err + } + + // Manually restore data. + restored := &nnfv1alpha4.NnfSystemStorage{} + hasAnno, err := utilconversion.UnmarshalData(src, restored) + if err != nil { + return err + } + // EDIT THIS FUNCTION! If the annotation is holding anything that is + // hub-specific then copy it into 'dst' from 'restored'. + // Otherwise, you may comment out UnmarshalData() until it's needed. + + if hasAnno { + dst.Spec.Shared = restored.Spec.Shared + dst.Spec.IgnoreOfflineComputes = restored.Spec.IgnoreOfflineComputes + } else { + dst.Spec.Shared = true + dst.Spec.IgnoreOfflineComputes = false + } + + return nil +} + +func (dst *NnfSystemStorage) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*nnfv1alpha4.NnfSystemStorage) + convertlog.Info("Convert NnfSystemStorage From Hub", "name", src.GetName(), "namespace", src.GetNamespace()) + + if err := Convert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(src, dst, nil); err != nil { + return err + } + + // Preserve Hub data on down-conversion except for metadata. + return utilconversion.MarshalData(src, dst) +} + +// The List-based ConvertTo/ConvertFrom routines are never used by the +// conversion webhook, but the conversion-verifier tool wants to see them. +// The conversion-gen tool generated the Convert_X_to_Y routines, should they +// ever be needed. + +func resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: "nnf", Resource: resource} +} + +func (src *NnfAccessList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfAccessList"), "ConvertTo") +} + +func (dst *NnfAccessList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfAccessList"), "ConvertFrom") +} + +func (src *NnfContainerProfileList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfContainerProfileList"), "ConvertTo") +} + +func (dst *NnfContainerProfileList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfContainerProfileList"), "ConvertFrom") +} + +func (src *NnfDataMovementList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementList"), "ConvertTo") +} + +func (dst *NnfDataMovementList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementList"), "ConvertFrom") +} + +func (src *NnfDataMovementManagerList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementManagerList"), "ConvertTo") +} + +func (dst *NnfDataMovementManagerList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementManagerList"), "ConvertFrom") +} + +func (src *NnfDataMovementProfileList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementProfileList"), "ConvertTo") +} + +func (dst *NnfDataMovementProfileList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfDataMovementProfileList"), "ConvertFrom") +} + +func (src *NnfLustreMGTList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfLustreMGTList"), "ConvertTo") +} + +func (dst *NnfLustreMGTList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfLustreMGTList"), "ConvertFrom") +} + +func (src *NnfNodeList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeList"), "ConvertTo") +} + +func (dst *NnfNodeList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeList"), "ConvertFrom") +} + +func (src *NnfNodeBlockStorageList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeBlockStorageList"), "ConvertTo") +} + +func (dst *NnfNodeBlockStorageList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeBlockStorageList"), "ConvertFrom") +} + +func (src *NnfNodeECDataList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeECDataList"), "ConvertTo") +} + +func (dst *NnfNodeECDataList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeECDataList"), "ConvertFrom") +} + +func (src *NnfNodeStorageList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeStorageList"), "ConvertTo") +} + +func (dst *NnfNodeStorageList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfNodeStorageList"), "ConvertFrom") +} + +func (src *NnfPortManagerList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfPortManagerList"), "ConvertTo") +} + +func (dst *NnfPortManagerList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfPortManagerList"), "ConvertFrom") +} + +func (src *NnfStorageList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfStorageList"), "ConvertTo") +} + +func (dst *NnfStorageList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfStorageList"), "ConvertFrom") +} + +func (src *NnfStorageProfileList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfStorageProfileList"), "ConvertTo") +} + +func (dst *NnfStorageProfileList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfStorageProfileList"), "ConvertFrom") +} + +func (src *NnfSystemStorageList) ConvertTo(dstRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfSystemStorageList"), "ConvertTo") +} + +func (dst *NnfSystemStorageList) ConvertFrom(srcRaw conversion.Hub) error { + return apierrors.NewMethodNotSupported(resource("NnfSystemStorageList"), "ConvertFrom") +} + +// The conversion-gen tool dropped these from zz_generated.conversion.go to +// force us to acknowledge that we are addressing the conversion requirements. + +// Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *nnfv1alpha4.NnfStorageProfileCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in, out, s) +} + +// Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *nnfv1alpha4.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in, out, s) +} + +// Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *nnfv1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in, out, s) +} + +func Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *nnfv1alpha4.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in, out, s) +} + +func Convert_v1alpha4_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *nnfv1alpha4.NnfAccessSpec, out *NnfAccessSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in, out, s) +} + +func Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *nnfv1alpha4.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in, out, s) +} + +// Convert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *nnfv1alpha4.LustreStorageSpec, out *LustreStorageSpec, s apiconversion.Scope) error { + return autoConvert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in, out, s) +} + +// Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *nnfv1alpha4.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s apiconversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in, out, s) +} diff --git a/api/v1alpha1/conversion_test.go b/api/v1alpha3/conversion_test.go similarity index 81% rename from api/v1alpha1/conversion_test.go rename to api/v1alpha3/conversion_test.go index e5ccf1895..c68ef9f5f 100644 --- a/api/v1alpha1/conversion_test.go +++ b/api/v1alpha3/conversion_test.go @@ -17,86 +17,86 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha3 import ( "testing" . "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/v1alpha3/doc.go similarity index 97% rename from api/v1alpha1/doc.go rename to api/v1alpha3/doc.go index c39a863fc..6de88b874 100644 --- a/api/v1alpha1/doc.go +++ b/api/v1alpha3/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 -package v1alpha1 +// +k8s:conversion-gen=github.com/NearNodeFlash/nnf-sos/api/v1alpha4 +package v1alpha3 diff --git a/api/v1alpha3/groupversion_info.go b/api/v1alpha3/groupversion_info.go index 858a308e4..ef51561a7 100644 --- a/api/v1alpha3/groupversion_info.go +++ b/api/v1alpha3/groupversion_info.go @@ -36,4 +36,7 @@ var ( // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme + + // Used by zz_generated.conversion.go. + localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/api/v1alpha3/nnfaccess_types.go b/api/v1alpha3/nnfaccess_types.go index dcf9b38d7..90377d29f 100644 --- a/api/v1alpha3/nnfaccess_types.go +++ b/api/v1alpha3/nnfaccess_types.go @@ -87,7 +87,6 @@ type NnfAccessStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="DESIREDSTATE",type="string",JSONPath=".spec.desiredState",description="The desired state" //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state",description="The current state" //+kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="Whether the state has been achieved" diff --git a/api/v1alpha3/nnfcontainerprofile_types.go b/api/v1alpha3/nnfcontainerprofile_types.go index 1376b2c7b..ac09f9967 100644 --- a/api/v1alpha3/nnfcontainerprofile_types.go +++ b/api/v1alpha3/nnfcontainerprofile_types.go @@ -116,7 +116,6 @@ type NnfContainerProfileStorage struct { } // +kubebuilder:object:root=true -// +kubebuilder:storageversion // NnfContainerProfile is the Schema for the nnfcontainerprofiles API type NnfContainerProfile struct { @@ -127,7 +126,6 @@ type NnfContainerProfile struct { } // +kubebuilder:object:root=true -// +kubebuilder:storageversion // NnfContainerProfileList contains a list of NnfContainerProfile type NnfContainerProfileList struct { diff --git a/api/v1alpha3/nnfdatamovement_types.go b/api/v1alpha3/nnfdatamovement_types.go index 0c5342ce1..04956d4b3 100644 --- a/api/v1alpha3/nnfdatamovement_types.go +++ b/api/v1alpha3/nnfdatamovement_types.go @@ -219,7 +219,6 @@ const ( //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state",description="Current state" //+kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.status",description="Status of current state" //+kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" diff --git a/api/v1alpha3/nnfdatamovementmanager_types.go b/api/v1alpha3/nnfdatamovementmanager_types.go index b147f019d..5580ab27b 100644 --- a/api/v1alpha3/nnfdatamovementmanager_types.go +++ b/api/v1alpha3/nnfdatamovementmanager_types.go @@ -75,7 +75,6 @@ type NnfDataMovementManagerStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="True if manager readied all resoures" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfdatamovementprofile_types.go b/api/v1alpha3/nnfdatamovementprofile_types.go index 27b0dfd15..37d0c7d6c 100644 --- a/api/v1alpha3/nnfdatamovementprofile_types.go +++ b/api/v1alpha3/nnfdatamovementprofile_types.go @@ -97,7 +97,6 @@ type NnfDataMovementProfileData struct { } // +kubebuilder:object:root=true -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="DEFAULT",type="boolean",JSONPath=".data.default",description="True if this is the default instance" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" @@ -110,7 +109,6 @@ type NnfDataMovementProfile struct { } // +kubebuilder:object:root=true -// +kubebuilder:storageversion // NnfDataMovementProfileList contains a list of NnfDataMovementProfile type NnfDataMovementProfileList struct { diff --git a/api/v1alpha3/nnflustremgt_types.go b/api/v1alpha3/nnflustremgt_types.go index 98fc31417..dfb09377d 100644 --- a/api/v1alpha3/nnflustremgt_types.go +++ b/api/v1alpha3/nnflustremgt_types.go @@ -70,7 +70,6 @@ type NnfLustreMGTStatusClaim struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // NnfLustreMGT is the Schema for the nnfstorageprofiles API type NnfLustreMGT struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha3/nnfnode_types.go b/api/v1alpha3/nnfnode_types.go index 9feb06f93..0f4d615ac 100644 --- a/api/v1alpha3/nnfnode_types.go +++ b/api/v1alpha3/nnfnode_types.go @@ -98,7 +98,6 @@ type NnfDriveStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".spec.state",description="Current desired state" //+kubebuilder:printcolumn:name="HEALTH",type="string",JSONPath=".status.health",description="Health of node" //+kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.status",description="Current status of node" diff --git a/api/v1alpha3/nnfnodeblockstorage_types.go b/api/v1alpha3/nnfnodeblockstorage_types.go index 41806b57e..73e66a67d 100644 --- a/api/v1alpha3/nnfnodeblockstorage_types.go +++ b/api/v1alpha3/nnfnodeblockstorage_types.go @@ -97,7 +97,6 @@ type NnfNodeBlockStorageAllocationStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" // +kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfnodeecdata_types.go b/api/v1alpha3/nnfnodeecdata_types.go index 823b90c31..fc8080591 100644 --- a/api/v1alpha3/nnfnodeecdata_types.go +++ b/api/v1alpha3/nnfnodeecdata_types.go @@ -44,7 +44,6 @@ type NnfNodeECPrivateData map[string]string //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion // NnfNodeECData is the Schema for the nnfnodeecdata API type NnfNodeECData struct { diff --git a/api/v1alpha3/nnfnodestorage_types.go b/api/v1alpha3/nnfnodestorage_types.go index a977b6774..c90c746e1 100644 --- a/api/v1alpha3/nnfnodestorage_types.go +++ b/api/v1alpha3/nnfnodestorage_types.go @@ -113,7 +113,6 @@ type NnfNodeStorageAllocationStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" // +kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfportmanager_types.go b/api/v1alpha3/nnfportmanager_types.go index dd75dde32..fb1805218 100644 --- a/api/v1alpha3/nnfportmanager_types.go +++ b/api/v1alpha3/nnfportmanager_types.go @@ -113,7 +113,6 @@ type NnfPortManagerStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion // NnfPortManager is the Schema for the nnfportmanagers API type NnfPortManager struct { diff --git a/api/v1alpha3/nnfstorage_types.go b/api/v1alpha3/nnfstorage_types.go index 841e2e9a8..45b7a1764 100644 --- a/api/v1alpha3/nnfstorage_types.go +++ b/api/v1alpha3/nnfstorage_types.go @@ -141,7 +141,6 @@ type NnfStorageStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" //+kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" diff --git a/api/v1alpha3/nnfstorageprofile_types.go b/api/v1alpha3/nnfstorageprofile_types.go index 8b5b3e98a..3560b5fa9 100644 --- a/api/v1alpha3/nnfstorageprofile_types.go +++ b/api/v1alpha3/nnfstorageprofile_types.go @@ -275,7 +275,6 @@ type NnfStorageProfileData struct { } //+kubebuilder:object:root=true -// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="DEFAULT",type="boolean",JSONPath=".data.default",description="True if this is the default instance" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" @@ -288,7 +287,6 @@ type NnfStorageProfile struct { } //+kubebuilder:object:root=true -// +kubebuilder:storageversion // NnfStorageProfileList contains a list of NnfStorageProfile type NnfStorageProfileList struct { diff --git a/api/v1alpha3/nnfsystemstorage_types.go b/api/v1alpha3/nnfsystemstorage_types.go index cdb0628a1..bfe0a7fb2 100644 --- a/api/v1alpha3/nnfsystemstorage_types.go +++ b/api/v1alpha3/nnfsystemstorage_types.go @@ -105,7 +105,6 @@ type NnfSystemStorageStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:storageversion // NnfSystemStorage is the Schema for the nnfsystemstorages API type NnfSystemStorage struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha3/zz_generated.conversion.go b/api/v1alpha3/zz_generated.conversion.go new file mode 100644 index 000000000..98b095151 --- /dev/null +++ b/api/v1alpha3/zz_generated.conversion.go @@ -0,0 +1,3295 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* + * Copyright 2024 Hewlett Packard Enterprise Development LP + * Other additional copyright holders may be indicated within. + * + * The entirety of this work is licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + unsafe "unsafe" + + v1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" + v1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" + v2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*LustreStorageSpec)(nil), (*v1alpha4.LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(a.(*LustreStorageSpec), b.(*v1alpha4.LustreStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfAccess)(nil), (*v1alpha4.NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(a.(*NnfAccess), b.(*v1alpha4.NnfAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccess)(nil), (*NnfAccess)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(a.(*v1alpha4.NnfAccess), b.(*NnfAccess), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfAccessList)(nil), (*v1alpha4.NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfAccessList_To_v1alpha4_NnfAccessList(a.(*NnfAccessList), b.(*v1alpha4.NnfAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccessList)(nil), (*NnfAccessList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessList_To_v1alpha3_NnfAccessList(a.(*v1alpha4.NnfAccessList), b.(*NnfAccessList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfAccessSpec)(nil), (*v1alpha4.NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(a.(*NnfAccessSpec), b.(*v1alpha4.NnfAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfAccessStatus)(nil), (*v1alpha4.NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(a.(*NnfAccessStatus), b.(*v1alpha4.NnfAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfAccessStatus)(nil), (*NnfAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(a.(*v1alpha4.NnfAccessStatus), b.(*NnfAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfContainerProfile)(nil), (*v1alpha4.NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(a.(*NnfContainerProfile), b.(*v1alpha4.NnfContainerProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfile)(nil), (*NnfContainerProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(a.(*v1alpha4.NnfContainerProfile), b.(*NnfContainerProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileData)(nil), (*v1alpha4.NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(a.(*NnfContainerProfileData), b.(*v1alpha4.NnfContainerProfileData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileData)(nil), (*NnfContainerProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(a.(*v1alpha4.NnfContainerProfileData), b.(*NnfContainerProfileData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileList)(nil), (*v1alpha4.NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(a.(*NnfContainerProfileList), b.(*v1alpha4.NnfContainerProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileList)(nil), (*NnfContainerProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(a.(*v1alpha4.NnfContainerProfileList), b.(*NnfContainerProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfContainerProfileStorage)(nil), (*v1alpha4.NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(a.(*NnfContainerProfileStorage), b.(*v1alpha4.NnfContainerProfileStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfContainerProfileStorage)(nil), (*NnfContainerProfileStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(a.(*v1alpha4.NnfContainerProfileStorage), b.(*NnfContainerProfileStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovement)(nil), (*v1alpha4.NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement(a.(*NnfDataMovement), b.(*v1alpha4.NnfDataMovement), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovement)(nil), (*NnfDataMovement)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement(a.(*v1alpha4.NnfDataMovement), b.(*NnfDataMovement), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementCommandStatus)(nil), (*v1alpha4.NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(a.(*NnfDataMovementCommandStatus), b.(*v1alpha4.NnfDataMovementCommandStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementCommandStatus)(nil), (*NnfDataMovementCommandStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(a.(*v1alpha4.NnfDataMovementCommandStatus), b.(*NnfDataMovementCommandStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementConfig)(nil), (*v1alpha4.NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(a.(*NnfDataMovementConfig), b.(*v1alpha4.NnfDataMovementConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementConfig)(nil), (*NnfDataMovementConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(a.(*v1alpha4.NnfDataMovementConfig), b.(*NnfDataMovementConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementList)(nil), (*v1alpha4.NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(a.(*NnfDataMovementList), b.(*v1alpha4.NnfDataMovementList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementList)(nil), (*NnfDataMovementList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(a.(*v1alpha4.NnfDataMovementList), b.(*NnfDataMovementList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManager)(nil), (*v1alpha4.NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(a.(*NnfDataMovementManager), b.(*v1alpha4.NnfDataMovementManager), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManager)(nil), (*NnfDataMovementManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(a.(*v1alpha4.NnfDataMovementManager), b.(*NnfDataMovementManager), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerList)(nil), (*v1alpha4.NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(a.(*NnfDataMovementManagerList), b.(*v1alpha4.NnfDataMovementManagerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerList)(nil), (*NnfDataMovementManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(a.(*v1alpha4.NnfDataMovementManagerList), b.(*NnfDataMovementManagerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerSpec)(nil), (*v1alpha4.NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(a.(*NnfDataMovementManagerSpec), b.(*v1alpha4.NnfDataMovementManagerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerSpec)(nil), (*NnfDataMovementManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(a.(*v1alpha4.NnfDataMovementManagerSpec), b.(*NnfDataMovementManagerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementManagerStatus)(nil), (*v1alpha4.NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(a.(*NnfDataMovementManagerStatus), b.(*v1alpha4.NnfDataMovementManagerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementManagerStatus)(nil), (*NnfDataMovementManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(a.(*v1alpha4.NnfDataMovementManagerStatus), b.(*NnfDataMovementManagerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfile)(nil), (*v1alpha4.NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(a.(*NnfDataMovementProfile), b.(*v1alpha4.NnfDataMovementProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementProfile)(nil), (*NnfDataMovementProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(a.(*v1alpha4.NnfDataMovementProfile), b.(*NnfDataMovementProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileData)(nil), (*v1alpha4.NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(a.(*NnfDataMovementProfileData), b.(*v1alpha4.NnfDataMovementProfileData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementProfileList)(nil), (*v1alpha4.NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(a.(*NnfDataMovementProfileList), b.(*v1alpha4.NnfDataMovementProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementProfileList)(nil), (*NnfDataMovementProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(a.(*v1alpha4.NnfDataMovementProfileList), b.(*NnfDataMovementProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpec)(nil), (*v1alpha4.NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(a.(*NnfDataMovementSpec), b.(*v1alpha4.NnfDataMovementSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementSpec)(nil), (*NnfDataMovementSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(a.(*v1alpha4.NnfDataMovementSpec), b.(*NnfDataMovementSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementSpecSourceDestination)(nil), (*v1alpha4.NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(a.(*NnfDataMovementSpecSourceDestination), b.(*v1alpha4.NnfDataMovementSpecSourceDestination), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementSpecSourceDestination)(nil), (*NnfDataMovementSpecSourceDestination)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(a.(*v1alpha4.NnfDataMovementSpecSourceDestination), b.(*NnfDataMovementSpecSourceDestination), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDataMovementStatus)(nil), (*v1alpha4.NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(a.(*NnfDataMovementStatus), b.(*v1alpha4.NnfDataMovementStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDataMovementStatus)(nil), (*NnfDataMovementStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(a.(*v1alpha4.NnfDataMovementStatus), b.(*NnfDataMovementStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfDriveStatus)(nil), (*v1alpha4.NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(a.(*NnfDriveStatus), b.(*v1alpha4.NnfDriveStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfDriveStatus)(nil), (*NnfDriveStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(a.(*v1alpha4.NnfDriveStatus), b.(*NnfDriveStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfLustreMGT)(nil), (*v1alpha4.NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(a.(*NnfLustreMGT), b.(*v1alpha4.NnfLustreMGT), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGT)(nil), (*NnfLustreMGT)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(a.(*v1alpha4.NnfLustreMGT), b.(*NnfLustreMGT), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTList)(nil), (*v1alpha4.NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(a.(*NnfLustreMGTList), b.(*v1alpha4.NnfLustreMGTList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTList)(nil), (*NnfLustreMGTList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(a.(*v1alpha4.NnfLustreMGTList), b.(*NnfLustreMGTList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTSpec)(nil), (*v1alpha4.NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(a.(*NnfLustreMGTSpec), b.(*v1alpha4.NnfLustreMGTSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTSpec)(nil), (*NnfLustreMGTSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(a.(*v1alpha4.NnfLustreMGTSpec), b.(*NnfLustreMGTSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatus)(nil), (*v1alpha4.NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(a.(*NnfLustreMGTStatus), b.(*v1alpha4.NnfLustreMGTStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTStatus)(nil), (*NnfLustreMGTStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(a.(*v1alpha4.NnfLustreMGTStatus), b.(*NnfLustreMGTStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfLustreMGTStatusClaim)(nil), (*v1alpha4.NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(a.(*NnfLustreMGTStatusClaim), b.(*v1alpha4.NnfLustreMGTStatusClaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfLustreMGTStatusClaim)(nil), (*NnfLustreMGTStatusClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(a.(*v1alpha4.NnfLustreMGTStatusClaim), b.(*NnfLustreMGTStatusClaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNode)(nil), (*v1alpha4.NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNode_To_v1alpha4_NnfNode(a.(*NnfNode), b.(*v1alpha4.NnfNode), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNode)(nil), (*NnfNode)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNode_To_v1alpha3_NnfNode(a.(*v1alpha4.NnfNode), b.(*NnfNode), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorage)(nil), (*v1alpha4.NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(a.(*NnfNodeBlockStorage), b.(*v1alpha4.NnfNodeBlockStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorage)(nil), (*NnfNodeBlockStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(a.(*v1alpha4.NnfNodeBlockStorage), b.(*NnfNodeBlockStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAccessStatus)(nil), (*v1alpha4.NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(a.(*NnfNodeBlockStorageAccessStatus), b.(*v1alpha4.NnfNodeBlockStorageAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAccessStatus)(nil), (*NnfNodeBlockStorageAccessStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(a.(*v1alpha4.NnfNodeBlockStorageAccessStatus), b.(*NnfNodeBlockStorageAccessStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationSpec)(nil), (*v1alpha4.NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(a.(*NnfNodeBlockStorageAllocationSpec), b.(*v1alpha4.NnfNodeBlockStorageAllocationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAllocationSpec)(nil), (*NnfNodeBlockStorageAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(a.(*v1alpha4.NnfNodeBlockStorageAllocationSpec), b.(*NnfNodeBlockStorageAllocationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageAllocationStatus)(nil), (*v1alpha4.NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(a.(*NnfNodeBlockStorageAllocationStatus), b.(*v1alpha4.NnfNodeBlockStorageAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageAllocationStatus)(nil), (*NnfNodeBlockStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(a.(*v1alpha4.NnfNodeBlockStorageAllocationStatus), b.(*NnfNodeBlockStorageAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageDeviceStatus)(nil), (*v1alpha4.NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(a.(*NnfNodeBlockStorageDeviceStatus), b.(*v1alpha4.NnfNodeBlockStorageDeviceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageDeviceStatus)(nil), (*NnfNodeBlockStorageDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(a.(*v1alpha4.NnfNodeBlockStorageDeviceStatus), b.(*NnfNodeBlockStorageDeviceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageList)(nil), (*v1alpha4.NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(a.(*NnfNodeBlockStorageList), b.(*v1alpha4.NnfNodeBlockStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageList)(nil), (*NnfNodeBlockStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(a.(*v1alpha4.NnfNodeBlockStorageList), b.(*NnfNodeBlockStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageSpec)(nil), (*v1alpha4.NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(a.(*NnfNodeBlockStorageSpec), b.(*v1alpha4.NnfNodeBlockStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageSpec)(nil), (*NnfNodeBlockStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(a.(*v1alpha4.NnfNodeBlockStorageSpec), b.(*NnfNodeBlockStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeBlockStorageStatus)(nil), (*v1alpha4.NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(a.(*NnfNodeBlockStorageStatus), b.(*v1alpha4.NnfNodeBlockStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeBlockStorageStatus)(nil), (*NnfNodeBlockStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(a.(*v1alpha4.NnfNodeBlockStorageStatus), b.(*NnfNodeBlockStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeECData)(nil), (*v1alpha4.NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData(a.(*NnfNodeECData), b.(*v1alpha4.NnfNodeECData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECData)(nil), (*NnfNodeECData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData(a.(*v1alpha4.NnfNodeECData), b.(*NnfNodeECData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataList)(nil), (*v1alpha4.NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(a.(*NnfNodeECDataList), b.(*v1alpha4.NnfNodeECDataList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataList)(nil), (*NnfNodeECDataList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(a.(*v1alpha4.NnfNodeECDataList), b.(*NnfNodeECDataList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataSpec)(nil), (*v1alpha4.NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(a.(*NnfNodeECDataSpec), b.(*v1alpha4.NnfNodeECDataSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataSpec)(nil), (*NnfNodeECDataSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(a.(*v1alpha4.NnfNodeECDataSpec), b.(*NnfNodeECDataSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeECDataStatus)(nil), (*v1alpha4.NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(a.(*NnfNodeECDataStatus), b.(*v1alpha4.NnfNodeECDataStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeECDataStatus)(nil), (*NnfNodeECDataStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(a.(*v1alpha4.NnfNodeECDataStatus), b.(*NnfNodeECDataStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeList)(nil), (*v1alpha4.NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeList_To_v1alpha4_NnfNodeList(a.(*NnfNodeList), b.(*v1alpha4.NnfNodeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeList)(nil), (*NnfNodeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeList_To_v1alpha3_NnfNodeList(a.(*v1alpha4.NnfNodeList), b.(*NnfNodeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeSpec)(nil), (*v1alpha4.NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(a.(*NnfNodeSpec), b.(*v1alpha4.NnfNodeSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeSpec)(nil), (*NnfNodeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(a.(*v1alpha4.NnfNodeSpec), b.(*NnfNodeSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStatus)(nil), (*v1alpha4.NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(a.(*NnfNodeStatus), b.(*v1alpha4.NnfNodeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStatus)(nil), (*NnfNodeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(a.(*v1alpha4.NnfNodeStatus), b.(*NnfNodeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStorage)(nil), (*v1alpha4.NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(a.(*NnfNodeStorage), b.(*v1alpha4.NnfNodeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorage)(nil), (*NnfNodeStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(a.(*v1alpha4.NnfNodeStorage), b.(*NnfNodeStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageAllocationStatus)(nil), (*v1alpha4.NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(a.(*NnfNodeStorageAllocationStatus), b.(*v1alpha4.NnfNodeStorageAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageAllocationStatus)(nil), (*NnfNodeStorageAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(a.(*v1alpha4.NnfNodeStorageAllocationStatus), b.(*NnfNodeStorageAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageList)(nil), (*v1alpha4.NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(a.(*NnfNodeStorageList), b.(*v1alpha4.NnfNodeStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageList)(nil), (*NnfNodeStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(a.(*v1alpha4.NnfNodeStorageList), b.(*NnfNodeStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageSpec)(nil), (*v1alpha4.NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(a.(*NnfNodeStorageSpec), b.(*v1alpha4.NnfNodeStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageSpec)(nil), (*NnfNodeStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(a.(*v1alpha4.NnfNodeStorageSpec), b.(*NnfNodeStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfNodeStorageStatus)(nil), (*v1alpha4.NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(a.(*NnfNodeStorageStatus), b.(*v1alpha4.NnfNodeStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfNodeStorageStatus)(nil), (*NnfNodeStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(a.(*v1alpha4.NnfNodeStorageStatus), b.(*NnfNodeStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManager)(nil), (*v1alpha4.NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager(a.(*NnfPortManager), b.(*v1alpha4.NnfPortManager), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManager)(nil), (*NnfPortManager)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager(a.(*v1alpha4.NnfPortManager), b.(*NnfPortManager), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationSpec)(nil), (*v1alpha4.NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(a.(*NnfPortManagerAllocationSpec), b.(*v1alpha4.NnfPortManagerAllocationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerAllocationSpec)(nil), (*NnfPortManagerAllocationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(a.(*v1alpha4.NnfPortManagerAllocationSpec), b.(*NnfPortManagerAllocationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManagerAllocationStatus)(nil), (*v1alpha4.NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(a.(*NnfPortManagerAllocationStatus), b.(*v1alpha4.NnfPortManagerAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerAllocationStatus)(nil), (*NnfPortManagerAllocationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(a.(*v1alpha4.NnfPortManagerAllocationStatus), b.(*NnfPortManagerAllocationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManagerList)(nil), (*v1alpha4.NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(a.(*NnfPortManagerList), b.(*v1alpha4.NnfPortManagerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerList)(nil), (*NnfPortManagerList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(a.(*v1alpha4.NnfPortManagerList), b.(*NnfPortManagerList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManagerSpec)(nil), (*v1alpha4.NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(a.(*NnfPortManagerSpec), b.(*v1alpha4.NnfPortManagerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerSpec)(nil), (*NnfPortManagerSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(a.(*v1alpha4.NnfPortManagerSpec), b.(*NnfPortManagerSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfPortManagerStatus)(nil), (*v1alpha4.NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(a.(*NnfPortManagerStatus), b.(*v1alpha4.NnfPortManagerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfPortManagerStatus)(nil), (*NnfPortManagerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(a.(*v1alpha4.NnfPortManagerStatus), b.(*NnfPortManagerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfResourceStatus)(nil), (*v1alpha4.NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(a.(*NnfResourceStatus), b.(*v1alpha4.NnfResourceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfResourceStatus)(nil), (*NnfResourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(a.(*v1alpha4.NnfResourceStatus), b.(*NnfResourceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfServerStatus)(nil), (*v1alpha4.NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfServerStatus_To_v1alpha4_NnfServerStatus(a.(*NnfServerStatus), b.(*v1alpha4.NnfServerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfServerStatus)(nil), (*NnfServerStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfServerStatus_To_v1alpha3_NnfServerStatus(a.(*v1alpha4.NnfServerStatus), b.(*NnfServerStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorage)(nil), (*v1alpha4.NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(a.(*NnfStorage), b.(*v1alpha4.NnfStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorage)(nil), (*NnfStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(a.(*v1alpha4.NnfStorage), b.(*NnfStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationNodes)(nil), (*v1alpha4.NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(a.(*NnfStorageAllocationNodes), b.(*v1alpha4.NnfStorageAllocationNodes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationNodes)(nil), (*NnfStorageAllocationNodes)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(a.(*v1alpha4.NnfStorageAllocationNodes), b.(*NnfStorageAllocationNodes), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetSpec)(nil), (*v1alpha4.NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(a.(*NnfStorageAllocationSetSpec), b.(*v1alpha4.NnfStorageAllocationSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationSetSpec)(nil), (*NnfStorageAllocationSetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(a.(*v1alpha4.NnfStorageAllocationSetSpec), b.(*NnfStorageAllocationSetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageAllocationSetStatus)(nil), (*v1alpha4.NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(a.(*NnfStorageAllocationSetStatus), b.(*v1alpha4.NnfStorageAllocationSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageAllocationSetStatus)(nil), (*NnfStorageAllocationSetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(a.(*v1alpha4.NnfStorageAllocationSetStatus), b.(*NnfStorageAllocationSetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageList)(nil), (*v1alpha4.NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageList_To_v1alpha4_NnfStorageList(a.(*NnfStorageList), b.(*v1alpha4.NnfStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageList)(nil), (*NnfStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageList_To_v1alpha3_NnfStorageList(a.(*v1alpha4.NnfStorageList), b.(*NnfStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageLustreSpec)(nil), (*v1alpha4.NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(a.(*NnfStorageLustreSpec), b.(*v1alpha4.NnfStorageLustreSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageLustreSpec)(nil), (*NnfStorageLustreSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(a.(*v1alpha4.NnfStorageLustreSpec), b.(*NnfStorageLustreSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageLustreStatus)(nil), (*v1alpha4.NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(a.(*NnfStorageLustreStatus), b.(*v1alpha4.NnfStorageLustreStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfile)(nil), (*v1alpha4.NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(a.(*NnfStorageProfile), b.(*v1alpha4.NnfStorageProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfile)(nil), (*NnfStorageProfile)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(a.(*v1alpha4.NnfStorageProfile), b.(*NnfStorageProfile), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileData)(nil), (*v1alpha4.NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(a.(*NnfStorageProfileData), b.(*v1alpha4.NnfStorageProfileData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileData)(nil), (*NnfStorageProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(a.(*v1alpha4.NnfStorageProfileData), b.(*NnfStorageProfileData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileGFS2Data)(nil), (*v1alpha4.NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(a.(*NnfStorageProfileGFS2Data), b.(*v1alpha4.NnfStorageProfileGFS2Data), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileGFS2Data)(nil), (*NnfStorageProfileGFS2Data)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(a.(*v1alpha4.NnfStorageProfileGFS2Data), b.(*NnfStorageProfileGFS2Data), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMLvChangeCmdLines)(nil), (*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(a.(*NnfStorageProfileLVMLvChangeCmdLines), b.(*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines)(nil), (*NnfStorageProfileLVMLvChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(a.(*v1alpha4.NnfStorageProfileLVMLvChangeCmdLines), b.(*NnfStorageProfileLVMLvChangeCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLVMVgChangeCmdLines)(nil), (*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(a.(*NnfStorageProfileLVMVgChangeCmdLines), b.(*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines)(nil), (*NnfStorageProfileLVMVgChangeCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(a.(*v1alpha4.NnfStorageProfileLVMVgChangeCmdLines), b.(*NnfStorageProfileLVMVgChangeCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileList)(nil), (*v1alpha4.NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(a.(*NnfStorageProfileList), b.(*v1alpha4.NnfStorageProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileList)(nil), (*NnfStorageProfileList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(a.(*v1alpha4.NnfStorageProfileList), b.(*NnfStorageProfileList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreCmdLines)(nil), (*v1alpha4.NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(a.(*NnfStorageProfileLustreCmdLines), b.(*v1alpha4.NnfStorageProfileLustreCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreData)(nil), (*v1alpha4.NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(a.(*NnfStorageProfileLustreData), b.(*v1alpha4.NnfStorageProfileLustreData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLustreData)(nil), (*NnfStorageProfileLustreData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(a.(*v1alpha4.NnfStorageProfileLustreData), b.(*NnfStorageProfileLustreData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileLustreMiscOptions)(nil), (*v1alpha4.NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(a.(*NnfStorageProfileLustreMiscOptions), b.(*v1alpha4.NnfStorageProfileLustreMiscOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileLustreMiscOptions)(nil), (*NnfStorageProfileLustreMiscOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(a.(*v1alpha4.NnfStorageProfileLustreMiscOptions), b.(*NnfStorageProfileLustreMiscOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileRawData)(nil), (*v1alpha4.NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(a.(*NnfStorageProfileRawData), b.(*v1alpha4.NnfStorageProfileRawData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileRawData)(nil), (*NnfStorageProfileRawData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(a.(*v1alpha4.NnfStorageProfileRawData), b.(*NnfStorageProfileRawData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageProfileXFSData)(nil), (*v1alpha4.NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(a.(*NnfStorageProfileXFSData), b.(*v1alpha4.NnfStorageProfileXFSData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageProfileXFSData)(nil), (*NnfStorageProfileXFSData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(a.(*v1alpha4.NnfStorageProfileXFSData), b.(*NnfStorageProfileXFSData), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageSpec)(nil), (*v1alpha4.NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(a.(*NnfStorageSpec), b.(*v1alpha4.NnfStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageSpec)(nil), (*NnfStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(a.(*v1alpha4.NnfStorageSpec), b.(*NnfStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfStorageStatus)(nil), (*v1alpha4.NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(a.(*NnfStorageStatus), b.(*v1alpha4.NnfStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfStorageStatus)(nil), (*NnfStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(a.(*v1alpha4.NnfStorageStatus), b.(*NnfStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfSystemStorage)(nil), (*v1alpha4.NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(a.(*NnfSystemStorage), b.(*v1alpha4.NnfSystemStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorage)(nil), (*NnfSystemStorage)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(a.(*v1alpha4.NnfSystemStorage), b.(*NnfSystemStorage), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageList)(nil), (*v1alpha4.NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(a.(*NnfSystemStorageList), b.(*v1alpha4.NnfSystemStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorageList)(nil), (*NnfSystemStorageList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(a.(*v1alpha4.NnfSystemStorageList), b.(*NnfSystemStorageList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageSpec)(nil), (*v1alpha4.NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(a.(*NnfSystemStorageSpec), b.(*v1alpha4.NnfSystemStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*NnfSystemStorageStatus)(nil), (*v1alpha4.NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(a.(*NnfSystemStorageStatus), b.(*v1alpha4.NnfSystemStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha4.NnfSystemStorageStatus)(nil), (*NnfSystemStorageStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(a.(*v1alpha4.NnfSystemStorageStatus), b.(*NnfSystemStorageStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*NnfStorageProfileCmdLines)(nil), (*v1alpha4.NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(a.(*NnfStorageProfileCmdLines), b.(*v1alpha4.NnfStorageProfileCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.LustreStorageSpec)(nil), (*LustreStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(a.(*v1alpha4.LustreStorageSpec), b.(*LustreStorageSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfAccessSpec)(nil), (*NnfAccessSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(a.(*v1alpha4.NnfAccessSpec), b.(*NnfAccessSpec), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfDataMovementProfileData)(nil), (*NnfDataMovementProfileData)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(a.(*v1alpha4.NnfDataMovementProfileData), b.(*NnfDataMovementProfileData), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfStorageLustreStatus)(nil), (*NnfStorageLustreStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(a.(*v1alpha4.NnfStorageLustreStatus), b.(*NnfStorageLustreStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfStorageProfileCmdLines)(nil), (*NnfStorageProfileCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(a.(*v1alpha4.NnfStorageProfileCmdLines), b.(*NnfStorageProfileCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfStorageProfileLustreCmdLines)(nil), (*NnfStorageProfileLustreCmdLines)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(a.(*v1alpha4.NnfStorageProfileLustreCmdLines), b.(*NnfStorageProfileLustreCmdLines), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1alpha4.NnfSystemStorageSpec)(nil), (*NnfSystemStorageSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(a.(*v1alpha4.NnfSystemStorageSpec), b.(*NnfSystemStorageSpec), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha4.LustreStorageSpec, s conversion.Scope) error { + out.FileSystemName = in.FileSystemName + out.TargetType = in.TargetType + out.StartIndex = in.StartIndex + out.MgsAddress = in.MgsAddress + out.BackFs = in.BackFs + return nil +} + +// Convert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec is an autogenerated conversion function. +func Convert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in *LustreStorageSpec, out *v1alpha4.LustreStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(in, out, s) +} + +func autoConvert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(in *v1alpha4.LustreStorageSpec, out *LustreStorageSpec, s conversion.Scope) error { + out.FileSystemName = in.FileSystemName + out.TargetType = in.TargetType + out.StartIndex = in.StartIndex + out.MgsAddress = in.MgsAddress + out.BackFs = in.BackFs + // WARNING: in.LustreComponents requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(in *NnfAccess, out *v1alpha4.NnfAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess is an autogenerated conversion function. +func Convert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(in *NnfAccess, out *v1alpha4.NnfAccess, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(in, out, s) +} + +func autoConvert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(in *v1alpha4.NnfAccess, out *NnfAccess, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(in *v1alpha4.NnfAccess, out *NnfAccess, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(in, out, s) +} + +func autoConvert_v1alpha3_NnfAccessList_To_v1alpha4_NnfAccessList(in *NnfAccessList, out *v1alpha4.NnfAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfAccess, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfAccess_To_v1alpha4_NnfAccess(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfAccessList_To_v1alpha4_NnfAccessList is an autogenerated conversion function. +func Convert_v1alpha3_NnfAccessList_To_v1alpha4_NnfAccessList(in *NnfAccessList, out *v1alpha4.NnfAccessList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfAccessList_To_v1alpha4_NnfAccessList(in, out, s) +} + +func autoConvert_v1alpha4_NnfAccessList_To_v1alpha3_NnfAccessList(in *v1alpha4.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfAccess, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfAccess_To_v1alpha3_NnfAccess(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfAccessList_To_v1alpha3_NnfAccessList is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccessList_To_v1alpha3_NnfAccessList(in *v1alpha4.NnfAccessList, out *NnfAccessList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessList_To_v1alpha3_NnfAccessList(in, out, s) +} + +func autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha4.NnfAccessSpec, s conversion.Scope) error { + out.DesiredState = in.DesiredState + out.TeardownState = v1alpha2.WorkflowState(in.TeardownState) + out.Target = in.Target + out.UserID = in.UserID + out.GroupID = in.GroupID + out.ClientReference = in.ClientReference + out.MountPath = in.MountPath + out.MakeClientMounts = in.MakeClientMounts + out.MountPathPrefix = in.MountPathPrefix + out.StorageReference = in.StorageReference + return nil +} + +// Convert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in *NnfAccessSpec, out *v1alpha4.NnfAccessSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfAccessSpec_To_v1alpha4_NnfAccessSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfAccessSpec_To_v1alpha3_NnfAccessSpec(in *v1alpha4.NnfAccessSpec, out *NnfAccessSpec, s conversion.Scope) error { + out.DesiredState = in.DesiredState + out.TeardownState = v1alpha2.WorkflowState(in.TeardownState) + out.Target = in.Target + out.UserID = in.UserID + out.GroupID = in.GroupID + out.ClientReference = in.ClientReference + out.MountPath = in.MountPath + out.MakeClientMounts = in.MakeClientMounts + out.MountPathPrefix = in.MountPathPrefix + out.StorageReference = in.StorageReference + // WARNING: in.IgnoreOfflineComputes requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha4.NnfAccessStatus, s conversion.Scope) error { + out.State = in.State + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in *NnfAccessStatus, out *v1alpha4.NnfAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfAccessStatus_To_v1alpha4_NnfAccessStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *v1alpha4.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { + out.State = in.State + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in *v1alpha4.NnfAccessStatus, out *NnfAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfAccessStatus_To_v1alpha3_NnfAccessStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha4.NnfContainerProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile is an autogenerated conversion function. +func Convert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in *NnfContainerProfile, out *v1alpha4.NnfContainerProfile, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfContainerProfile_To_v1alpha4_NnfContainerProfile(in, out, s) +} + +func autoConvert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *v1alpha4.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in *v1alpha4.NnfContainerProfile, out *NnfContainerProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfile_To_v1alpha3_NnfContainerProfile(in, out, s) +} + +func autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha4.NnfContainerProfileData, s conversion.Scope) error { + out.Pinned = in.Pinned + out.Storages = *(*[]v1alpha4.NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) + out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) + out.PostRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PostRunTimeoutSeconds)) + out.RetryLimit = in.RetryLimit + out.UserID = (*uint32)(unsafe.Pointer(in.UserID)) + out.GroupID = (*uint32)(unsafe.Pointer(in.GroupID)) + out.NumPorts = in.NumPorts + out.Spec = (*v1.PodSpec)(unsafe.Pointer(in.Spec)) + out.MPISpec = (*v2beta1.MPIJobSpec)(unsafe.Pointer(in.MPISpec)) + return nil +} + +// Convert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData is an autogenerated conversion function. +func Convert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in *NnfContainerProfileData, out *v1alpha4.NnfContainerProfileData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfContainerProfileData_To_v1alpha4_NnfContainerProfileData(in, out, s) +} + +func autoConvert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *v1alpha4.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { + out.Pinned = in.Pinned + out.Storages = *(*[]NnfContainerProfileStorage)(unsafe.Pointer(&in.Storages)) + out.PreRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PreRunTimeoutSeconds)) + out.PostRunTimeoutSeconds = (*int64)(unsafe.Pointer(in.PostRunTimeoutSeconds)) + out.RetryLimit = in.RetryLimit + out.UserID = (*uint32)(unsafe.Pointer(in.UserID)) + out.GroupID = (*uint32)(unsafe.Pointer(in.GroupID)) + out.NumPorts = in.NumPorts + out.Spec = (*v1.PodSpec)(unsafe.Pointer(in.Spec)) + out.MPISpec = (*v2beta1.MPIJobSpec)(unsafe.Pointer(in.MPISpec)) + return nil +} + +// Convert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in *v1alpha4.NnfContainerProfileData, out *NnfContainerProfileData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileData_To_v1alpha3_NnfContainerProfileData(in, out, s) +} + +func autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha4.NnfContainerProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfContainerProfile)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList is an autogenerated conversion function. +func Convert_v1alpha3_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in *NnfContainerProfileList, out *v1alpha4.NnfContainerProfileList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfContainerProfileList_To_v1alpha4_NnfContainerProfileList(in, out, s) +} + +func autoConvert_v1alpha4_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *v1alpha4.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfContainerProfile)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in *v1alpha4.NnfContainerProfileList, out *NnfContainerProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileList_To_v1alpha3_NnfContainerProfileList(in, out, s) +} + +func autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha4.NnfContainerProfileStorage, s conversion.Scope) error { + out.Name = in.Name + out.Optional = in.Optional + out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) + return nil +} + +// Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage is an autogenerated conversion function. +func Convert_v1alpha3_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in *NnfContainerProfileStorage, out *v1alpha4.NnfContainerProfileStorage, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfContainerProfileStorage_To_v1alpha4_NnfContainerProfileStorage(in, out, s) +} + +func autoConvert_v1alpha4_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *v1alpha4.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { + out.Name = in.Name + out.Optional = in.Optional + out.PVCMode = v1.PersistentVolumeAccessMode(in.PVCMode) + return nil +} + +// Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in *v1alpha4.NnfContainerProfileStorage, out *NnfContainerProfileStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfContainerProfileStorage_To_v1alpha3_NnfContainerProfileStorage(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement(in *NnfDataMovement, out *v1alpha4.NnfDataMovement, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement(in *NnfDataMovement, out *v1alpha4.NnfDataMovement, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovement_To_v1alpha4_NnfDataMovement(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *v1alpha4.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement(in *v1alpha4.NnfDataMovement, out *NnfDataMovement, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovement_To_v1alpha3_NnfDataMovement(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha4.NnfDataMovementCommandStatus, s conversion.Scope) error { + out.Command = in.Command + out.ElapsedTime = in.ElapsedTime + out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) + out.LastMessage = in.LastMessage + out.LastMessageTime = in.LastMessageTime + out.Seconds = in.Seconds + out.Items = (*int32)(unsafe.Pointer(in.Items)) + out.Directories = (*int32)(unsafe.Pointer(in.Directories)) + out.Files = (*int32)(unsafe.Pointer(in.Files)) + out.Links = (*int32)(unsafe.Pointer(in.Links)) + out.Data = in.Data + out.Rate = in.Rate + return nil +} + +// Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in *NnfDataMovementCommandStatus, out *v1alpha4.NnfDataMovementCommandStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementCommandStatus_To_v1alpha4_NnfDataMovementCommandStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *v1alpha4.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { + out.Command = in.Command + out.ElapsedTime = in.ElapsedTime + out.ProgressPercentage = (*int32)(unsafe.Pointer(in.ProgressPercentage)) + out.LastMessage = in.LastMessage + out.LastMessageTime = in.LastMessageTime + out.Seconds = in.Seconds + out.Items = (*int32)(unsafe.Pointer(in.Items)) + out.Directories = (*int32)(unsafe.Pointer(in.Directories)) + out.Files = (*int32)(unsafe.Pointer(in.Files)) + out.Links = (*int32)(unsafe.Pointer(in.Links)) + out.Data = in.Data + out.Rate = in.Rate + return nil +} + +// Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in *v1alpha4.NnfDataMovementCommandStatus, out *NnfDataMovementCommandStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementCommandStatus_To_v1alpha3_NnfDataMovementCommandStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha4.NnfDataMovementConfig, s conversion.Scope) error { + out.Dryrun = in.Dryrun + out.MpirunOptions = in.MpirunOptions + out.DcpOptions = in.DcpOptions + out.LogStdout = in.LogStdout + out.StoreStdout = in.StoreStdout + out.Slots = (*int)(unsafe.Pointer(in.Slots)) + out.MaxSlots = (*int)(unsafe.Pointer(in.MaxSlots)) + return nil +} + +// Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in *NnfDataMovementConfig, out *v1alpha4.NnfDataMovementConfig, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementConfig_To_v1alpha4_NnfDataMovementConfig(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *v1alpha4.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { + out.Dryrun = in.Dryrun + out.MpirunOptions = in.MpirunOptions + out.DcpOptions = in.DcpOptions + out.LogStdout = in.LogStdout + out.StoreStdout = in.StoreStdout + out.Slots = (*int)(unsafe.Pointer(in.Slots)) + out.MaxSlots = (*int)(unsafe.Pointer(in.MaxSlots)) + return nil +} + +// Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in *v1alpha4.NnfDataMovementConfig, out *NnfDataMovementConfig, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementConfig_To_v1alpha3_NnfDataMovementConfig(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha4.NnfDataMovementList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfDataMovement)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfDataMovementList_To_v1alpha4_NnfDataMovementList is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in *NnfDataMovementList, out *v1alpha4.NnfDataMovementList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementList_To_v1alpha4_NnfDataMovementList(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *v1alpha4.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfDataMovement)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfDataMovementList_To_v1alpha3_NnfDataMovementList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in *v1alpha4.NnfDataMovementList, out *NnfDataMovementList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementList_To_v1alpha3_NnfDataMovementList(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha4.NnfDataMovementManager, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in *NnfDataMovementManager, out *v1alpha4.NnfDataMovementManager, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementManager_To_v1alpha4_NnfDataMovementManager(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *v1alpha4.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in *v1alpha4.NnfDataMovementManager, out *NnfDataMovementManager, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManager_To_v1alpha3_NnfDataMovementManager(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha4.NnfDataMovementManagerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfDataMovementManager)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in *NnfDataMovementManagerList, out *v1alpha4.NnfDataMovementManagerList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementManagerList_To_v1alpha4_NnfDataMovementManagerList(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *v1alpha4.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfDataMovementManager)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in *v1alpha4.NnfDataMovementManagerList, out *NnfDataMovementManagerList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerList_To_v1alpha3_NnfDataMovementManagerList(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha4.NnfDataMovementManagerSpec, s conversion.Scope) error { + out.Selector = in.Selector + out.Template = in.Template + out.UpdateStrategy = in.UpdateStrategy + out.HostPath = in.HostPath + out.MountPath = in.MountPath + return nil +} + +// Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in *NnfDataMovementManagerSpec, out *v1alpha4.NnfDataMovementManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementManagerSpec_To_v1alpha4_NnfDataMovementManagerSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *v1alpha4.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { + out.Selector = in.Selector + out.Template = in.Template + out.UpdateStrategy = in.UpdateStrategy + out.HostPath = in.HostPath + out.MountPath = in.MountPath + return nil +} + +// Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in *v1alpha4.NnfDataMovementManagerSpec, out *NnfDataMovementManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerSpec_To_v1alpha3_NnfDataMovementManagerSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha4.NnfDataMovementManagerStatus, s conversion.Scope) error { + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in *NnfDataMovementManagerStatus, out *v1alpha4.NnfDataMovementManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementManagerStatus_To_v1alpha4_NnfDataMovementManagerStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *v1alpha4.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in *v1alpha4.NnfDataMovementManagerStatus, out *NnfDataMovementManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementManagerStatus_To_v1alpha3_NnfDataMovementManagerStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha4.NnfDataMovementProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in *NnfDataMovementProfile, out *v1alpha4.NnfDataMovementProfile, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *v1alpha4.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in *v1alpha4.NnfDataMovementProfile, out *NnfDataMovementProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha4.NnfDataMovementProfileData, s conversion.Scope) error { + out.Default = in.Default + out.Pinned = in.Pinned + out.Slots = in.Slots + out.MaxSlots = in.MaxSlots + out.Command = in.Command + out.LogStdout = in.LogStdout + out.StoreStdout = in.StoreStdout + out.ProgressIntervalSeconds = in.ProgressIntervalSeconds + out.CreateDestDir = in.CreateDestDir + out.StatCommand = in.StatCommand + return nil +} + +// Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in *NnfDataMovementProfileData, out *v1alpha4.NnfDataMovementProfileData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementProfileData_To_v1alpha4_NnfDataMovementProfileData(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementProfileData_To_v1alpha3_NnfDataMovementProfileData(in *v1alpha4.NnfDataMovementProfileData, out *NnfDataMovementProfileData, s conversion.Scope) error { + out.Default = in.Default + out.Pinned = in.Pinned + out.Slots = in.Slots + out.MaxSlots = in.MaxSlots + out.Command = in.Command + out.LogStdout = in.LogStdout + out.StoreStdout = in.StoreStdout + out.ProgressIntervalSeconds = in.ProgressIntervalSeconds + out.CreateDestDir = in.CreateDestDir + out.StatCommand = in.StatCommand + // WARNING: in.MkdirCommand requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha4.NnfDataMovementProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfDataMovementProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfDataMovementProfile_To_v1alpha4_NnfDataMovementProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in *NnfDataMovementProfileList, out *v1alpha4.NnfDataMovementProfileList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementProfileList_To_v1alpha4_NnfDataMovementProfileList(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *v1alpha4.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfDataMovementProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfDataMovementProfile_To_v1alpha3_NnfDataMovementProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in *v1alpha4.NnfDataMovementProfileList, out *NnfDataMovementProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementProfileList_To_v1alpha3_NnfDataMovementProfileList(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha4.NnfDataMovementSpec, s conversion.Scope) error { + out.Source = (*v1alpha4.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) + out.Destination = (*v1alpha4.NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) + out.UserId = in.UserId + out.GroupId = in.GroupId + out.Cancel = in.Cancel + out.ProfileReference = in.ProfileReference + out.UserConfig = (*v1alpha4.NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) + return nil +} + +// Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in *NnfDataMovementSpec, out *v1alpha4.NnfDataMovementSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementSpec_To_v1alpha4_NnfDataMovementSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *v1alpha4.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { + out.Source = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Source)) + out.Destination = (*NnfDataMovementSpecSourceDestination)(unsafe.Pointer(in.Destination)) + out.UserId = in.UserId + out.GroupId = in.GroupId + out.Cancel = in.Cancel + out.ProfileReference = in.ProfileReference + out.UserConfig = (*NnfDataMovementConfig)(unsafe.Pointer(in.UserConfig)) + return nil +} + +// Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in *v1alpha4.NnfDataMovementSpec, out *NnfDataMovementSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementSpec_To_v1alpha3_NnfDataMovementSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha4.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + out.Path = in.Path + out.StorageReference = in.StorageReference + return nil +} + +// Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in *NnfDataMovementSpecSourceDestination, out *v1alpha4.NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementSpecSourceDestination_To_v1alpha4_NnfDataMovementSpecSourceDestination(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *v1alpha4.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + out.Path = in.Path + out.StorageReference = in.StorageReference + return nil +} + +// Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in *v1alpha4.NnfDataMovementSpecSourceDestination, out *NnfDataMovementSpecSourceDestination, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementSpecSourceDestination_To_v1alpha3_NnfDataMovementSpecSourceDestination(in, out, s) +} + +func autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha4.NnfDataMovementStatus, s conversion.Scope) error { + out.State = in.State + out.Status = in.Status + out.Message = in.Message + out.StartTime = (*metav1.MicroTime)(unsafe.Pointer(in.StartTime)) + out.EndTime = (*metav1.MicroTime)(unsafe.Pointer(in.EndTime)) + out.Restarts = in.Restarts + out.CommandStatus = (*v1alpha4.NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in *NnfDataMovementStatus, out *v1alpha4.NnfDataMovementStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDataMovementStatus_To_v1alpha4_NnfDataMovementStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *v1alpha4.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { + out.State = in.State + out.Status = in.Status + out.Message = in.Message + out.StartTime = (*metav1.MicroTime)(unsafe.Pointer(in.StartTime)) + out.EndTime = (*metav1.MicroTime)(unsafe.Pointer(in.EndTime)) + out.Restarts = in.Restarts + out.CommandStatus = (*NnfDataMovementCommandStatus)(unsafe.Pointer(in.CommandStatus)) + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in *v1alpha4.NnfDataMovementStatus, out *NnfDataMovementStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDataMovementStatus_To_v1alpha3_NnfDataMovementStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha4.NnfDriveStatus, s conversion.Scope) error { + out.Model = in.Model + out.SerialNumber = in.SerialNumber + out.FirmwareVersion = in.FirmwareVersion + out.Slot = in.Slot + out.Capacity = in.Capacity + out.WearLevel = in.WearLevel + if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfDriveStatus_To_v1alpha4_NnfDriveStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in *NnfDriveStatus, out *v1alpha4.NnfDriveStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfDriveStatus_To_v1alpha4_NnfDriveStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *v1alpha4.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { + out.Model = in.Model + out.SerialNumber = in.SerialNumber + out.FirmwareVersion = in.FirmwareVersion + out.Slot = in.Slot + out.Capacity = in.Capacity + out.WearLevel = in.WearLevel + if err := Convert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfDriveStatus_To_v1alpha3_NnfDriveStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in *v1alpha4.NnfDriveStatus, out *NnfDriveStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfDriveStatus_To_v1alpha3_NnfDriveStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha4.NnfLustreMGT, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT is an autogenerated conversion function. +func Convert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in *NnfLustreMGT, out *v1alpha4.NnfLustreMGT, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfLustreMGT_To_v1alpha4_NnfLustreMGT(in, out, s) +} + +func autoConvert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *v1alpha4.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in *v1alpha4.NnfLustreMGT, out *NnfLustreMGT, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGT_To_v1alpha3_NnfLustreMGT(in, out, s) +} + +func autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha4.NnfLustreMGTList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfLustreMGT)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList is an autogenerated conversion function. +func Convert_v1alpha3_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in *NnfLustreMGTList, out *v1alpha4.NnfLustreMGTList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfLustreMGTList_To_v1alpha4_NnfLustreMGTList(in, out, s) +} + +func autoConvert_v1alpha4_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *v1alpha4.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfLustreMGT)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in *v1alpha4.NnfLustreMGTList, out *NnfLustreMGTList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTList_To_v1alpha3_NnfLustreMGTList(in, out, s) +} + +func autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha4.NnfLustreMGTSpec, s conversion.Scope) error { + out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) + out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) + out.FsNameStart = in.FsNameStart + out.FsNameStartReference = in.FsNameStartReference + out.ClaimList = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.ClaimList)) + return nil +} + +// Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in *NnfLustreMGTSpec, out *v1alpha4.NnfLustreMGTSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfLustreMGTSpec_To_v1alpha4_NnfLustreMGTSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *v1alpha4.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { + out.Addresses = *(*[]string)(unsafe.Pointer(&in.Addresses)) + out.FsNameBlackList = *(*[]string)(unsafe.Pointer(&in.FsNameBlackList)) + out.FsNameStart = in.FsNameStart + out.FsNameStartReference = in.FsNameStartReference + out.ClaimList = *(*[]v1.ObjectReference)(unsafe.Pointer(&in.ClaimList)) + return nil +} + +// Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in *v1alpha4.NnfLustreMGTSpec, out *NnfLustreMGTSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTSpec_To_v1alpha3_NnfLustreMGTSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha4.NnfLustreMGTStatus, s conversion.Scope) error { + out.FsNameNext = in.FsNameNext + out.ClaimList = *(*[]v1alpha4.NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in *NnfLustreMGTStatus, out *v1alpha4.NnfLustreMGTStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfLustreMGTStatus_To_v1alpha4_NnfLustreMGTStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *v1alpha4.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { + out.FsNameNext = in.FsNameNext + out.ClaimList = *(*[]NnfLustreMGTStatusClaim)(unsafe.Pointer(&in.ClaimList)) + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in *v1alpha4.NnfLustreMGTStatus, out *NnfLustreMGTStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTStatus_To_v1alpha3_NnfLustreMGTStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha4.NnfLustreMGTStatusClaim, s conversion.Scope) error { + out.Reference = in.Reference + out.FsName = in.FsName + return nil +} + +// Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim is an autogenerated conversion function. +func Convert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in *NnfLustreMGTStatusClaim, out *v1alpha4.NnfLustreMGTStatusClaim, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfLustreMGTStatusClaim_To_v1alpha4_NnfLustreMGTStatusClaim(in, out, s) +} + +func autoConvert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *v1alpha4.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { + out.Reference = in.Reference + out.FsName = in.FsName + return nil +} + +// Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim is an autogenerated conversion function. +func Convert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in *v1alpha4.NnfLustreMGTStatusClaim, out *NnfLustreMGTStatusClaim, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfLustreMGTStatusClaim_To_v1alpha3_NnfLustreMGTStatusClaim(in, out, s) +} + +func autoConvert_v1alpha3_NnfNode_To_v1alpha4_NnfNode(in *NnfNode, out *v1alpha4.NnfNode, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfNode_To_v1alpha4_NnfNode is an autogenerated conversion function. +func Convert_v1alpha3_NnfNode_To_v1alpha4_NnfNode(in *NnfNode, out *v1alpha4.NnfNode, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNode_To_v1alpha4_NnfNode(in, out, s) +} + +func autoConvert_v1alpha4_NnfNode_To_v1alpha3_NnfNode(in *v1alpha4.NnfNode, out *NnfNode, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfNode_To_v1alpha3_NnfNode is an autogenerated conversion function. +func Convert_v1alpha4_NnfNode_To_v1alpha3_NnfNode(in *v1alpha4.NnfNode, out *NnfNode, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNode_To_v1alpha3_NnfNode(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha4.NnfNodeBlockStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in *NnfNodeBlockStorage, out *v1alpha4.NnfNodeBlockStorage, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorage_To_v1alpha4_NnfNodeBlockStorage(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *v1alpha4.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in *v1alpha4.NnfNodeBlockStorage, out *NnfNodeBlockStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorage_To_v1alpha3_NnfNodeBlockStorage(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha4.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) + out.StorageGroupId = in.StorageGroupId + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in *NnfNodeBlockStorageAccessStatus, out *v1alpha4.NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageAccessStatus_To_v1alpha4_NnfNodeBlockStorageAccessStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *v1alpha4.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + out.DevicePaths = *(*[]string)(unsafe.Pointer(&in.DevicePaths)) + out.StorageGroupId = in.StorageGroupId + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in *v1alpha4.NnfNodeBlockStorageAccessStatus, out *NnfNodeBlockStorageAccessStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAccessStatus_To_v1alpha3_NnfNodeBlockStorageAccessStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha4.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + out.Capacity = in.Capacity + out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in *NnfNodeBlockStorageAllocationSpec, out *v1alpha4.NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationSpec_To_v1alpha4_NnfNodeBlockStorageAllocationSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *v1alpha4.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + out.Capacity = in.Capacity + out.Access = *(*[]string)(unsafe.Pointer(&in.Access)) + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in *v1alpha4.NnfNodeBlockStorageAllocationSpec, out *NnfNodeBlockStorageAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAllocationSpec_To_v1alpha3_NnfNodeBlockStorageAllocationSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha4.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + out.Accesses = *(*map[string]v1alpha4.NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) + out.Devices = *(*[]v1alpha4.NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) + out.CapacityAllocated = in.CapacityAllocated + out.StoragePoolId = in.StoragePoolId + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in *NnfNodeBlockStorageAllocationStatus, out *v1alpha4.NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageAllocationStatus_To_v1alpha4_NnfNodeBlockStorageAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *v1alpha4.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + out.Accesses = *(*map[string]NnfNodeBlockStorageAccessStatus)(unsafe.Pointer(&in.Accesses)) + out.Devices = *(*[]NnfNodeBlockStorageDeviceStatus)(unsafe.Pointer(&in.Devices)) + out.CapacityAllocated = in.CapacityAllocated + out.StoragePoolId = in.StoragePoolId + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in *v1alpha4.NnfNodeBlockStorageAllocationStatus, out *NnfNodeBlockStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageAllocationStatus_To_v1alpha3_NnfNodeBlockStorageAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha4.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + out.NQN = in.NQN + out.NamespaceId = in.NamespaceId + out.CapacityAllocated = in.CapacityAllocated + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in *NnfNodeBlockStorageDeviceStatus, out *v1alpha4.NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageDeviceStatus_To_v1alpha4_NnfNodeBlockStorageDeviceStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *v1alpha4.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + out.NQN = in.NQN + out.NamespaceId = in.NamespaceId + out.CapacityAllocated = in.CapacityAllocated + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in *v1alpha4.NnfNodeBlockStorageDeviceStatus, out *NnfNodeBlockStorageDeviceStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageDeviceStatus_To_v1alpha3_NnfNodeBlockStorageDeviceStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha4.NnfNodeBlockStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in *NnfNodeBlockStorageList, out *v1alpha4.NnfNodeBlockStorageList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageList_To_v1alpha4_NnfNodeBlockStorageList(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *v1alpha4.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfNodeBlockStorage)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in *v1alpha4.NnfNodeBlockStorageList, out *NnfNodeBlockStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageList_To_v1alpha3_NnfNodeBlockStorageList(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha4.NnfNodeBlockStorageSpec, s conversion.Scope) error { + out.SharedAllocation = in.SharedAllocation + out.Allocations = *(*[]v1alpha4.NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in *NnfNodeBlockStorageSpec, out *v1alpha4.NnfNodeBlockStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageSpec_To_v1alpha4_NnfNodeBlockStorageSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *v1alpha4.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { + out.SharedAllocation = in.SharedAllocation + out.Allocations = *(*[]NnfNodeBlockStorageAllocationSpec)(unsafe.Pointer(&in.Allocations)) + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in *v1alpha4.NnfNodeBlockStorageSpec, out *NnfNodeBlockStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageSpec_To_v1alpha3_NnfNodeBlockStorageSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha4.NnfNodeBlockStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.ResourceError = in.ResourceError + out.PodStartTime = in.PodStartTime + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in *NnfNodeBlockStorageStatus, out *v1alpha4.NnfNodeBlockStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeBlockStorageStatus_To_v1alpha4_NnfNodeBlockStorageStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *v1alpha4.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]NnfNodeBlockStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.ResourceError = in.ResourceError + out.PodStartTime = in.PodStartTime + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in *v1alpha4.NnfNodeBlockStorageStatus, out *NnfNodeBlockStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeBlockStorageStatus_To_v1alpha3_NnfNodeBlockStorageStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData(in *NnfNodeECData, out *v1alpha4.NnfNodeECData, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData(in *NnfNodeECData, out *v1alpha4.NnfNodeECData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeECData_To_v1alpha4_NnfNodeECData(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *v1alpha4.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData(in *v1alpha4.NnfNodeECData, out *NnfNodeECData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECData_To_v1alpha3_NnfNodeECData(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha4.NnfNodeECDataList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfNodeECData)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in *NnfNodeECDataList, out *v1alpha4.NnfNodeECDataList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeECDataList_To_v1alpha4_NnfNodeECDataList(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *v1alpha4.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfNodeECData)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in *v1alpha4.NnfNodeECDataList, out *NnfNodeECDataList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataList_To_v1alpha3_NnfNodeECDataList(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha4.NnfNodeECDataSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in *NnfNodeECDataSpec, out *v1alpha4.NnfNodeECDataSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeECDataSpec_To_v1alpha4_NnfNodeECDataSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *v1alpha4.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in *v1alpha4.NnfNodeECDataSpec, out *NnfNodeECDataSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataSpec_To_v1alpha3_NnfNodeECDataSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha4.NnfNodeECDataStatus, s conversion.Scope) error { + out.Data = *(*map[string]v1alpha4.NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) + return nil +} + +// Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in *NnfNodeECDataStatus, out *v1alpha4.NnfNodeECDataStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeECDataStatus_To_v1alpha4_NnfNodeECDataStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *v1alpha4.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { + out.Data = *(*map[string]NnfNodeECPrivateData)(unsafe.Pointer(&in.Data)) + return nil +} + +// Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in *v1alpha4.NnfNodeECDataStatus, out *NnfNodeECDataStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeECDataStatus_To_v1alpha3_NnfNodeECDataStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeList_To_v1alpha4_NnfNodeList(in *NnfNodeList, out *v1alpha4.NnfNodeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfNode)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfNodeList_To_v1alpha4_NnfNodeList is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeList_To_v1alpha4_NnfNodeList(in *NnfNodeList, out *v1alpha4.NnfNodeList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeList_To_v1alpha4_NnfNodeList(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeList_To_v1alpha3_NnfNodeList(in *v1alpha4.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfNode)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfNodeList_To_v1alpha3_NnfNodeList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeList_To_v1alpha3_NnfNodeList(in *v1alpha4.NnfNodeList, out *NnfNodeList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeList_To_v1alpha3_NnfNodeList(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha4.NnfNodeSpec, s conversion.Scope) error { + out.Name = in.Name + out.Pod = in.Pod + out.State = v1alpha4.NnfResourceStateType(in.State) + return nil +} + +// Convert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in *NnfNodeSpec, out *v1alpha4.NnfNodeSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeSpec_To_v1alpha4_NnfNodeSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *v1alpha4.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { + out.Name = in.Name + out.Pod = in.Pod + out.State = NnfResourceStateType(in.State) + return nil +} + +// Convert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in *v1alpha4.NnfNodeSpec, out *NnfNodeSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeSpec_To_v1alpha3_NnfNodeSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha4.NnfNodeStatus, s conversion.Scope) error { + out.Status = v1alpha4.NnfResourceStatusType(in.Status) + out.Health = v1alpha4.NnfResourceHealthType(in.Health) + out.Fenced = in.Fenced + out.LNetNid = in.LNetNid + out.Capacity = in.Capacity + out.CapacityAllocated = in.CapacityAllocated + out.Servers = *(*[]v1alpha4.NnfServerStatus)(unsafe.Pointer(&in.Servers)) + out.Drives = *(*[]v1alpha4.NnfDriveStatus)(unsafe.Pointer(&in.Drives)) + return nil +} + +// Convert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in *NnfNodeStatus, out *v1alpha4.NnfNodeStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStatus_To_v1alpha4_NnfNodeStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *v1alpha4.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { + out.Status = NnfResourceStatusType(in.Status) + out.Health = NnfResourceHealthType(in.Health) + out.Fenced = in.Fenced + out.LNetNid = in.LNetNid + out.Capacity = in.Capacity + out.CapacityAllocated = in.CapacityAllocated + out.Servers = *(*[]NnfServerStatus)(unsafe.Pointer(&in.Servers)) + out.Drives = *(*[]NnfDriveStatus)(unsafe.Pointer(&in.Drives)) + return nil +} + +// Convert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in *v1alpha4.NnfNodeStatus, out *NnfNodeStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStatus_To_v1alpha3_NnfNodeStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha4.NnfNodeStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in *NnfNodeStorage, out *v1alpha4.NnfNodeStorage, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *v1alpha4.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in *v1alpha4.NnfNodeStorage, out *NnfNodeStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha4.NnfNodeStorageAllocationStatus, s conversion.Scope) error { + out.VolumeGroup = in.VolumeGroup + out.LogicalVolume = in.LogicalVolume + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in *NnfNodeStorageAllocationStatus, out *v1alpha4.NnfNodeStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStorageAllocationStatus_To_v1alpha4_NnfNodeStorageAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *v1alpha4.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { + out.VolumeGroup = in.VolumeGroup + out.LogicalVolume = in.LogicalVolume + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in *v1alpha4.NnfNodeStorageAllocationStatus, out *NnfNodeStorageAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageAllocationStatus_To_v1alpha3_NnfNodeStorageAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha4.NnfNodeStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfNodeStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfNodeStorage_To_v1alpha4_NnfNodeStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in *NnfNodeStorageList, out *v1alpha4.NnfNodeStorageList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStorageList_To_v1alpha4_NnfNodeStorageList(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *v1alpha4.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfNodeStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfNodeStorage_To_v1alpha3_NnfNodeStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in *v1alpha4.NnfNodeStorageList, out *NnfNodeStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageList_To_v1alpha3_NnfNodeStorageList(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha4.NnfNodeStorageSpec, s conversion.Scope) error { + out.Count = in.Count + out.SharedAllocation = in.SharedAllocation + out.Capacity = in.Capacity + out.UserID = in.UserID + out.GroupID = in.GroupID + out.FileSystemType = in.FileSystemType + if err := Convert_v1alpha3_LustreStorageSpec_To_v1alpha4_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { + return err + } + out.BlockReference = in.BlockReference + return nil +} + +// Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in *NnfNodeStorageSpec, out *v1alpha4.NnfNodeStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStorageSpec_To_v1alpha4_NnfNodeStorageSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *v1alpha4.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { + out.Count = in.Count + out.SharedAllocation = in.SharedAllocation + out.Capacity = in.Capacity + out.UserID = in.UserID + out.GroupID = in.GroupID + out.FileSystemType = in.FileSystemType + if err := Convert_v1alpha4_LustreStorageSpec_To_v1alpha3_LustreStorageSpec(&in.LustreStorage, &out.LustreStorage, s); err != nil { + return err + } + out.BlockReference = in.BlockReference + return nil +} + +// Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in *v1alpha4.NnfNodeStorageSpec, out *NnfNodeStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageSpec_To_v1alpha3_NnfNodeStorageSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha4.NnfNodeStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in *NnfNodeStorageStatus, out *v1alpha4.NnfNodeStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfNodeStorageStatus_To_v1alpha4_NnfNodeStorageStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *v1alpha4.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { + out.Allocations = *(*[]NnfNodeStorageAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in *v1alpha4.NnfNodeStorageStatus, out *NnfNodeStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfNodeStorageStatus_To_v1alpha3_NnfNodeStorageStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager(in *NnfPortManager, out *v1alpha4.NnfPortManager, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager(in *NnfPortManager, out *v1alpha4.NnfPortManager, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManager_To_v1alpha4_NnfPortManager(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager(in *v1alpha4.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager(in *v1alpha4.NnfPortManager, out *NnfPortManager, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManager_To_v1alpha3_NnfPortManager(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha4.NnfPortManagerAllocationSpec, s conversion.Scope) error { + out.Requester = in.Requester + out.Count = in.Count + return nil +} + +// Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in *NnfPortManagerAllocationSpec, out *v1alpha4.NnfPortManagerAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManagerAllocationSpec_To_v1alpha4_NnfPortManagerAllocationSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *v1alpha4.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { + out.Requester = in.Requester + out.Count = in.Count + return nil +} + +// Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in *v1alpha4.NnfPortManagerAllocationSpec, out *NnfPortManagerAllocationSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerAllocationSpec_To_v1alpha3_NnfPortManagerAllocationSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha4.NnfPortManagerAllocationStatus, s conversion.Scope) error { + out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) + out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) + out.Status = v1alpha4.NnfPortManagerAllocationStatusStatus(in.Status) + out.TimeUnallocated = (*metav1.Time)(unsafe.Pointer(in.TimeUnallocated)) + return nil +} + +// Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in *NnfPortManagerAllocationStatus, out *v1alpha4.NnfPortManagerAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManagerAllocationStatus_To_v1alpha4_NnfPortManagerAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *v1alpha4.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { + out.Requester = (*v1.ObjectReference)(unsafe.Pointer(in.Requester)) + out.Ports = *(*[]uint16)(unsafe.Pointer(&in.Ports)) + out.Status = NnfPortManagerAllocationStatusStatus(in.Status) + out.TimeUnallocated = (*metav1.Time)(unsafe.Pointer(in.TimeUnallocated)) + return nil +} + +// Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in *v1alpha4.NnfPortManagerAllocationStatus, out *NnfPortManagerAllocationStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerAllocationStatus_To_v1alpha3_NnfPortManagerAllocationStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha4.NnfPortManagerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha4.NnfPortManager)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_NnfPortManagerList_To_v1alpha4_NnfPortManagerList is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in *NnfPortManagerList, out *v1alpha4.NnfPortManagerList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManagerList_To_v1alpha4_NnfPortManagerList(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *v1alpha4.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]NnfPortManager)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha4_NnfPortManagerList_To_v1alpha3_NnfPortManagerList is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in *v1alpha4.NnfPortManagerList, out *NnfPortManagerList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerList_To_v1alpha3_NnfPortManagerList(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha4.NnfPortManagerSpec, s conversion.Scope) error { + out.SystemConfiguration = in.SystemConfiguration + out.Allocations = *(*[]v1alpha4.NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) + return nil +} + +// Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in *NnfPortManagerSpec, out *v1alpha4.NnfPortManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManagerSpec_To_v1alpha4_NnfPortManagerSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *v1alpha4.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { + out.SystemConfiguration = in.SystemConfiguration + out.Allocations = *(*[]NnfPortManagerAllocationSpec)(unsafe.Pointer(&in.Allocations)) + return nil +} + +// Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in *v1alpha4.NnfPortManagerSpec, out *NnfPortManagerSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerSpec_To_v1alpha3_NnfPortManagerSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha4.NnfPortManagerStatus, s conversion.Scope) error { + out.Allocations = *(*[]v1alpha4.NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.Status = v1alpha4.NnfPortManagerStatusStatus(in.Status) + return nil +} + +// Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in *NnfPortManagerStatus, out *v1alpha4.NnfPortManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfPortManagerStatus_To_v1alpha4_NnfPortManagerStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *v1alpha4.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { + out.Allocations = *(*[]NnfPortManagerAllocationStatus)(unsafe.Pointer(&in.Allocations)) + out.Status = NnfPortManagerStatusStatus(in.Status) + return nil +} + +// Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in *v1alpha4.NnfPortManagerStatus, out *NnfPortManagerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfPortManagerStatus_To_v1alpha3_NnfPortManagerStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha4.NnfResourceStatus, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Status = v1alpha4.NnfResourceStatusType(in.Status) + out.Health = v1alpha4.NnfResourceHealthType(in.Health) + return nil +} + +// Convert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in *NnfResourceStatus, out *v1alpha4.NnfResourceStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *v1alpha4.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { + out.ID = in.ID + out.Name = in.Name + out.Status = NnfResourceStatusType(in.Status) + out.Health = NnfResourceHealthType(in.Health) + return nil +} + +// Convert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in *v1alpha4.NnfResourceStatus, out *NnfResourceStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfServerStatus_To_v1alpha4_NnfServerStatus(in *NnfServerStatus, out *v1alpha4.NnfServerStatus, s conversion.Scope) error { + out.Hostname = in.Hostname + if err := Convert_v1alpha3_NnfResourceStatus_To_v1alpha4_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfServerStatus_To_v1alpha4_NnfServerStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfServerStatus_To_v1alpha4_NnfServerStatus(in *NnfServerStatus, out *v1alpha4.NnfServerStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfServerStatus_To_v1alpha4_NnfServerStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *v1alpha4.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { + out.Hostname = in.Hostname + if err := Convert_v1alpha4_NnfResourceStatus_To_v1alpha3_NnfResourceStatus(&in.NnfResourceStatus, &out.NnfResourceStatus, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfServerStatus_To_v1alpha3_NnfServerStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfServerStatus_To_v1alpha3_NnfServerStatus(in *v1alpha4.NnfServerStatus, out *NnfServerStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfServerStatus_To_v1alpha3_NnfServerStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(in *NnfStorage, out *v1alpha4.NnfStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(in *NnfStorage, out *v1alpha4.NnfStorage, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(in *v1alpha4.NnfStorage, out *NnfStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(in *v1alpha4.NnfStorage, out *NnfStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha4.NnfStorageAllocationNodes, s conversion.Scope) error { + out.Name = in.Name + out.Count = in.Count + return nil +} + +// Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in *NnfStorageAllocationNodes, out *v1alpha4.NnfStorageAllocationNodes, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageAllocationNodes_To_v1alpha4_NnfStorageAllocationNodes(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *v1alpha4.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { + out.Name = in.Name + out.Count = in.Count + return nil +} + +// Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in *v1alpha4.NnfStorageAllocationNodes, out *NnfStorageAllocationNodes, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationNodes_To_v1alpha3_NnfStorageAllocationNodes(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha4.NnfStorageAllocationSetSpec, s conversion.Scope) error { + out.Name = in.Name + out.Capacity = in.Capacity + if err := Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { + return err + } + out.SharedAllocation = in.SharedAllocation + out.Nodes = *(*[]v1alpha4.NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) + return nil +} + +// Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in *NnfStorageAllocationSetSpec, out *v1alpha4.NnfStorageAllocationSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageAllocationSetSpec_To_v1alpha4_NnfStorageAllocationSetSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *v1alpha4.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { + out.Name = in.Name + out.Capacity = in.Capacity + if err := Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(&in.NnfStorageLustreSpec, &out.NnfStorageLustreSpec, s); err != nil { + return err + } + out.SharedAllocation = in.SharedAllocation + out.Nodes = *(*[]NnfStorageAllocationNodes)(unsafe.Pointer(&in.Nodes)) + return nil +} + +// Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in *v1alpha4.NnfStorageAllocationSetSpec, out *NnfStorageAllocationSetSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationSetSpec_To_v1alpha3_NnfStorageAllocationSetSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha4.NnfStorageAllocationSetStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.AllocationCount = in.AllocationCount + return nil +} + +// Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in *NnfStorageAllocationSetStatus, out *v1alpha4.NnfStorageAllocationSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageAllocationSetStatus_To_v1alpha4_NnfStorageAllocationSetStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *v1alpha4.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.AllocationCount = in.AllocationCount + return nil +} + +// Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in *v1alpha4.NnfStorageAllocationSetStatus, out *NnfStorageAllocationSetStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageAllocationSetStatus_To_v1alpha3_NnfStorageAllocationSetStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageList_To_v1alpha4_NnfStorageList(in *NnfStorageList, out *v1alpha4.NnfStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfStorage_To_v1alpha4_NnfStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfStorageList_To_v1alpha4_NnfStorageList is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageList_To_v1alpha4_NnfStorageList(in *NnfStorageList, out *v1alpha4.NnfStorageList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageList_To_v1alpha4_NnfStorageList(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageList_To_v1alpha3_NnfStorageList(in *v1alpha4.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfStorage_To_v1alpha3_NnfStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfStorageList_To_v1alpha3_NnfStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageList_To_v1alpha3_NnfStorageList(in *v1alpha4.NnfStorageList, out *NnfStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageList_To_v1alpha3_NnfStorageList(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha4.NnfStorageLustreSpec, s conversion.Scope) error { + out.TargetType = in.TargetType + out.BackFs = in.BackFs + out.MgsAddress = in.MgsAddress + out.PersistentMgsReference = in.PersistentMgsReference + return nil +} + +// Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in *NnfStorageLustreSpec, out *v1alpha4.NnfStorageLustreSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageLustreSpec_To_v1alpha4_NnfStorageLustreSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *v1alpha4.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { + out.TargetType = in.TargetType + out.BackFs = in.BackFs + out.MgsAddress = in.MgsAddress + out.PersistentMgsReference = in.PersistentMgsReference + return nil +} + +// Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in *v1alpha4.NnfStorageLustreSpec, out *NnfStorageLustreSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageLustreSpec_To_v1alpha3_NnfStorageLustreSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha4.NnfStorageLustreStatus, s conversion.Scope) error { + out.MgsAddress = in.MgsAddress + out.FileSystemName = in.FileSystemName + out.LustreMgtReference = in.LustreMgtReference + return nil +} + +// Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in *NnfStorageLustreStatus, out *v1alpha4.NnfStorageLustreStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(in *v1alpha4.NnfStorageLustreStatus, out *NnfStorageLustreStatus, s conversion.Scope) error { + out.MgsAddress = in.MgsAddress + out.FileSystemName = in.FileSystemName + out.LustreMgtReference = in.LustreMgtReference + // WARNING: in.LustreComponents requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha4.NnfStorageProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in *NnfStorageProfile, out *v1alpha4.NnfStorageProfile, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *v1alpha4.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(&in.Data, &out.Data, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in *v1alpha4.NnfStorageProfile, out *NnfStorageProfile, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(in *NnfStorageProfileCmdLines, out *v1alpha4.NnfStorageProfileCmdLines, s conversion.Scope) error { + out.Mkfs = in.Mkfs + out.SharedVg = in.SharedVg + out.PvCreate = in.PvCreate + out.PvRemove = in.PvRemove + out.VgCreate = in.VgCreate + if err := Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { + return err + } + out.VgRemove = in.VgRemove + out.LvCreate = in.LvCreate + if err := Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { + return err + } + out.LvRemove = in.LvRemove + out.MountRabbit = in.MountRabbit + // WARNING: in.PostActivate requires manual conversion: does not exist in peer-type + out.MountCompute = in.MountCompute + // WARNING: in.PreDeactivate requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(in *v1alpha4.NnfStorageProfileCmdLines, out *NnfStorageProfileCmdLines, s conversion.Scope) error { + out.Mkfs = in.Mkfs + out.SharedVg = in.SharedVg + out.PvCreate = in.PvCreate + out.PvRemove = in.PvRemove + out.VgCreate = in.VgCreate + if err := Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(&in.VgChange, &out.VgChange, s); err != nil { + return err + } + out.VgRemove = in.VgRemove + out.LvCreate = in.LvCreate + if err := Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(&in.LvChange, &out.LvChange, s); err != nil { + return err + } + out.LvRemove = in.LvRemove + out.MountRabbit = in.MountRabbit + // WARNING: in.PostMount requires manual conversion: does not exist in peer-type + out.MountCompute = in.MountCompute + // WARNING: in.PreUnmount requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha4.NnfStorageProfileData, s conversion.Scope) error { + out.Default = in.Default + out.Pinned = in.Pinned + if err := Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in *NnfStorageProfileData, out *v1alpha4.NnfStorageProfileData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileData_To_v1alpha4_NnfStorageProfileData(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *v1alpha4.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { + out.Default = in.Default + out.Pinned = in.Pinned + if err := Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(&in.LustreStorage, &out.LustreStorage, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(&in.GFS2Storage, &out.GFS2Storage, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(&in.XFSStorage, &out.XFSStorage, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(&in.RawStorage, &out.RawStorage, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in *v1alpha4.NnfStorageProfileData, out *NnfStorageProfileData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileData_To_v1alpha3_NnfStorageProfileData(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha4.NnfStorageProfileGFS2Data, s conversion.Scope) error { + if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in *NnfStorageProfileGFS2Data, out *v1alpha4.NnfStorageProfileGFS2Data, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileGFS2Data_To_v1alpha4_NnfStorageProfileGFS2Data(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *v1alpha4.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in *v1alpha4.NnfStorageProfileGFS2Data, out *NnfStorageProfileGFS2Data, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileGFS2Data_To_v1alpha3_NnfStorageProfileGFS2Data(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + out.Activate = in.Activate + out.Deactivate = in.Deactivate + return nil +} + +// Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in *NnfStorageProfileLVMLvChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + out.Activate = in.Activate + out.Deactivate = in.Deactivate + return nil +} + +// Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMLvChangeCmdLines, out *NnfStorageProfileLVMLvChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLVMLvChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMLvChangeCmdLines(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + out.LockStart = in.LockStart + out.LockStop = in.LockStop + return nil +} + +// Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in *NnfStorageProfileLVMVgChangeCmdLines, out *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + out.LockStart = in.LockStart + out.LockStop = in.LockStop + return nil +} + +// Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in *v1alpha4.NnfStorageProfileLVMVgChangeCmdLines, out *NnfStorageProfileLVMVgChangeCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLVMVgChangeCmdLines_To_v1alpha3_NnfStorageProfileLVMVgChangeCmdLines(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha4.NnfStorageProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfStorageProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfStorageProfile_To_v1alpha4_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in *NnfStorageProfileList, out *v1alpha4.NnfStorageProfileList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileList_To_v1alpha4_NnfStorageProfileList(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *v1alpha4.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfStorageProfile, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfStorageProfile_To_v1alpha3_NnfStorageProfile(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in *v1alpha4.NnfStorageProfileList, out *NnfStorageProfileList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileList_To_v1alpha3_NnfStorageProfileList(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha4.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { + out.ZpoolCreate = in.ZpoolCreate + out.Mkfs = in.Mkfs + out.MountTarget = in.MountTarget + out.PostActivate = *(*[]string)(unsafe.Pointer(&in.PostActivate)) + out.PreDeactivate = *(*[]string)(unsafe.Pointer(&in.PreDeactivate)) + return nil +} + +// Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in *NnfStorageProfileLustreCmdLines, out *v1alpha4.NnfStorageProfileLustreCmdLines, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(in *v1alpha4.NnfStorageProfileLustreCmdLines, out *NnfStorageProfileLustreCmdLines, s conversion.Scope) error { + out.ZpoolCreate = in.ZpoolCreate + out.Mkfs = in.Mkfs + out.MountTarget = in.MountTarget + out.PostActivate = *(*[]string)(unsafe.Pointer(&in.PostActivate)) + // WARNING: in.PostMount requires manual conversion: does not exist in peer-type + // WARNING: in.PreUnmount requires manual conversion: does not exist in peer-type + out.PreDeactivate = *(*[]string)(unsafe.Pointer(&in.PreDeactivate)) + return nil +} + +func autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha4.NnfStorageProfileLustreData, s conversion.Scope) error { + out.CombinedMGTMDT = in.CombinedMGTMDT + out.ExternalMGS = in.ExternalMGS + out.CapacityMGT = in.CapacityMGT + out.CapacityMDT = in.CapacityMDT + out.ExclusiveMDT = in.ExclusiveMDT + out.CapacityScalingFactor = in.CapacityScalingFactor + out.StandaloneMGTPoolName = in.StandaloneMGTPoolName + if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreCmdLines_To_v1alpha4_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { + return err + } + out.MountRabbit = in.MountRabbit + out.MountCompute = in.MountCompute + return nil +} + +// Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in *NnfStorageProfileLustreData, out *v1alpha4.NnfStorageProfileLustreData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileLustreData_To_v1alpha4_NnfStorageProfileLustreData(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *v1alpha4.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { + out.CombinedMGTMDT = in.CombinedMGTMDT + out.ExternalMGS = in.ExternalMGS + out.CapacityMGT = in.CapacityMGT + out.CapacityMDT = in.CapacityMDT + out.ExclusiveMDT = in.ExclusiveMDT + out.CapacityScalingFactor = in.CapacityScalingFactor + out.StandaloneMGTPoolName = in.StandaloneMGTPoolName + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtCmdLines, &out.MgtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MdtCmdLines, &out.MdtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.MgtMdtCmdLines, &out.MgtMdtCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreCmdLines_To_v1alpha3_NnfStorageProfileLustreCmdLines(&in.OstCmdLines, &out.OstCmdLines, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtOptions, &out.MgtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MdtOptions, &out.MdtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.MgtMdtOptions, &out.MgtMdtOptions, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(&in.OstOptions, &out.OstOptions, s); err != nil { + return err + } + out.MountRabbit = in.MountRabbit + out.MountCompute = in.MountCompute + return nil +} + +// Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in *v1alpha4.NnfStorageProfileLustreData, out *NnfStorageProfileLustreData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreData_To_v1alpha3_NnfStorageProfileLustreData(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha4.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + out.ColocateComputes = in.ColocateComputes + out.Count = in.Count + out.Scale = in.Scale + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + return nil +} + +// Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in *NnfStorageProfileLustreMiscOptions, out *v1alpha4.NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileLustreMiscOptions_To_v1alpha4_NnfStorageProfileLustreMiscOptions(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *v1alpha4.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + out.ColocateComputes = in.ColocateComputes + out.Count = in.Count + out.Scale = in.Scale + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + return nil +} + +// Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in *v1alpha4.NnfStorageProfileLustreMiscOptions, out *NnfStorageProfileLustreMiscOptions, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileLustreMiscOptions_To_v1alpha3_NnfStorageProfileLustreMiscOptions(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha4.NnfStorageProfileRawData, s conversion.Scope) error { + if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in *NnfStorageProfileRawData, out *v1alpha4.NnfStorageProfileRawData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileRawData_To_v1alpha4_NnfStorageProfileRawData(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *v1alpha4.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in *v1alpha4.NnfStorageProfileRawData, out *NnfStorageProfileRawData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileRawData_To_v1alpha3_NnfStorageProfileRawData(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha4.NnfStorageProfileXFSData, s conversion.Scope) error { + if err := Convert_v1alpha3_NnfStorageProfileCmdLines_To_v1alpha4_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in *NnfStorageProfileXFSData, out *v1alpha4.NnfStorageProfileXFSData, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageProfileXFSData_To_v1alpha4_NnfStorageProfileXFSData(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *v1alpha4.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageProfileCmdLines_To_v1alpha3_NnfStorageProfileCmdLines(&in.CmdLines, &out.CmdLines, s); err != nil { + return err + } + out.StorageLabels = *(*[]string)(unsafe.Pointer(&in.StorageLabels)) + out.CapacityScalingFactor = in.CapacityScalingFactor + return nil +} + +// Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in *v1alpha4.NnfStorageProfileXFSData, out *NnfStorageProfileXFSData, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageProfileXFSData_To_v1alpha3_NnfStorageProfileXFSData(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha4.NnfStorageSpec, s conversion.Scope) error { + out.FileSystemType = in.FileSystemType + out.UserID = in.UserID + out.GroupID = in.GroupID + out.AllocationSets = *(*[]v1alpha4.NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) + return nil +} + +// Convert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in *NnfStorageSpec, out *v1alpha4.NnfStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageSpec_To_v1alpha4_NnfStorageSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *v1alpha4.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { + out.FileSystemType = in.FileSystemType + out.UserID = in.UserID + out.GroupID = in.GroupID + out.AllocationSets = *(*[]NnfStorageAllocationSetSpec)(unsafe.Pointer(&in.AllocationSets)) + return nil +} + +// Convert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in *v1alpha4.NnfStorageSpec, out *NnfStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageSpec_To_v1alpha3_NnfStorageSpec(in, out, s) +} + +func autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha4.NnfStorageStatus, s conversion.Scope) error { + if err := Convert_v1alpha3_NnfStorageLustreStatus_To_v1alpha4_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { + return err + } + out.AllocationSets = *(*[]v1alpha4.NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) + out.ResourceError = in.ResourceError + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in *NnfStorageStatus, out *v1alpha4.NnfStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfStorageStatus_To_v1alpha4_NnfStorageStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *v1alpha4.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { + if err := Convert_v1alpha4_NnfStorageLustreStatus_To_v1alpha3_NnfStorageLustreStatus(&in.NnfStorageLustreStatus, &out.NnfStorageLustreStatus, s); err != nil { + return err + } + out.AllocationSets = *(*[]NnfStorageAllocationSetStatus)(unsafe.Pointer(&in.AllocationSets)) + out.ResourceError = in.ResourceError + out.Ready = in.Ready + return nil +} + +// Convert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in *v1alpha4.NnfStorageStatus, out *NnfStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfStorageStatus_To_v1alpha3_NnfStorageStatus(in, out, s) +} + +func autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha4.NnfSystemStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage is an autogenerated conversion function. +func Convert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in *NnfSystemStorage, out *v1alpha4.NnfSystemStorage, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(in, out, s) +} + +func autoConvert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *v1alpha4.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha4_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in *v1alpha4.NnfSystemStorage, out *NnfSystemStorage, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(in, out, s) +} + +func autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha4.NnfSystemStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha4.NnfSystemStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_NnfSystemStorage_To_v1alpha4_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList is an autogenerated conversion function. +func Convert_v1alpha3_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in *NnfSystemStorageList, out *v1alpha4.NnfSystemStorageList, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfSystemStorageList_To_v1alpha4_NnfSystemStorageList(in, out, s) +} + +func autoConvert_v1alpha4_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *v1alpha4.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]NnfSystemStorage, len(*in)) + for i := range *in { + if err := Convert_v1alpha4_NnfSystemStorage_To_v1alpha3_NnfSystemStorage(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha4_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in *v1alpha4.NnfSystemStorageList, out *NnfSystemStorageList, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageList_To_v1alpha3_NnfSystemStorageList(in, out, s) +} + +func autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha4.NnfSystemStorageSpec, s conversion.Scope) error { + out.SystemConfiguration = in.SystemConfiguration + out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) + out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) + out.ExcludeDisabledRabbits = in.ExcludeDisabledRabbits + out.ExcludeComputes = *(*[]string)(unsafe.Pointer(&in.ExcludeComputes)) + out.IncludeComputes = *(*[]string)(unsafe.Pointer(&in.IncludeComputes)) + out.ComputesTarget = v1alpha4.NnfSystemStorageComputesTarget(in.ComputesTarget) + out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) + out.Capacity = in.Capacity + out.Type = in.Type + out.StorageProfile = in.StorageProfile + out.MakeClientMounts = in.MakeClientMounts + out.ClientMountPath = in.ClientMountPath + return nil +} + +// Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec is an autogenerated conversion function. +func Convert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in *NnfSystemStorageSpec, out *v1alpha4.NnfSystemStorageSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfSystemStorageSpec_To_v1alpha4_NnfSystemStorageSpec(in, out, s) +} + +func autoConvert_v1alpha4_NnfSystemStorageSpec_To_v1alpha3_NnfSystemStorageSpec(in *v1alpha4.NnfSystemStorageSpec, out *NnfSystemStorageSpec, s conversion.Scope) error { + out.SystemConfiguration = in.SystemConfiguration + out.ExcludeRabbits = *(*[]string)(unsafe.Pointer(&in.ExcludeRabbits)) + out.IncludeRabbits = *(*[]string)(unsafe.Pointer(&in.IncludeRabbits)) + out.ExcludeDisabledRabbits = in.ExcludeDisabledRabbits + out.ExcludeComputes = *(*[]string)(unsafe.Pointer(&in.ExcludeComputes)) + out.IncludeComputes = *(*[]string)(unsafe.Pointer(&in.IncludeComputes)) + out.ComputesTarget = NnfSystemStorageComputesTarget(in.ComputesTarget) + out.ComputesPattern = *(*[]int)(unsafe.Pointer(&in.ComputesPattern)) + out.Capacity = in.Capacity + out.Type = in.Type + // WARNING: in.Shared requires manual conversion: does not exist in peer-type + out.StorageProfile = in.StorageProfile + // WARNING: in.IgnoreOfflineComputes requires manual conversion: does not exist in peer-type + out.MakeClientMounts = in.MakeClientMounts + out.ClientMountPath = in.ClientMountPath + return nil +} + +func autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha4.NnfSystemStorageStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus is an autogenerated conversion function. +func Convert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in *NnfSystemStorageStatus, out *v1alpha4.NnfSystemStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_NnfSystemStorageStatus_To_v1alpha4_NnfSystemStorageStatus(in, out, s) +} + +func autoConvert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *v1alpha4.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { + out.Ready = in.Ready + out.ResourceError = in.ResourceError + return nil +} + +// Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus is an autogenerated conversion function. +func Convert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in *v1alpha4.NnfSystemStorageStatus, out *NnfSystemStorageStatus, s conversion.Scope) error { + return autoConvert_v1alpha4_NnfSystemStorageStatus_To_v1alpha3_NnfSystemStorageStatus(in, out, s) +} diff --git a/api/v1alpha3/zz_generated.deepcopy.go b/api/v1alpha3/zz_generated.deepcopy.go index 3011f2642..e93ef123a 100644 --- a/api/v1alpha3/zz_generated.deepcopy.go +++ b/api/v1alpha3/zz_generated.deepcopy.go @@ -26,7 +26,7 @@ package v1alpha3 import ( "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" + runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/api/v1alpha4/conversion.go b/api/v1alpha4/conversion.go new file mode 100644 index 000000000..342f91c1a --- /dev/null +++ b/api/v1alpha4/conversion.go @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Hewlett Packard Enterprise Development LP + * Other additional copyright holders may be indicated within. + * + * The entirety of this work is licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package v1alpha4 + +func (*NnfAccess) Hub() {} +func (*NnfContainerProfile) Hub() {} +func (*NnfDataMovement) Hub() {} +func (*NnfDataMovementManager) Hub() {} +func (*NnfDataMovementProfile) Hub() {} +func (*NnfLustreMGT) Hub() {} +func (*NnfNode) Hub() {} +func (*NnfNodeBlockStorage) Hub() {} +func (*NnfNodeECData) Hub() {} +func (*NnfNodeStorage) Hub() {} +func (*NnfPortManager) Hub() {} +func (*NnfStorage) Hub() {} +func (*NnfStorageProfile) Hub() {} +func (*NnfSystemStorage) Hub() {} + +// The conversion-verifier tool wants these...though they're never used. +func (*NnfAccessList) Hub() {} +func (*NnfContainerProfileList) Hub() {} +func (*NnfDataMovementList) Hub() {} +func (*NnfDataMovementManagerList) Hub() {} +func (*NnfDataMovementProfileList) Hub() {} +func (*NnfLustreMGTList) Hub() {} +func (*NnfNodeList) Hub() {} +func (*NnfNodeBlockStorageList) Hub() {} +func (*NnfNodeECDataList) Hub() {} +func (*NnfNodeStorageList) Hub() {} +func (*NnfPortManagerList) Hub() {} +func (*NnfStorageList) Hub() {} +func (*NnfStorageProfileList) Hub() {} +func (*NnfSystemStorageList) Hub() {} diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha4/groupversion_info.go similarity index 81% rename from api/v1alpha1/groupversion_info.go rename to api/v1alpha4/groupversion_info.go index 6ab8487d2..398f8558e 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha4/groupversion_info.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2024 Hewlett Packard Enterprise Development LP + * Copyright 2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,10 +17,10 @@ * limitations under the License. */ -// Package v1alpha1 contains API Schema definitions for the nnf v1alpha1 API group +// Package v1alpha4 contains API Schema definitions for the nnf v1alpha4 API group // +kubebuilder:object:generate=true // +groupName=nnf.cray.hpe.com -package v1alpha1 +package v1alpha4 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -29,14 +29,11 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "nnf.cray.hpe.com", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "nnf.cray.hpe.com", Version: "v1alpha4"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme - - // Used by zz_generated.conversion.go. - localSchemeBuilder = SchemeBuilder.SchemeBuilder ) diff --git a/api/v1alpha1/nnf_resource_condition_types.go b/api/v1alpha4/nnf_resource_condition_types.go similarity index 99% rename from api/v1alpha1/nnf_resource_condition_types.go rename to api/v1alpha4/nnf_resource_condition_types.go index ad0da3903..8f7adba21 100644 --- a/api/v1alpha1/nnf_resource_condition_types.go +++ b/api/v1alpha4/nnf_resource_condition_types.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/api/v1alpha1/nnf_resource_health_type.go b/api/v1alpha4/nnf_resource_health_type.go similarity index 95% rename from api/v1alpha1/nnf_resource_health_type.go rename to api/v1alpha4/nnf_resource_health_type.go index 78e90c3a1..4e5907760 100644 --- a/api/v1alpha1/nnf_resource_health_type.go +++ b/api/v1alpha4/nnf_resource_health_type.go @@ -1,5 +1,5 @@ /* - * Copyright 2021, 2022 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( sf "github.com/NearNodeFlash/nnf-ec/pkg/rfsf/pkg/models" diff --git a/api/v1alpha1/nnf_resource_state_type.go b/api/v1alpha4/nnf_resource_state_type.go similarity index 95% rename from api/v1alpha1/nnf_resource_state_type.go rename to api/v1alpha4/nnf_resource_state_type.go index 9a2fe504e..e701050f0 100644 --- a/api/v1alpha1/nnf_resource_state_type.go +++ b/api/v1alpha4/nnf_resource_state_type.go @@ -1,5 +1,5 @@ /* - * Copyright 2021, 2022 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 // NnfResourceStateType defines valid states that a user can configure an NNF resource type NnfResourceStateType string diff --git a/api/v1alpha1/nnf_resource_status_type.go b/api/v1alpha4/nnf_resource_status_type.go similarity index 98% rename from api/v1alpha1/nnf_resource_status_type.go rename to api/v1alpha4/nnf_resource_status_type.go index 050f2ca19..c7a4df91f 100644 --- a/api/v1alpha1/nnf_resource_status_type.go +++ b/api/v1alpha4/nnf_resource_status_type.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" diff --git a/api/v1alpha1/nnf_resource_type.go b/api/v1alpha4/nnf_resource_type.go similarity index 93% rename from api/v1alpha1/nnf_resource_type.go rename to api/v1alpha4/nnf_resource_type.go index 5a99fc17e..b7add0b67 100644 --- a/api/v1alpha1/nnf_resource_type.go +++ b/api/v1alpha4/nnf_resource_type.go @@ -1,5 +1,5 @@ /* - * Copyright 2021, 2022 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 // NnfResourceStatus provides common fields that are included in all NNF Resources type NnfResourceStatus struct { diff --git a/api/v1alpha1/nnfaccess_types.go b/api/v1alpha4/nnfaccess_types.go similarity index 95% rename from api/v1alpha1/nnfaccess_types.go rename to api/v1alpha4/nnfaccess_types.go index e72f35076..55956f931 100644 --- a/api/v1alpha1/nnfaccess_types.go +++ b/api/v1alpha4/nnfaccess_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -71,6 +71,9 @@ type NnfAccessSpec struct { // StorageReference is the NnfStorage reference StorageReference corev1.ObjectReference `json:"storageReference"` + + // +kubebuilder:default=false + IgnoreOfflineComputes bool `json:"ignoreOfflineComputes"` } // NnfAccessStatus defines the observed state of NnfAccess @@ -86,8 +89,8 @@ type NnfAccessStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="DESIREDSTATE",type="string",JSONPath=".spec.desiredState",description="The desired state" //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state",description="The current state" //+kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="Whether the state has been achieved" diff --git a/api/v1alpha3/nnfaccess_webhook.go b/api/v1alpha4/nnfaccess_webhook.go similarity index 98% rename from api/v1alpha3/nnfaccess_webhook.go rename to api/v1alpha4/nnfaccess_webhook.go index 92a32437f..a1eb93fd8 100644 --- a/api/v1alpha3/nnfaccess_webhook.go +++ b/api/v1alpha4/nnfaccess_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfaccess_webhook_test.go b/api/v1alpha4/nnfaccess_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfaccess_webhook_test.go rename to api/v1alpha4/nnfaccess_webhook_test.go index eff625b49..e0e37fca2 100644 --- a/api/v1alpha3/nnfaccess_webhook_test.go +++ b/api/v1alpha4/nnfaccess_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfcontainerprofile_types.go b/api/v1alpha4/nnfcontainerprofile_types.go similarity index 97% rename from api/v1alpha1/nnfcontainerprofile_types.go rename to api/v1alpha4/nnfcontainerprofile_types.go index f865308b0..ed22ffaf9 100644 --- a/api/v1alpha1/nnfcontainerprofile_types.go +++ b/api/v1alpha4/nnfcontainerprofile_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( mpiv2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" @@ -116,7 +116,7 @@ type NnfContainerProfileStorage struct { } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion +// +kubebuilder:storageversion // NnfContainerProfile is the Schema for the nnfcontainerprofiles API type NnfContainerProfile struct { @@ -127,6 +127,7 @@ type NnfContainerProfile struct { } // +kubebuilder:object:root=true +// +kubebuilder:storageversion // NnfContainerProfileList contains a list of NnfContainerProfile type NnfContainerProfileList struct { diff --git a/api/v1alpha3/nnfcontainerprofile_webhook.go b/api/v1alpha4/nnfcontainerprofile_webhook.go similarity index 97% rename from api/v1alpha3/nnfcontainerprofile_webhook.go rename to api/v1alpha4/nnfcontainerprofile_webhook.go index 17580ee60..bd3619294 100644 --- a/api/v1alpha3/nnfcontainerprofile_webhook.go +++ b/api/v1alpha4/nnfcontainerprofile_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "fmt" @@ -45,7 +45,7 @@ func (r *NnfContainerProfile) SetupWebhookWithManager(mgr ctrl.Manager) error { // NOTE: The 'path' attribute must follow a specific pattern and should not be modified directly here. // Modifying the path for an invalid path can cause API server errors; failing to locate the webhook. -//+kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha3-nnfcontainerprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfcontainerprofiles,verbs=create;update,versions=v1alpha3,name=vnnfcontainerprofile.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha4-nnfcontainerprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfcontainerprofiles,verbs=create;update,versions=v1alpha4,name=vnnfcontainerprofile.kb.io,admissionReviewVersions=v1 var _ webhook.Validator = &NnfContainerProfile{} diff --git a/api/v1alpha3/nnfcontainerprofile_webhook_test.go b/api/v1alpha4/nnfcontainerprofile_webhook_test.go similarity index 99% rename from api/v1alpha3/nnfcontainerprofile_webhook_test.go rename to api/v1alpha4/nnfcontainerprofile_webhook_test.go index 400a8f9af..a2ceeb2e2 100644 --- a/api/v1alpha3/nnfcontainerprofile_webhook_test.go +++ b/api/v1alpha4/nnfcontainerprofile_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "context" diff --git a/api/v1alpha1/nnfdatamovement_types.go b/api/v1alpha4/nnfdatamovement_types.go similarity index 99% rename from api/v1alpha1/nnfdatamovement_types.go rename to api/v1alpha4/nnfdatamovement_types.go index 6488e5218..d1cb6ec7e 100644 --- a/api/v1alpha1/nnfdatamovement_types.go +++ b/api/v1alpha4/nnfdatamovement_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -218,8 +218,8 @@ const ( ) //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state",description="Current state" //+kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.status",description="Status of current state" //+kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" diff --git a/api/v1alpha3/nnfdatamovement_webhook.go b/api/v1alpha4/nnfdatamovement_webhook.go similarity index 98% rename from api/v1alpha3/nnfdatamovement_webhook.go rename to api/v1alpha4/nnfdatamovement_webhook.go index d3e5d772a..657562257 100644 --- a/api/v1alpha3/nnfdatamovement_webhook.go +++ b/api/v1alpha4/nnfdatamovement_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfdatamovement_webhook_test.go b/api/v1alpha4/nnfdatamovement_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfdatamovement_webhook_test.go rename to api/v1alpha4/nnfdatamovement_webhook_test.go index 6c2e85db2..5c7f9c394 100644 --- a/api/v1alpha3/nnfdatamovement_webhook_test.go +++ b/api/v1alpha4/nnfdatamovement_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfdatamovementmanager_types.go b/api/v1alpha4/nnfdatamovementmanager_types.go similarity index 97% rename from api/v1alpha1/nnfdatamovementmanager_types.go rename to api/v1alpha4/nnfdatamovementmanager_types.go index 3d01a4b8e..9a3b26830 100644 --- a/api/v1alpha1/nnfdatamovementmanager_types.go +++ b/api/v1alpha4/nnfdatamovementmanager_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 Hewlett Packard Enterprise Development LP + * Copyright 2022-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( appsv1 "k8s.io/api/apps/v1" @@ -74,8 +74,8 @@ type NnfDataMovementManagerStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="READY",type="boolean",JSONPath=".status.ready",description="True if manager readied all resoures" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfdatamovementmanager_webhook.go b/api/v1alpha4/nnfdatamovementmanager_webhook.go similarity index 98% rename from api/v1alpha3/nnfdatamovementmanager_webhook.go rename to api/v1alpha4/nnfdatamovementmanager_webhook.go index 5bfc914e9..2cb0cdade 100644 --- a/api/v1alpha3/nnfdatamovementmanager_webhook.go +++ b/api/v1alpha4/nnfdatamovementmanager_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfdatamovementmanager_webhook_test.go b/api/v1alpha4/nnfdatamovementmanager_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfdatamovementmanager_webhook_test.go rename to api/v1alpha4/nnfdatamovementmanager_webhook_test.go index 013add9e5..aa469c77e 100644 --- a/api/v1alpha3/nnfdatamovementmanager_webhook_test.go +++ b/api/v1alpha4/nnfdatamovementmanager_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfdatamovementprofile_types.go b/api/v1alpha4/nnfdatamovementprofile_types.go similarity index 85% rename from api/v1alpha1/nnfdatamovementprofile_types.go rename to api/v1alpha4/nnfdatamovementprofile_types.go index d087306b6..a187c0b62 100644 --- a/api/v1alpha1/nnfdatamovementprofile_types.go +++ b/api/v1alpha4/nnfdatamovementprofile_types.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -84,7 +84,7 @@ type NnfDataMovementProfileData struct { CreateDestDir bool `json:"createDestDir"` // If CreateDestDir is true, then use StatCommand to perform the stat commands. - // Use setpriv to stat the path with the specified UID/GID. + // Use setpriv to execute with the specified UID/GID. // Available $VARS: // HOSTFILE: hostfile that is created and used for mpirun. Contains a list of hosts and the // slots/max_slots for each host. This hostfile is created at @@ -94,10 +94,22 @@ type NnfDataMovementProfileData struct { // PATH: Path to stat // +kubebuilder:default:="mpirun --allow-run-as-root -np 1 --hostfile $HOSTFILE -- setpriv --euid $UID --egid $GID --clear-groups stat --cached never -c '%F' $PATH" StatCommand string `json:"statCommand"` + + // If CreateDestDir is true, then use MkdirCommand to perform the mkdir commands. + // Use setpriv to execute with the specified UID/GID. + // Available $VARS: + // HOSTFILE: hostfile that is created and used for mpirun. Contains a list of hosts and the + // slots/max_slots for each host. This hostfile is created at + // `/tmp//hostfile`. This is the same hostfile used as the one for Command. + // UID: User ID that is inherited from the Workflow + // GID: Group ID that is inherited from the Workflow + // PATH: Path to stat + // +kubebuilder:default:="mpirun --allow-run-as-root -np 1 --hostfile $HOSTFILE -- setpriv --euid $UID --egid $GID --clear-groups mkdir -p $PATH" + MkdirCommand string `json:"mkdirCommand"` } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion +// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="DEFAULT",type="boolean",JSONPath=".data.default",description="True if this is the default instance" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" @@ -110,6 +122,7 @@ type NnfDataMovementProfile struct { } // +kubebuilder:object:root=true +// +kubebuilder:storageversion // NnfDataMovementProfileList contains a list of NnfDataMovementProfile type NnfDataMovementProfileList struct { diff --git a/api/v1alpha3/nnfdatamovementprofile_webhook.go b/api/v1alpha4/nnfdatamovementprofile_webhook.go similarity index 96% rename from api/v1alpha3/nnfdatamovementprofile_webhook.go rename to api/v1alpha4/nnfdatamovementprofile_webhook.go index 8e3826c16..b62c157dd 100644 --- a/api/v1alpha3/nnfdatamovementprofile_webhook.go +++ b/api/v1alpha4/nnfdatamovementprofile_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "fmt" @@ -43,7 +43,7 @@ func (r *NnfDataMovementProfile) SetupWebhookWithManager(mgr ctrl.Manager) error // NOTE: The 'path' attribute must follow a specific pattern and should not be modified directly here. // Modifying the path for an invalid path can cause API server errors; failing to locate the webhook. -// +kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha3-nnfdatamovementprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfdatamovementprofiles,verbs=create;update,versions=v1alpha3,name=vnnfdatamovementprofile.kb.io,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha4-nnfdatamovementprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfdatamovementprofiles,verbs=create;update,versions=v1alpha4,name=vnnfdatamovementprofile.kb.io,admissionReviewVersions=v1 var _ webhook.Validator = &NnfDataMovementProfile{} diff --git a/api/v1alpha3/nnfdatamovementprofile_webhook_test.go b/api/v1alpha4/nnfdatamovementprofile_webhook_test.go similarity index 99% rename from api/v1alpha3/nnfdatamovementprofile_webhook_test.go rename to api/v1alpha4/nnfdatamovementprofile_webhook_test.go index fde83d75c..a9f04f67b 100644 --- a/api/v1alpha3/nnfdatamovementprofile_webhook_test.go +++ b/api/v1alpha4/nnfdatamovementprofile_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "context" diff --git a/api/v1alpha1/nnflustremgt_types.go b/api/v1alpha4/nnflustremgt_types.go similarity index 98% rename from api/v1alpha1/nnflustremgt_types.go rename to api/v1alpha4/nnflustremgt_types.go index 25aeea17e..602129244 100644 --- a/api/v1alpha1/nnflustremgt_types.go +++ b/api/v1alpha4/nnflustremgt_types.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -69,8 +69,8 @@ type NnfLustreMGTStatusClaim struct { } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion // +kubebuilder:subresource:status +// +kubebuilder:storageversion // NnfLustreMGT is the Schema for the nnfstorageprofiles API type NnfLustreMGT struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha3/nnflustremgt_webhook.go b/api/v1alpha4/nnflustremgt_webhook.go similarity index 98% rename from api/v1alpha3/nnflustremgt_webhook.go rename to api/v1alpha4/nnflustremgt_webhook.go index 65fcd9408..a037f7acf 100644 --- a/api/v1alpha3/nnflustremgt_webhook.go +++ b/api/v1alpha4/nnflustremgt_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnflustremgt_webhook_test.go b/api/v1alpha4/nnflustremgt_webhook_test.go similarity index 98% rename from api/v1alpha3/nnflustremgt_webhook_test.go rename to api/v1alpha4/nnflustremgt_webhook_test.go index d8e5c6721..e0cf9b536 100644 --- a/api/v1alpha3/nnflustremgt_webhook_test.go +++ b/api/v1alpha4/nnflustremgt_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfnode_types.go b/api/v1alpha4/nnfnode_types.go similarity index 97% rename from api/v1alpha1/nnfnode_types.go rename to api/v1alpha4/nnfnode_types.go index 93c3d56b6..5d4e9a938 100644 --- a/api/v1alpha1/nnfnode_types.go +++ b/api/v1alpha4/nnfnode_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( "github.com/DataWorkflowServices/dws/utils/updater" @@ -97,8 +97,8 @@ type NnfDriveStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".spec.state",description="Current desired state" //+kubebuilder:printcolumn:name="HEALTH",type="string",JSONPath=".status.health",description="Health of node" //+kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.status",description="Current status of node" diff --git a/api/v1alpha3/nnfnode_webhook.go b/api/v1alpha4/nnfnode_webhook.go similarity index 98% rename from api/v1alpha3/nnfnode_webhook.go rename to api/v1alpha4/nnfnode_webhook.go index 3b046862b..4f1b9fd3d 100644 --- a/api/v1alpha3/nnfnode_webhook.go +++ b/api/v1alpha4/nnfnode_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfnode_webhook_test.go b/api/v1alpha4/nnfnode_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfnode_webhook_test.go rename to api/v1alpha4/nnfnode_webhook_test.go index 5b3c21f83..93ce23ba8 100644 --- a/api/v1alpha3/nnfnode_webhook_test.go +++ b/api/v1alpha4/nnfnode_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfnodeblockstorage_types.go b/api/v1alpha4/nnfnodeblockstorage_types.go similarity index 97% rename from api/v1alpha1/nnfnodeblockstorage_types.go rename to api/v1alpha4/nnfnodeblockstorage_types.go index 3a84977d4..6e9eb137e 100644 --- a/api/v1alpha1/nnfnodeblockstorage_types.go +++ b/api/v1alpha4/nnfnodeblockstorage_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -96,8 +96,8 @@ type NnfNodeBlockStorageAllocationStatus struct { } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion // +kubebuilder:subresource:status +// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" // +kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfnodeblockstorage_webhook.go b/api/v1alpha4/nnfnodeblockstorage_webhook.go similarity index 98% rename from api/v1alpha3/nnfnodeblockstorage_webhook.go rename to api/v1alpha4/nnfnodeblockstorage_webhook.go index a0930428a..478176214 100644 --- a/api/v1alpha3/nnfnodeblockstorage_webhook.go +++ b/api/v1alpha4/nnfnodeblockstorage_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfnodeblockstorage_webhook_test.go b/api/v1alpha4/nnfnodeblockstorage_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfnodeblockstorage_webhook_test.go rename to api/v1alpha4/nnfnodeblockstorage_webhook_test.go index 97081beec..a49c98443 100644 --- a/api/v1alpha3/nnfnodeblockstorage_webhook_test.go +++ b/api/v1alpha4/nnfnodeblockstorage_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfnodeecdata_types.go b/api/v1alpha4/nnfnodeecdata_types.go similarity index 95% rename from api/v1alpha1/nnfnodeecdata_types.go rename to api/v1alpha4/nnfnodeecdata_types.go index ede24f2e2..87120b043 100644 --- a/api/v1alpha1/nnfnodeecdata_types.go +++ b/api/v1alpha4/nnfnodeecdata_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2022 Hewlett Packard Enterprise Development LP + * Copyright 2022-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,8 +43,8 @@ type NnfNodeECDataStatus struct { type NnfNodeECPrivateData map[string]string //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion // NnfNodeECData is the Schema for the nnfnodeecdata API type NnfNodeECData struct { diff --git a/api/v1alpha3/nnfnodeecdata_webhook.go b/api/v1alpha4/nnfnodeecdata_webhook.go similarity index 98% rename from api/v1alpha3/nnfnodeecdata_webhook.go rename to api/v1alpha4/nnfnodeecdata_webhook.go index 622c9e72a..8e7e27c0b 100644 --- a/api/v1alpha3/nnfnodeecdata_webhook.go +++ b/api/v1alpha4/nnfnodeecdata_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfnodeecdata_webhook_test.go b/api/v1alpha4/nnfnodeecdata_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfnodeecdata_webhook_test.go rename to api/v1alpha4/nnfnodeecdata_webhook_test.go index 572d7833b..dc62e0d2c 100644 --- a/api/v1alpha3/nnfnodeecdata_webhook_test.go +++ b/api/v1alpha4/nnfnodeecdata_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfnodestorage_types.go b/api/v1alpha4/nnfnodestorage_types.go similarity index 92% rename from api/v1alpha1/nnfnodestorage_types.go rename to api/v1alpha4/nnfnodestorage_types.go index ef4fbf9fd..b31af19d6 100644 --- a/api/v1alpha1/nnfnodestorage_types.go +++ b/api/v1alpha4/nnfnodestorage_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -88,6 +88,11 @@ type LustreStorageSpec struct { // BackFs is the type of backing filesystem to use. // +kubebuilder:validation:Enum=ldiskfs;zfs BackFs string `json:"backFs,omitempty"` + + // LustreComponents defines that list of NNF Nodes that are used for the components (e.g. OSTs) + // in the lustre filesystem. This information is helpful when creating the lustre filesystem and + // using PostMount commands (e.g. to set the striping). + LustreComponents NnfStorageLustreComponents `json:"lustreComponents,omitempty"` } // NnfNodeStorageStatus defines the status for NnfNodeStorage @@ -112,8 +117,8 @@ type NnfNodeStorageAllocationStatus struct { } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion // +kubebuilder:subresource:status +// +kubebuilder:storageversion // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" // +kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/api/v1alpha3/nnfnodestorage_webhook.go b/api/v1alpha4/nnfnodestorage_webhook.go similarity index 98% rename from api/v1alpha3/nnfnodestorage_webhook.go rename to api/v1alpha4/nnfnodestorage_webhook.go index 2cca6b0a0..5b7977b45 100644 --- a/api/v1alpha3/nnfnodestorage_webhook.go +++ b/api/v1alpha4/nnfnodestorage_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfnodestorage_webhook_test.go b/api/v1alpha4/nnfnodestorage_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfnodestorage_webhook_test.go rename to api/v1alpha4/nnfnodestorage_webhook_test.go index ed03b8e4f..6c9fe4443 100644 --- a/api/v1alpha3/nnfnodestorage_webhook_test.go +++ b/api/v1alpha4/nnfnodestorage_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfportmanager_types.go b/api/v1alpha4/nnfportmanager_types.go similarity index 98% rename from api/v1alpha1/nnfportmanager_types.go rename to api/v1alpha4/nnfportmanager_types.go index 0685330e1..3732d4910 100644 --- a/api/v1alpha1/nnfportmanager_types.go +++ b/api/v1alpha4/nnfportmanager_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( "github.com/DataWorkflowServices/dws/utils/updater" @@ -112,8 +112,8 @@ type NnfPortManagerStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion // NnfPortManager is the Schema for the nnfportmanagers API type NnfPortManager struct { diff --git a/api/v1alpha3/nnfportmanager_webhook.go b/api/v1alpha4/nnfportmanager_webhook.go similarity index 98% rename from api/v1alpha3/nnfportmanager_webhook.go rename to api/v1alpha4/nnfportmanager_webhook.go index 250bcd173..67d3343e4 100644 --- a/api/v1alpha3/nnfportmanager_webhook.go +++ b/api/v1alpha4/nnfportmanager_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfportmanager_webhook_test.go b/api/v1alpha4/nnfportmanager_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfportmanager_webhook_test.go rename to api/v1alpha4/nnfportmanager_webhook_test.go index 9727e4f0c..9aaf85b87 100644 --- a/api/v1alpha3/nnfportmanager_webhook_test.go +++ b/api/v1alpha4/nnfportmanager_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfstorage_types.go b/api/v1alpha4/nnfstorage_types.go similarity index 82% rename from api/v1alpha1/nnfstorage_types.go rename to api/v1alpha4/nnfstorage_types.go index 93d9f5124..95c96ccd6 100644 --- a/api/v1alpha1/nnfstorage_types.go +++ b/api/v1alpha4/nnfstorage_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 Hewlett Packard Enterprise Development LP + * Copyright 2021-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -28,7 +28,8 @@ import ( ) const ( - AllocationSetLabel = "nnf.cray.hpe.com/allocationset" + AllocationSetLabel = "nnf.cray.hpe.com/allocationset" + AllocationSetOST0Label = "nnf.cray.hpe.com/allocationset_ost0" ) // NnfStorageAllocationNodes identifies the node and properties of the allocation to make on that node @@ -59,6 +60,27 @@ type NnfStorageLustreSpec struct { PersistentMgsReference corev1.ObjectReference `json:"persistentMgsReference,omitempty"` } +// NnfStorageLustreComponents identifies which NNF nodes are used for each lustre component used by +// the lustre filesystem. Each list can include an NNF node multiple times if that is how it is +// being used (except for NNFNodes). +type NnfStorageLustreComponents struct { + // MTDs is the list of NNF nodes being used as MDTs. + MDTs []string `json:"mdts,omitempty"` + + // MGTs is the list of NNF nodes being used as MGTs. + MGTs []string `json:"mgts,omitempty"` + + // MGTMDTs is the list of NNF nodes being used as combined MGTMDTs. + MGTMDTs []string `json:"mgtmdts,omitempty"` + + // OSTs is the list of NNF nodes being used as OSTs. + OSTs []string `json:"osts,omitempty"` + + // NNfNodes is the list of NNF nodes being used for this filesystem. This is a unique list of + // node names. + NNFNodes []string `json:"nnfNodes,omitempty"` +} + // NnfStorageAllocationSetSpec defines the details for an allocation set type NnfStorageAllocationSetSpec struct { // Name is a human readable label for this set of allocations (e.g., xfs) @@ -123,6 +145,10 @@ type NnfStorageLustreStatus struct { // LustgreMgtReference is an object reference to the NnfLustreMGT resource used // by the NnfStorage LustreMgtReference corev1.ObjectReference `json:"lustreMgtReference,omitempty"` + + // LustreComponents defines that list of NNF Nodes that are used for the components (e.g. OSTs) + // in the lustre filesystem. + LustreComponents NnfStorageLustreComponents `json:"lustreComponents,omitempty"` } // NnfStorageStatus defines the observed status of NNF Storage. @@ -140,8 +166,8 @@ type NnfStorageStatus struct { } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion //+kubebuilder:subresource:status +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.ready" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" //+kubebuilder:printcolumn:name="ERROR",type="string",JSONPath=".status.error.severity" diff --git a/api/v1alpha3/nnfstorage_webhook.go b/api/v1alpha4/nnfstorage_webhook.go similarity index 98% rename from api/v1alpha3/nnfstorage_webhook.go rename to api/v1alpha4/nnfstorage_webhook.go index 8ee500144..715a943ee 100644 --- a/api/v1alpha3/nnfstorage_webhook.go +++ b/api/v1alpha4/nnfstorage_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfstorage_webhook_test.go b/api/v1alpha4/nnfstorage_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfstorage_webhook_test.go rename to api/v1alpha4/nnfstorage_webhook_test.go index a53cd43ca..b05cc05ba 100644 --- a/api/v1alpha3/nnfstorage_webhook_test.go +++ b/api/v1alpha4/nnfstorage_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha1/nnfstorageprofile_types.go b/api/v1alpha4/nnfstorageprofile_types.go similarity index 88% rename from api/v1alpha1/nnfstorageprofile_types.go rename to api/v1alpha4/nnfstorageprofile_types.go index fb5ab091b..6370606e3 100644 --- a/api/v1alpha1/nnfstorageprofile_types.go +++ b/api/v1alpha4/nnfstorageprofile_types.go @@ -1,5 +1,5 @@ /* - * Copyright 2022 Hewlett Packard Enterprise Development LP + * Copyright 2022-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -41,6 +41,24 @@ type NnfStorageProfileLustreCmdLines struct { // For persistent mount options for lustre targets, do not use this array; use the --mountfsoptions // argument to mkfs.lustre instead. MountTarget string `json:"mountTarget,omitempty"` + + // PostActivate specifies a list of commands to run on the Rabbit after the + // Lustre target has been activated + PostActivate []string `json:"postActivate,omitempty"` + + // PostMount specifies a list of commands to run on the Rabbit (Lustre client) after the Lustre + // target is activated. This includes mounting the Lustre filesystem beforehand and unmounting + // it afterward. + PostMount []string `json:"postMount,omitempty"` + + // PreUnmount specifies a list of commands to run on the Rabbit (Lustre client) before the + // Lustre target is deactivated. This includes mounting the Lustre filesystem beforehand and + // unmounting it afterward. + PreUnmount []string `json:"preUnmount,omitempty"` + + // PreDeactivate specifies a list of commands to run on the Rabbit before the + // Lustre target is deactivated + PreDeactivate []string `json:"preDeactivate,omitempty"` } // NnfStorageProfileLustreMiscOptions defines options to use for the mount library, and other utilities. @@ -170,8 +188,16 @@ type NnfStorageProfileCmdLines struct { // MountRabbit specifies mount options for mounting on the Rabbit. MountRabbit string `json:"mountRabbit,omitempty"` + // PostMount specifies a list of commands to run on the Rabbit after the + // file system has been activated and mounted. + PostMount []string `json:"postMount,omitempty"` + // MountCompute specifies mount options for mounting on the Compute. MountCompute string `json:"mountCompute,omitempty"` + + // PreUnmount specifies a list of commands to run on the Rabbit before the + // file system is deactivated and unmounted. + PreUnmount []string `json:"preUnmount,omitempty"` } // NnfStorageProfileLVMVgChangeCmdLines @@ -246,20 +272,20 @@ type NnfStorageProfileData struct { Pinned bool `json:"pinned,omitempty"` // LustreStorage defines the Lustre-specific configuration - LustreStorage NnfStorageProfileLustreData `json:"lustreStorage"` + LustreStorage NnfStorageProfileLustreData `json:"lustreStorage,omitempty"` // GFS2Storage defines the GFS2-specific configuration - GFS2Storage NnfStorageProfileGFS2Data `json:"gfs2Storage"` + GFS2Storage NnfStorageProfileGFS2Data `json:"gfs2Storage,omitempty"` // XFSStorage defines the XFS-specific configuration - XFSStorage NnfStorageProfileXFSData `json:"xfsStorage"` + XFSStorage NnfStorageProfileXFSData `json:"xfsStorage,omitempty"` // RawStorage defines the Raw-specific configuration - RawStorage NnfStorageProfileRawData `json:"rawStorage"` + RawStorage NnfStorageProfileRawData `json:"rawStorage,omitempty"` } //+kubebuilder:object:root=true -//+kubebuilder:unservedversion +// +kubebuilder:storageversion //+kubebuilder:printcolumn:name="DEFAULT",type="boolean",JSONPath=".data.default",description="True if this is the default instance" //+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" @@ -272,6 +298,7 @@ type NnfStorageProfile struct { } //+kubebuilder:object:root=true +// +kubebuilder:storageversion // NnfStorageProfileList contains a list of NnfStorageProfile type NnfStorageProfileList struct { diff --git a/api/v1alpha3/nnfstorageprofile_webhook.go b/api/v1alpha4/nnfstorageprofile_webhook.go similarity index 97% rename from api/v1alpha3/nnfstorageprofile_webhook.go rename to api/v1alpha4/nnfstorageprofile_webhook.go index 623b1e67f..54428669a 100644 --- a/api/v1alpha3/nnfstorageprofile_webhook.go +++ b/api/v1alpha4/nnfstorageprofile_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "fmt" @@ -43,7 +43,7 @@ func (r *NnfStorageProfile) SetupWebhookWithManager(mgr ctrl.Manager) error { // NOTE: The 'path' attribute must follow a specific pattern and should not be modified directly here. // Modifying the path for an invalid path can cause API server errors; failing to locate the webhook. -//+kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha3-nnfstorageprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfstorageprofiles,verbs=create;update,versions=v1alpha3,name=vnnfstorageprofile.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-nnf-cray-hpe-com-v1alpha4-nnfstorageprofile,mutating=false,failurePolicy=fail,sideEffects=None,groups=nnf.cray.hpe.com,resources=nnfstorageprofiles,verbs=create;update,versions=v1alpha4,name=vnnfstorageprofile.kb.io,admissionReviewVersions=v1 var _ webhook.Validator = &NnfStorageProfile{} diff --git a/api/v1alpha3/nnfstorageprofile_webhook_test.go b/api/v1alpha4/nnfstorageprofile_webhook_test.go similarity index 99% rename from api/v1alpha3/nnfstorageprofile_webhook_test.go rename to api/v1alpha4/nnfstorageprofile_webhook_test.go index e3c81df9e..c3dca2c42 100644 --- a/api/v1alpha3/nnfstorageprofile_webhook_test.go +++ b/api/v1alpha4/nnfstorageprofile_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "context" diff --git a/api/v1alpha1/nnfsystemstorage_types.go b/api/v1alpha4/nnfsystemstorage_types.go similarity index 90% rename from api/v1alpha1/nnfsystemstorage_types.go rename to api/v1alpha4/nnfsystemstorage_types.go index 2f2455b26..62abe589a 100644 --- a/api/v1alpha1/nnfsystemstorage_types.go +++ b/api/v1alpha4/nnfsystemstorage_types.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" @@ -49,6 +49,11 @@ type NnfSystemStorageSpec struct { // SystemConfiguration IncludeRabbits []string `json:"includeRabbits,omitempty"` + // ExcludeDisabledRabbits looks at the Storage resource for a Rabbit and does not use it if it's + // marked as "disabled" + // +kubebuilder:default:=false + ExcludeDisabledRabbits bool `json:"excludeDisabledRabbits,omitempty"` + // ExcludeComputes is a list of compute nodes to exclude from the the compute nodes listed in the // SystemConfiguration ExcludeComputes []string `json:"excludeComputes,omitempty"` @@ -78,9 +83,17 @@ type NnfSystemStorageSpec struct { // +kubebuilder:default:=raw Type string `json:"type,omitempty"` + // Shared will create one allocation per Rabbit rather than one allocation + // per compute node. + // +kubebuilder:default:=true + Shared bool `json:"shared"` + // StorageProfile is an object reference to the storage profile to use StorageProfile corev1.ObjectReference `json:"storageProfile"` + // +kubebuilder:default:=false + IgnoreOfflineComputes bool `json:"ignoreOfflineComputes"` + // MakeClientMounts specifies whether to make ClientMount resources or just // make the devices available to the client // +kubebuilder:default:=false @@ -99,8 +112,8 @@ type NnfSystemStorageStatus struct { } // +kubebuilder:object:root=true -// +kubebuilder:unservedversion // +kubebuilder:subresource:status +// +kubebuilder:storageversion // NnfSystemStorage is the Schema for the nnfsystemstorages API type NnfSystemStorage struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha3/nnfsystemstorage_webhook.go b/api/v1alpha4/nnfsystemstorage_webhook.go similarity index 98% rename from api/v1alpha3/nnfsystemstorage_webhook.go rename to api/v1alpha4/nnfsystemstorage_webhook.go index fde987cef..b42c7f968 100644 --- a/api/v1alpha3/nnfsystemstorage_webhook.go +++ b/api/v1alpha4/nnfsystemstorage_webhook.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( ctrl "sigs.k8s.io/controller-runtime" diff --git a/api/v1alpha3/nnfsystemstorage_webhook_test.go b/api/v1alpha4/nnfsystemstorage_webhook_test.go similarity index 98% rename from api/v1alpha3/nnfsystemstorage_webhook_test.go rename to api/v1alpha4/nnfsystemstorage_webhook_test.go index 88af59b4d..f75335ff6 100644 --- a/api/v1alpha3/nnfsystemstorage_webhook_test.go +++ b/api/v1alpha4/nnfsystemstorage_webhook_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( . "github.com/onsi/ginkgo/v2" diff --git a/api/v1alpha3/webhook_suite_test.go b/api/v1alpha4/webhook_suite_test.go similarity index 99% rename from api/v1alpha3/webhook_suite_test.go rename to api/v1alpha4/webhook_suite_test.go index 14edae2d7..3c719c314 100644 --- a/api/v1alpha3/webhook_suite_test.go +++ b/api/v1alpha4/webhook_suite_test.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha3 +package v1alpha4 import ( "context" diff --git a/api/v1alpha1/workflow_helpers.go b/api/v1alpha4/workflow_helpers.go similarity index 99% rename from api/v1alpha1/workflow_helpers.go rename to api/v1alpha4/workflow_helpers.go index 8da835954..cdc4635db 100644 --- a/api/v1alpha1/workflow_helpers.go +++ b/api/v1alpha4/workflow_helpers.go @@ -17,7 +17,7 @@ * limitations under the License. */ -package v1alpha1 +package v1alpha4 const ( // DirectiveIndexLabel is a label applied to child objects of the workflow diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha4/zz_generated.deepcopy.go similarity index 96% rename from api/v1alpha1/zz_generated.deepcopy.go rename to api/v1alpha4/zz_generated.deepcopy.go index de055172b..a581ab625 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha4/zz_generated.deepcopy.go @@ -21,17 +21,18 @@ // Code generated by controller-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha4 import ( "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/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 *LustreStorageSpec) DeepCopyInto(out *LustreStorageSpec) { *out = *in + in.LustreComponents.DeepCopyInto(&out.LustreComponents) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LustreStorageSpec. @@ -1188,7 +1189,7 @@ func (in *NnfNodeStorage) DeepCopyInto(out *NnfNodeStorage) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) } @@ -1260,7 +1261,7 @@ func (in *NnfNodeStorageList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfNodeStorageSpec) DeepCopyInto(out *NnfNodeStorageSpec) { *out = *in - out.LustreStorage = in.LustreStorage + in.LustreStorage.DeepCopyInto(&out.LustreStorage) out.BlockReference = in.BlockReference } @@ -1583,6 +1584,46 @@ func (in *NnfStorageList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NnfStorageLustreComponents) DeepCopyInto(out *NnfStorageLustreComponents) { + *out = *in + if in.MDTs != nil { + in, out := &in.MDTs, &out.MDTs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MGTs != nil { + in, out := &in.MGTs, &out.MGTs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MGTMDTs != nil { + in, out := &in.MGTMDTs, &out.MGTMDTs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OSTs != nil { + in, out := &in.OSTs, &out.OSTs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NNFNodes != nil { + in, out := &in.NNFNodes, &out.NNFNodes + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NnfStorageLustreComponents. +func (in *NnfStorageLustreComponents) DeepCopy() *NnfStorageLustreComponents { + if in == nil { + return nil + } + out := new(NnfStorageLustreComponents) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageLustreSpec) DeepCopyInto(out *NnfStorageLustreSpec) { *out = *in @@ -1603,6 +1644,7 @@ func (in *NnfStorageLustreSpec) DeepCopy() *NnfStorageLustreSpec { func (in *NnfStorageLustreStatus) DeepCopyInto(out *NnfStorageLustreStatus) { *out = *in out.LustreMgtReference = in.LustreMgtReference + in.LustreComponents.DeepCopyInto(&out.LustreComponents) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NnfStorageLustreStatus. @@ -1646,6 +1688,16 @@ func (in *NnfStorageProfileCmdLines) DeepCopyInto(out *NnfStorageProfileCmdLines *out = *in out.VgChange = in.VgChange out.LvChange = in.LvChange + if in.PostMount != nil { + in, out := &in.PostMount, &out.PostMount + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PreUnmount != nil { + in, out := &in.PreUnmount, &out.PreUnmount + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NnfStorageProfileCmdLines. @@ -1680,7 +1732,7 @@ func (in *NnfStorageProfileData) DeepCopy() *NnfStorageProfileData { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageProfileGFS2Data) DeepCopyInto(out *NnfStorageProfileGFS2Data) { *out = *in - out.CmdLines = in.CmdLines + in.CmdLines.DeepCopyInto(&out.CmdLines) if in.StorageLabels != nil { in, out := &in.StorageLabels, &out.StorageLabels *out = make([]string, len(*in)) @@ -1763,6 +1815,26 @@ func (in *NnfStorageProfileList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageProfileLustreCmdLines) DeepCopyInto(out *NnfStorageProfileLustreCmdLines) { *out = *in + if in.PostActivate != nil { + in, out := &in.PostActivate, &out.PostActivate + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PostMount != nil { + in, out := &in.PostMount, &out.PostMount + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PreUnmount != nil { + in, out := &in.PreUnmount, &out.PreUnmount + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PreDeactivate != nil { + in, out := &in.PreDeactivate, &out.PreDeactivate + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NnfStorageProfileLustreCmdLines. @@ -1778,10 +1850,10 @@ func (in *NnfStorageProfileLustreCmdLines) DeepCopy() *NnfStorageProfileLustreCm // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageProfileLustreData) DeepCopyInto(out *NnfStorageProfileLustreData) { *out = *in - out.MgtCmdLines = in.MgtCmdLines - out.MdtCmdLines = in.MdtCmdLines - out.MgtMdtCmdLines = in.MgtMdtCmdLines - out.OstCmdLines = in.OstCmdLines + in.MgtCmdLines.DeepCopyInto(&out.MgtCmdLines) + in.MdtCmdLines.DeepCopyInto(&out.MdtCmdLines) + in.MgtMdtCmdLines.DeepCopyInto(&out.MgtMdtCmdLines) + in.OstCmdLines.DeepCopyInto(&out.OstCmdLines) in.MgtOptions.DeepCopyInto(&out.MgtOptions) in.MdtOptions.DeepCopyInto(&out.MdtOptions) in.MgtMdtOptions.DeepCopyInto(&out.MgtMdtOptions) @@ -1821,7 +1893,7 @@ func (in *NnfStorageProfileLustreMiscOptions) DeepCopy() *NnfStorageProfileLustr // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageProfileRawData) DeepCopyInto(out *NnfStorageProfileRawData) { *out = *in - out.CmdLines = in.CmdLines + in.CmdLines.DeepCopyInto(&out.CmdLines) if in.StorageLabels != nil { in, out := &in.StorageLabels, &out.StorageLabels *out = make([]string, len(*in)) @@ -1842,7 +1914,7 @@ func (in *NnfStorageProfileRawData) DeepCopy() *NnfStorageProfileRawData { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageProfileXFSData) DeepCopyInto(out *NnfStorageProfileXFSData) { *out = *in - out.CmdLines = in.CmdLines + in.CmdLines.DeepCopyInto(&out.CmdLines) if in.StorageLabels != nil { in, out := &in.StorageLabels, &out.StorageLabels *out = make([]string, len(*in)) @@ -1885,7 +1957,7 @@ func (in *NnfStorageSpec) DeepCopy() *NnfStorageSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NnfStorageStatus) DeepCopyInto(out *NnfStorageStatus) { *out = *in - out.NnfStorageLustreStatus = in.NnfStorageLustreStatus + in.NnfStorageLustreStatus.DeepCopyInto(&out.NnfStorageLustreStatus) if in.AllocationSets != nil { in, out := &in.AllocationSets, &out.AllocationSets *out = make([]NnfStorageAllocationSetStatus, len(*in)) diff --git a/cmd/main.go b/cmd/main.go index 0c6103e9e..3a7066243 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -50,13 +50,12 @@ import ( mpiv2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" - nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1" - controllers "github.com/NearNodeFlash/nnf-sos/internal/controller" nnfv1alpha2 "github.com/NearNodeFlash/nnf-sos/api/v1alpha2" nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" //+kubebuilder:scaffold:imports nnf "github.com/NearNodeFlash/nnf-ec/pkg" @@ -75,13 +74,13 @@ const ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(nnfv1alpha1.AddToScheme(scheme)) utilruntime.Must(dwsv1alpha2.AddToScheme(scheme)) utilruntime.Must(lusv1beta1.AddToScheme(scheme)) utilruntime.Must(mpiv2beta1.AddToScheme(scheme)) utilruntime.Must(nnfv1alpha2.AddToScheme(scheme)) utilruntime.Must(nnfv1alpha3.AddToScheme(scheme)) + utilruntime.Must(nnfv1alpha4.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } @@ -378,88 +377,88 @@ func (c *storageController) SetupReconcilers(mgr manager.Manager, opts *nnf.Opti var err error if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfStorageProfile{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfStorageProfile{}).SetupWebhookWithManager(mgr); err != nil { ctrl.Log.Error(err, "unable to create webhook", "webhook", "NnfStorageProfile") return err } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfContainerProfile{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfContainerProfile{}).SetupWebhookWithManager(mgr); err != nil { ctrl.Log.Error(err, "unable to create webhook", "webhook", "NnfContainerProfile") return err } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfDataMovementProfile{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfDataMovementProfile{}).SetupWebhookWithManager(mgr); err != nil { ctrl.Log.Error(err, "unable to create webhook", "webhook", "NnfDataMovementProfile") return err } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfAccess{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfAccess{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfAccess") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfDataMovement{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfDataMovement{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfDataMovement") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfDataMovementManager{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfDataMovementManager{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfDataMovementManager") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfLustreMGT{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfLustreMGT{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfLustreMGT") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfNode{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfNode{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfNode") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfNodeBlockStorage{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfNodeBlockStorage{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfNodeBlockStorage") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfNodeECData{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfNodeECData{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfNodeECData") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfNodeStorage{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfNodeStorage{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfNodeStorage") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfPortManager{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfPortManager{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfPortManager") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfStorage{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfStorage{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfStorage") os.Exit(1) } } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&nnfv1alpha3.NnfSystemStorage{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&nnfv1alpha4.NnfSystemStorage{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "NnfSystemStorage") os.Exit(1) } diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfaccesses.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfaccesses.yaml index fb038fb0e..9c0a2ad65 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfaccesses.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfaccesses.yaml @@ -33,7 +33,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfAccess is the Schema for the nnfaccesses API @@ -260,7 +260,7 @@ spec: - state type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -283,7 +283,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfAccess is the Schema for the nnfaccesses API @@ -533,7 +533,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfAccess is the Schema for the nnfaccesses API @@ -615,6 +615,9 @@ spec: description: GroupID for the new mount. Currently only used for raw format: int32 type: integer + ignoreOfflineComputes: + default: false + type: boolean makeClientMounts: default: true description: |- @@ -706,6 +709,7 @@ spec: required: - desiredState - groupID + - ignoreOfflineComputes - makeClientMounts - storageReference - target diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml index 44fffade4..a2f615652 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml @@ -14,7 +14,7 @@ spec: singular: nnfcontainerprofile scope: Namespaced versions: - - name: v1alpha1 + - name: v1alpha2 schema: openAPIV3Schema: description: NnfContainerProfile is the Schema for the nnfcontainerprofiles @@ -14857,9 +14857,9 @@ spec: required: - data type: object - served: false + served: true storage: false - - name: v1alpha2 + - name: v1alpha3 schema: openAPIV3Schema: description: NnfContainerProfile is the Schema for the nnfcontainerprofiles @@ -29704,7 +29704,7 @@ spec: type: object served: true storage: false - - name: v1alpha3 + - name: v1alpha4 schema: openAPIV3Schema: description: NnfContainerProfile is the Schema for the nnfcontainerprofiles diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementmanagers.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementmanagers.yaml index dc6b2b946..692dffabb 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementmanagers.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementmanagers.yaml @@ -22,7 +22,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfDataMovementManager is the Schema for the nnfdatamovementmanagers @@ -7388,7 +7388,7 @@ spec: - ready type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -7400,7 +7400,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfDataMovementManager is the Schema for the nnfdatamovementmanagers @@ -14778,7 +14778,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfDataMovementManager is the Schema for the nnfdatamovementmanagers diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementprofiles.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementprofiles.yaml index 1f99736c8..639d29347 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementprofiles.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovementprofiles.yaml @@ -22,7 +22,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfDataMovementProfile is the Schema for the nnfdatamovementprofiles @@ -137,7 +137,7 @@ spec: metadata: type: object type: object - served: false + served: true storage: false subresources: {} - additionalPrinterColumns: @@ -148,7 +148,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfDataMovementProfile is the Schema for the nnfdatamovementprofiles @@ -274,7 +274,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfDataMovementProfile is the Schema for the nnfdatamovementprofiles @@ -330,6 +330,20 @@ spec: use of max_slots in the hostfile. The hostfile is used for both `statCommand` and `Command`. minimum: 0 type: integer + mkdirCommand: + default: mpirun --allow-run-as-root -np 1 --hostfile $HOSTFILE -- + setpriv --euid $UID --egid $GID --clear-groups mkdir -p $PATH + description: |- + If CreateDestDir is true, then use MkdirCommand to perform the mkdir commands. + Use setpriv to execute with the specified UID/GID. + Available $VARS: + HOSTFILE: hostfile that is created and used for mpirun. Contains a list of hosts and the + slots/max_slots for each host. This hostfile is created at + `/tmp//hostfile`. This is the same hostfile used as the one for Command. + UID: User ID that is inherited from the Workflow + GID: Group ID that is inherited from the Workflow + PATH: Path to stat + type: string pinned: default: false description: Pinned is true if this instance is an immutable copy @@ -356,7 +370,7 @@ spec: -c '%F' $PATH description: |- If CreateDestDir is true, then use StatCommand to perform the stat commands. - Use setpriv to stat the path with the specified UID/GID. + Use setpriv to execute with the specified UID/GID. Available $VARS: HOSTFILE: hostfile that is created and used for mpirun. Contains a list of hosts and the slots/max_slots for each host. This hostfile is created at @@ -375,6 +389,7 @@ spec: - command - createDestDir - maxSlots + - mkdirCommand - slots - statCommand type: object diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovements.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovements.yaml index 50bed9b1f..8af1d70c8 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfdatamovements.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfdatamovements.yaml @@ -29,7 +29,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfDataMovement is the Schema for the nnfdatamovements API @@ -416,7 +416,7 @@ spec: type: string type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -435,7 +435,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfDataMovement is the Schema for the nnfdatamovements API @@ -841,7 +841,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfDataMovement is the Schema for the nnfdatamovements API diff --git a/config/crd/bases/nnf.cray.hpe.com_nnflustremgts.yaml b/config/crd/bases/nnf.cray.hpe.com_nnflustremgts.yaml index 93b1fc136..cc1a0186b 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnflustremgts.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnflustremgts.yaml @@ -14,7 +14,7 @@ spec: singular: nnflustremgt scope: Namespaced versions: - - name: v1alpha1 + - name: v1alpha2 schema: openAPIV3Schema: description: NnfLustreMGT is the Schema for the nnfstorageprofiles API @@ -281,11 +281,11 @@ spec: type: string type: object type: object - served: false + served: true storage: false subresources: status: {} - - name: v1alpha2 + - name: v1alpha3 schema: openAPIV3Schema: description: NnfLustreMGT is the Schema for the nnfstorageprofiles API @@ -556,7 +556,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha3 + - name: v1alpha4 schema: openAPIV3Schema: description: NnfLustreMGT is the Schema for the nnfstorageprofiles API diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfnodeblockstorages.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfnodeblockstorages.yaml index a0b5b6a95..2fc2e4f81 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfnodeblockstorages.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfnodeblockstorages.yaml @@ -24,7 +24,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: properties: @@ -173,7 +173,7 @@ spec: - ready type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -187,7 +187,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: properties: @@ -350,7 +350,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: properties: diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfnodeecdata.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfnodeecdata.yaml index 0b39098cb..ae7eecc81 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfnodeecdata.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfnodeecdata.yaml @@ -14,7 +14,7 @@ spec: singular: nnfnodeecdata scope: Namespaced versions: - - name: v1alpha1 + - name: v1alpha2 schema: openAPIV3Schema: description: NnfNodeECData is the Schema for the nnfnodeecdata API @@ -50,11 +50,11 @@ spec: type: object type: object type: object - served: false + served: true storage: false subresources: status: {} - - name: v1alpha2 + - name: v1alpha3 schema: openAPIV3Schema: description: NnfNodeECData is the Schema for the nnfnodeecdata API @@ -94,7 +94,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha3 + - name: v1alpha4 schema: openAPIV3Schema: description: NnfNodeECData is the Schema for the nnfnodeecdata API diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfnodes.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfnodes.yaml index b716ba039..becc5225f 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfnodes.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfnodes.yaml @@ -35,7 +35,7 @@ spec: name: POD priority: 1 type: string - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfNode is the Schema for the NnfNode API @@ -170,7 +170,7 @@ spec: type: string type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -195,7 +195,7 @@ spec: name: POD priority: 1 type: string - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfNode is the Schema for the NnfNode API @@ -355,7 +355,7 @@ spec: name: POD priority: 1 type: string - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfNode is the Schema for the NnfNode API diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfnodestorages.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfnodestorages.yaml index 4e8659367..8a7aad796 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfnodestorages.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfnodestorages.yaml @@ -24,7 +24,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfNodeStorage is the Schema for the NnfNodeStorage API @@ -229,7 +229,7 @@ spec: type: boolean type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -243,7 +243,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfNodeStorage is the Schema for the NnfNodeStorage API @@ -462,7 +462,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfNodeStorage is the Schema for the NnfNodeStorage API @@ -576,6 +576,41 @@ spec: filesystem. maxLength: 8 type: string + lustreComponents: + description: |- + LustreComponents defines that list of NNF Nodes that are used for the components (e.g. OSTs) + in the lustre filesystem. This information is helpful when creating the lustre filesystem and + using PostMount commands (e.g. to set the striping). + properties: + mdts: + description: MTDs is the list of NNF nodes being used as MDTs. + items: + type: string + type: array + mgtmdts: + description: MGTMDTs is the list of NNF nodes being used as + combined MGTMDTs. + items: + type: string + type: array + mgts: + description: MGTs is the list of NNF nodes being used as MGTs. + items: + type: string + type: array + nnfNodes: + description: |- + NNfNodes is the list of NNF nodes being used for this filesystem. This is a unique list of + node names. + items: + type: string + type: array + osts: + description: OSTs is the list of NNF nodes being used as OSTs. + items: + type: string + type: array + type: object mgsAddress: description: |- MgsAddress is the NID of the MGS to use. This is used only when diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfportmanagers.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfportmanagers.yaml index d2667e72c..7fed29605 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfportmanagers.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfportmanagers.yaml @@ -14,7 +14,7 @@ spec: singular: nnfportmanager scope: Namespaced versions: - - name: v1alpha1 + - name: v1alpha2 schema: openAPIV3Schema: description: NnfPortManager is the Schema for the nnfportmanagers API @@ -247,11 +247,11 @@ spec: - status type: object type: object - served: false + served: true storage: false subresources: status: {} - - name: v1alpha2 + - name: v1alpha3 schema: openAPIV3Schema: description: NnfPortManager is the Schema for the nnfportmanagers API @@ -488,7 +488,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha3 + - name: v1alpha4 schema: openAPIV3Schema: description: NnfPortManager is the Schema for the nnfportmanagers API diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml index 231670d0a..a7feb1093 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml @@ -22,7 +22,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfStorageProfile is the Schema for the nnfstorageprofiles API @@ -592,7 +592,7 @@ spec: metadata: type: object type: object - served: false + served: true storage: false subresources: {} - additionalPrinterColumns: @@ -603,7 +603,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfStorageProfile is the Schema for the nnfstorageprofiles API @@ -668,6 +668,20 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string + postActivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit after the + file system has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + file system is deactivated + items: + type: string + type: array pvCreate: description: PvCreate specifies the pvcreate commandline, minus the "pvcreate". @@ -765,6 +779,20 @@ spec: For persistent mount options for lustre targets, do not use this array; use the --mountfsoptions argument to mkfs.lustre instead. type: string + postActivate: + description: |- + PostActivate specifies a list of commands to run on the Rabbit after the + Lustre target has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + Lustre target is deactivated + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -817,6 +845,20 @@ spec: For persistent mount options for lustre targets, do not use this array; use the --mountfsoptions argument to mkfs.lustre instead. type: string + postActivate: + description: |- + PostActivate specifies a list of commands to run on the Rabbit after the + Lustre target has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + Lustre target is deactivated + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -840,6 +882,20 @@ spec: For persistent mount options for lustre targets, do not use this array; use the --mountfsoptions argument to mkfs.lustre instead. type: string + postActivate: + description: |- + PostActivate specifies a list of commands to run on the Rabbit after the + Lustre target has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + Lustre target is deactivated + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -930,6 +986,20 @@ spec: For persistent mount options for lustre targets, do not use this array; use the --mountfsoptions argument to mkfs.lustre instead. type: string + postActivate: + description: |- + PostActivate specifies a list of commands to run on the Rabbit after the + Lustre target has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + Lustre target is deactivated + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -1023,6 +1093,20 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string + postActivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit after the + file system has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + file system is deactivated + items: + type: string + type: array pvCreate: description: PvCreate specifies the pvcreate commandline, minus the "pvcreate". @@ -1112,6 +1196,20 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string + postActivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit after the + file system has been activated + items: + type: string + type: array + preDeactivate: + description: |- + PreDeactivate specifies a list of commands to run on the Rabbit before the + file system is deactivated + items: + type: string + type: array pvCreate: description: PvCreate specifies the pvcreate commandline, minus the "pvcreate". @@ -1156,11 +1254,6 @@ spec: type: string type: array type: object - required: - - gfs2Storage - - lustreStorage - - rawStorage - - xfsStorage type: object kind: description: |- @@ -1184,7 +1277,7 @@ spec: - jsonPath: .metadata.creationTimestamp name: AGE type: date - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfStorageProfile is the Schema for the nnfstorageprofiles API @@ -1249,17 +1342,17 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string - postActivate: + postMount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit after the - file system has been activated + PostMount specifies a list of commands to run on the Rabbit after the + file system has been activated and mounted. items: type: string type: array - preDeactivate: + preUnmount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit before the - file system is deactivated + PreUnmount specifies a list of commands to run on the Rabbit before the + file system is deactivated and unmounted. items: type: string type: array @@ -1367,6 +1460,14 @@ spec: items: type: string type: array + postMount: + description: |- + PostMount specifies a list of commands to run on the Rabbit (Lustre client) after the Lustre + target is activated. This includes mounting the Lustre filesystem beforehand and unmounting + it afterward. + items: + type: string + type: array preDeactivate: description: |- PreDeactivate specifies a list of commands to run on the Rabbit before the @@ -1374,6 +1475,14 @@ spec: items: type: string type: array + preUnmount: + description: |- + PreUnmount specifies a list of commands to run on the Rabbit (Lustre client) before the + Lustre target is deactivated. This includes mounting the Lustre filesystem beforehand and + unmounting it afterward. + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -1433,6 +1542,14 @@ spec: items: type: string type: array + postMount: + description: |- + PostMount specifies a list of commands to run on the Rabbit (Lustre client) after the Lustre + target is activated. This includes mounting the Lustre filesystem beforehand and unmounting + it afterward. + items: + type: string + type: array preDeactivate: description: |- PreDeactivate specifies a list of commands to run on the Rabbit before the @@ -1440,6 +1557,14 @@ spec: items: type: string type: array + preUnmount: + description: |- + PreUnmount specifies a list of commands to run on the Rabbit (Lustre client) before the + Lustre target is deactivated. This includes mounting the Lustre filesystem beforehand and + unmounting it afterward. + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -1470,6 +1595,14 @@ spec: items: type: string type: array + postMount: + description: |- + PostMount specifies a list of commands to run on the Rabbit (Lustre client) after the Lustre + target is activated. This includes mounting the Lustre filesystem beforehand and unmounting + it afterward. + items: + type: string + type: array preDeactivate: description: |- PreDeactivate specifies a list of commands to run on the Rabbit before the @@ -1477,6 +1610,14 @@ spec: items: type: string type: array + preUnmount: + description: |- + PreUnmount specifies a list of commands to run on the Rabbit (Lustre client) before the + Lustre target is deactivated. This includes mounting the Lustre filesystem beforehand and + unmounting it afterward. + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -1574,6 +1715,14 @@ spec: items: type: string type: array + postMount: + description: |- + PostMount specifies a list of commands to run on the Rabbit (Lustre client) after the Lustre + target is activated. This includes mounting the Lustre filesystem beforehand and unmounting + it afterward. + items: + type: string + type: array preDeactivate: description: |- PreDeactivate specifies a list of commands to run on the Rabbit before the @@ -1581,6 +1730,14 @@ spec: items: type: string type: array + preUnmount: + description: |- + PreUnmount specifies a list of commands to run on the Rabbit (Lustre client) before the + Lustre target is deactivated. This includes mounting the Lustre filesystem beforehand and + unmounting it afterward. + items: + type: string + type: array zpoolCreate: description: |- ZpoolCreate specifies the zpool create commandline, minus the "zpool create". @@ -1674,17 +1831,17 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string - postActivate: + postMount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit after the - file system has been activated + PostMount specifies a list of commands to run on the Rabbit after the + file system has been activated and mounted. items: type: string type: array - preDeactivate: + preUnmount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit before the - file system is deactivated + PreUnmount specifies a list of commands to run on the Rabbit before the + file system is deactivated and unmounted. items: type: string type: array @@ -1777,17 +1934,17 @@ spec: description: MountRabbit specifies mount options for mounting on the Rabbit. type: string - postActivate: + postMount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit after the - file system has been activated + PostMount specifies a list of commands to run on the Rabbit after the + file system has been activated and mounted. items: type: string type: array - preDeactivate: + preUnmount: description: |- - PreDeactivate specifies a list of commands to run on the Rabbit before the - file system is deactivated + PreUnmount specifies a list of commands to run on the Rabbit before the + file system is deactivated and unmounted. items: type: string type: array diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfstorages.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfstorages.yaml index 875ed4043..0c3abe1bb 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfstorages.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfstorages.yaml @@ -24,7 +24,7 @@ spec: - jsonPath: .status.error.severity name: ERROR type: string - name: v1alpha1 + name: v1alpha2 schema: openAPIV3Schema: description: NnfStorage is the Schema for the storages API @@ -305,7 +305,7 @@ spec: type: boolean type: object type: object - served: false + served: true storage: false subresources: status: {} @@ -319,7 +319,7 @@ spec: - jsonPath: .status.error.severity name: ERROR type: string - name: v1alpha2 + name: v1alpha3 schema: openAPIV3Schema: description: NnfStorage is the Schema for the storages API @@ -614,7 +614,7 @@ spec: - jsonPath: .status.error.severity name: ERROR type: string - name: v1alpha3 + name: v1alpha4 schema: openAPIV3Schema: description: NnfStorage is the Schema for the storages API @@ -841,6 +841,40 @@ spec: filesystem. maxLength: 8 type: string + lustreComponents: + description: |- + LustreComponents defines that list of NNF Nodes that are used for the components (e.g. OSTs) + in the lustre filesystem. + properties: + mdts: + description: MTDs is the list of NNF nodes being used as MDTs. + items: + type: string + type: array + mgtmdts: + description: MGTMDTs is the list of NNF nodes being used as combined + MGTMDTs. + items: + type: string + type: array + mgts: + description: MGTs is the list of NNF nodes being used as MGTs. + items: + type: string + type: array + nnfNodes: + description: |- + NNfNodes is the list of NNF nodes being used for this filesystem. This is a unique list of + node names. + items: + type: string + type: array + osts: + description: OSTs is the list of NNF nodes being used as OSTs. + items: + type: string + type: array + type: object lustreMgtReference: description: |- LustgreMgtReference is an object reference to the NnfLustreMGT resource used diff --git a/config/crd/bases/nnf.cray.hpe.com_nnfsystemstorages.yaml b/config/crd/bases/nnf.cray.hpe.com_nnfsystemstorages.yaml index 7e038bd1d..9fb389267 100644 --- a/config/crd/bases/nnf.cray.hpe.com_nnfsystemstorages.yaml +++ b/config/crd/bases/nnf.cray.hpe.com_nnfsystemstorages.yaml @@ -14,7 +14,7 @@ spec: singular: nnfsystemstorage scope: Namespaced versions: - - name: v1alpha1 + - name: v1alpha2 schema: openAPIV3Schema: description: NnfSystemStorage is the Schema for the nnfsystemstorages API @@ -73,6 +73,12 @@ spec: items: type: string type: array + excludeDisabledRabbits: + default: false + description: |- + ExcludeDisabledRabbits looks at the Storage resource for a Rabbit and does not use it if it's + marked as "disabled" + type: boolean excludeRabbits: description: ExludeRabbits is a list of Rabbits to exclude from the Rabbits in the SystemConfiguration @@ -244,11 +250,11 @@ spec: - ready type: object type: object - served: false + served: true storage: false subresources: status: {} - - name: v1alpha2 + - name: v1alpha3 schema: openAPIV3Schema: description: NnfSystemStorage is the Schema for the nnfsystemstorages API @@ -488,7 +494,7 @@ spec: storage: false subresources: status: {} - - name: v1alpha3 + - name: v1alpha4 schema: openAPIV3Schema: description: NnfSystemStorage is the Schema for the nnfsystemstorages API @@ -559,6 +565,9 @@ spec: items: type: string type: array + ignoreOfflineComputes: + default: false + type: boolean includeComputes: description: |- IncludeComputes is a list of computes nodes to use rather than getting the list of compute nodes @@ -579,6 +588,12 @@ spec: MakeClientMounts specifies whether to make ClientMount resources or just make the devices available to the client type: boolean + shared: + default: true + description: |- + Shared will create one allocation per Rabbit rather than one allocation + per compute node. + type: boolean storageProfile: description: StorageProfile is an object reference to the storage profile to use @@ -680,7 +695,9 @@ spec: type: string required: - capacity + - ignoreOfflineComputes - makeClientMounts + - shared - storageProfile type: object status: diff --git a/config/examples/nnf_nnfcontainerprofiles.yaml b/config/examples/nnf_nnfcontainerprofiles.yaml index 010f2af7e..70497e09b 100644 --- a/config/examples/nnf_nnfcontainerprofiles.yaml +++ b/config/examples/nnf_nnfcontainerprofiles.yaml @@ -1,4 +1,4 @@ -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-success @@ -20,7 +20,7 @@ data: - -c - "sleep 10 && exit 0" --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-fail @@ -34,7 +34,7 @@ data: - -c - "sleep 10 && exit 1" --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-randomly-fail @@ -59,7 +59,7 @@ data: echo "exiting: $x" exit $x --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-forever @@ -79,7 +79,7 @@ data: - -c - "while true; do date && sleep 5; done" --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-mpi @@ -117,7 +117,7 @@ data: image: nnf-mfu:latest --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-mpi-fail @@ -145,7 +145,7 @@ data: - name: example-mpi-fail image: nnf-mfu:latest --- -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfContainerProfile metadata: name: example-mpi-webserver diff --git a/config/examples/nnf_nnfdatamovementprofile.yaml b/config/examples/nnf_nnfdatamovementprofile.yaml index 45126ae88..ed153ee33 100644 --- a/config/examples/nnf_nnfdatamovementprofile.yaml +++ b/config/examples/nnf_nnfdatamovementprofile.yaml @@ -1,4 +1,4 @@ -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfDataMovementProfile metadata: name: template diff --git a/config/examples/nnf_nnfstorageprofile.yaml b/config/examples/nnf_nnfstorageprofile.yaml index f693c7289..d8c39dec5 100644 --- a/config/examples/nnf_nnfstorageprofile.yaml +++ b/config/examples/nnf_nnfstorageprofile.yaml @@ -1,4 +1,4 @@ -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfStorageProfile metadata: name: template @@ -23,6 +23,8 @@ data: zpoolCreate: -O canmount=off -o cachefile=none $POOL_NAME $DEVICE_LIST mkfs: --ost --backfstype=$BACKFS --fsname=$FS_NAME --mgsnode=$MGS_NID --index=$INDEX $ZVOL_NAME mountTarget: $ZVOL_NAME $MOUNT_PATH + postMount: + - 'lfs setstripe -E 64K -L mdt -E 16m -c 1 -S 16m -E 1G -c 2 -E 4G -c 4 -E 16G -c 8 -E 64G -c 16 -E -1 -c -1 $MOUNT_PATH' ostOptions: scale: 5 colocateComputes: true @@ -48,12 +50,12 @@ data: lvChange: activate: --activate ys $VG_NAME/$LV_NAME deactivate: --activate n $VG_NAME/$LV_NAME - lvRemove: $VG_NAME + lvRemove: $VG_NAME/$LV_NAME mkfs: -j2 -p $PROTOCOL -t $CLUSTER_NAME:$LOCK_SPACE $DEVICE mountRabbit: $DEVICE $MOUNT_PATH mountCompute: $DEVICE $MOUNT_PATH - postActivate: - - "chown $USERID:$GROUPID $MOUNT_PATH" + postMount: + - 'chown $USERID:$GROUPID $MOUNT_PATH' xfsStorage: commandlines: sharedVg: true @@ -68,12 +70,12 @@ data: lvChange: activate: --activate y $VG_NAME/$LV_NAME deactivate: --activate n $VG_NAME/$LV_NAME - lvRemove: $VG_NAME + lvRemove: $VG_NAME/$LV_NAME mkfs: $DEVICE mountRabbit: $DEVICE $MOUNT_PATH mountCompute: $DEVICE $MOUNT_PATH - postActivate: - - "chown $USERID:$GROUPID $MOUNT_PATH" + postMount: + - 'chown $USERID:$GROUPID $MOUNT_PATH' rawStorage: commandlines: sharedVg: true @@ -88,6 +90,4 @@ data: lvChange: activate: --activate y $VG_NAME/$LV_NAME deactivate: --activate n $VG_NAME/$LV_NAME - lvRemove: $VG_NAME - - + lvRemove: $VG_NAME/$LV_NAME diff --git a/config/kind/manager_volumes_patch.yaml b/config/kind/manager_volumes_patch.yaml index a6bf6487d..3da27b6ce 100644 --- a/config/kind/manager_volumes_patch.yaml +++ b/config/kind/manager_volumes_patch.yaml @@ -10,15 +10,16 @@ spec: - name: manager workingDir: /localdisk volumeMounts: - - mountPath: /mnt - name: mnt-dir + - mountPath: /mnt/nnf + name: mock-filesystems mountPropagation: Bidirectional - mountPath: /localdisk name: localdisk volumes: - - name: mnt-dir + - name: mock-filesystems hostPath: - path: /mnt + path: /mnt/nnf + type: DirectoryOrCreate - name: localdisk hostPath: type: DirectoryOrCreate diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index a1fbc9f13..a3a67fda9 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -18,4 +18,4 @@ kind: Kustomization images: - name: controller newName: ghcr.io/nearnodeflash/nnf-sos - newTag: 0.1.16 + newTag: 0.1.17 diff --git a/config/ports/port_manager.yaml b/config/ports/port_manager.yaml index c4dc58840..854e1be65 100644 --- a/config/ports/port_manager.yaml +++ b/config/ports/port_manager.yaml @@ -1,4 +1,4 @@ -apiVersion: nnf.cray.hpe.com/v1alpha3 +apiVersion: nnf.cray.hpe.com/v1alpha4 kind: NnfPortManager metadata: name: port-manager diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 8996660e3..5b4323b27 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -40,4 +40,18 @@ resources: - nnf_v1alpha3_nnfstorage.yaml - nnf_v1alpha3_nnfstorageprofile.yaml - nnf_v1alpha3_nnfsystemstorage.yaml +- nnf_v1alpha4_nnfaccess.yaml +- nnf_v1alpha4_nnfcontainerprofile.yaml +- nnf_v1alpha4_nnfdatamovement.yaml +- nnf_v1alpha4_nnfdatamovementmanager.yaml +- nnf_v1alpha4_nnfdatamovementprofile.yaml +- nnf_v1alpha4_nnflustremgt.yaml +- nnf_v1alpha4_nnfnode.yaml +- nnf_v1alpha4_nnfnodeblockstorage.yaml +- nnf_v1alpha4_nnfnodeecdata.yaml +- nnf_v1alpha4_nnfnodestorage.yaml +- nnf_v1alpha4_nnfportmanager.yaml +- nnf_v1alpha4_nnfstorage.yaml +- nnf_v1alpha4_nnfstorageprofile.yaml +- nnf_v1alpha4_nnfsystemstorage.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/nnf_v1alpha4_nnfaccess.yaml b/config/samples/nnf_v1alpha4_nnfaccess.yaml new file mode 100644 index 000000000..4e88f902d --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfaccess.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfAccess +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfaccess-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfcontainerprofile.yaml b/config/samples/nnf_v1alpha4_nnfcontainerprofile.yaml new file mode 100644 index 000000000..d1b26eb39 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfcontainerprofile.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfContainerProfile +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfcontainerprofile-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfdatamovement.yaml b/config/samples/nnf_v1alpha4_nnfdatamovement.yaml new file mode 100644 index 000000000..12dc293bc --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfdatamovement.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfDataMovement +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfdatamovement-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfdatamovementmanager.yaml b/config/samples/nnf_v1alpha4_nnfdatamovementmanager.yaml new file mode 100644 index 000000000..4928282ba --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfdatamovementmanager.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfDataMovementManager +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfdatamovementmanager-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfdatamovementprofile.yaml b/config/samples/nnf_v1alpha4_nnfdatamovementprofile.yaml new file mode 100644 index 000000000..11c24ce72 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfdatamovementprofile.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfDataMovementProfile +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfdatamovementprofile-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnflustremgt.yaml b/config/samples/nnf_v1alpha4_nnflustremgt.yaml new file mode 100644 index 000000000..6921380da --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnflustremgt.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfLustreMGT +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnflustremgt-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfnode.yaml b/config/samples/nnf_v1alpha4_nnfnode.yaml new file mode 100644 index 000000000..340b5a038 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfnode.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfNode +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfnode-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfnodeblockstorage.yaml b/config/samples/nnf_v1alpha4_nnfnodeblockstorage.yaml new file mode 100644 index 000000000..65b298355 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfnodeblockstorage.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfNodeBlockStorage +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfnodeblockstorage-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfnodeecdata.yaml b/config/samples/nnf_v1alpha4_nnfnodeecdata.yaml new file mode 100644 index 000000000..efaac815f --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfnodeecdata.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfNodeECData +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfnodeecdata-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfnodestorage.yaml b/config/samples/nnf_v1alpha4_nnfnodestorage.yaml new file mode 100644 index 000000000..6ff9f50ba --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfnodestorage.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfNodeStorage +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfnodestorage-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfportmanager.yaml b/config/samples/nnf_v1alpha4_nnfportmanager.yaml new file mode 100644 index 000000000..d7c8c6534 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfportmanager.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfPortManager +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfportmanager-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfstorage.yaml b/config/samples/nnf_v1alpha4_nnfstorage.yaml new file mode 100644 index 000000000..606d977c7 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfstorage.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfStorage +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfstorage-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfstorageprofile.yaml b/config/samples/nnf_v1alpha4_nnfstorageprofile.yaml new file mode 100644 index 000000000..629ec9ae8 --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfstorageprofile.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfStorageProfile +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfstorageprofile-sample +spec: + # TODO(user): Add fields here diff --git a/config/samples/nnf_v1alpha4_nnfsystemstorage.yaml b/config/samples/nnf_v1alpha4_nnfsystemstorage.yaml new file mode 100644 index 000000000..7abae5d2b --- /dev/null +++ b/config/samples/nnf_v1alpha4_nnfsystemstorage.yaml @@ -0,0 +1,9 @@ +apiVersion: nnf.cray.hpe.com/v1alpha4 +kind: NnfSystemStorage +metadata: + labels: + app.kubernetes.io/name: nnf-sos + app.kubernetes.io/managed-by: kustomize + name: nnfsystemstorage-sample +spec: + # TODO(user): Add fields here diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 3d3637c66..0374a396d 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -10,14 +10,14 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-nnf-cray-hpe-com-v1alpha3-nnfcontainerprofile + path: /validate-nnf-cray-hpe-com-v1alpha4-nnfcontainerprofile failurePolicy: Fail name: vnnfcontainerprofile.kb.io rules: - apiGroups: - nnf.cray.hpe.com apiVersions: - - v1alpha3 + - v1alpha4 operations: - CREATE - UPDATE @@ -30,14 +30,14 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-nnf-cray-hpe-com-v1alpha3-nnfdatamovementprofile + path: /validate-nnf-cray-hpe-com-v1alpha4-nnfdatamovementprofile failurePolicy: Fail name: vnnfdatamovementprofile.kb.io rules: - apiGroups: - nnf.cray.hpe.com apiVersions: - - v1alpha3 + - v1alpha4 operations: - CREATE - UPDATE @@ -50,14 +50,14 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-nnf-cray-hpe-com-v1alpha3-nnfstorageprofile + path: /validate-nnf-cray-hpe-com-v1alpha4-nnfstorageprofile failurePolicy: Fail name: vnnfstorageprofile.kb.io rules: - apiGroups: - nnf.cray.hpe.com apiVersions: - - v1alpha3 + - v1alpha4 operations: - CREATE - UPDATE diff --git a/github/cluster-api/util/conversion/conversion_test.go b/github/cluster-api/util/conversion/conversion_test.go index e8aab1ebe..5d4271d98 100644 --- a/github/cluster-api/util/conversion/conversion_test.go +++ b/github/cluster-api/util/conversion/conversion_test.go @@ -19,7 +19,7 @@ package conversion import ( "testing" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" @@ -30,85 +30,85 @@ import ( var ( oldNnfAccessGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfAccess", } oldNnfContainerProfileGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfContainerProfile", } oldNnfDataMovementGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfDataMovement", } oldNnfDataMovementManagerGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfDataMovementManager", } oldNnfDataMovementProfileGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfDataMovementProfile", } oldNnfLustreMGTGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfLustreMGT", } oldNnfNodeGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfNode", } oldNnfNodeBlockStorageGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfNodeBlockStorage", } oldNnfNodeECDataGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfNodeECData", } oldNnfNodeStorageGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfNodeStorage", } oldNnfPortManagerGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfPortManager", } oldNnfStorageGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfStorage", } oldNnfStorageProfileGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfStorageProfile", } oldNnfSystemStorageGVK = schema.GroupVersionKind{ - Group: nnfv1alpha3.GroupVersion.Group, + Group: nnfv1alpha4.GroupVersion.Group, Version: "v1old", Kind: "NnfSystemStorage", } @@ -120,14 +120,14 @@ func TestMarshalData(t *testing.T) { g := NewWithT(t) t.Run("NnfAccess should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfAccess{ + src := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfAccessSpec{ + Spec: nnfv1alpha4.NnfAccessSpec{ DesiredState: "mounted", UserID: 1551, GroupID: 2442, @@ -150,13 +150,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfAccess should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfAccess{ + src := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfAccess")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfAccess")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -170,14 +170,14 @@ func TestMarshalData(t *testing.T) { prerun := int64(345) userid := uint32(7667) groupid := uint32(8448) - src := &nnfv1alpha3.NnfContainerProfile{ + src := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Data: nnfv1alpha3.NnfContainerProfileData{ + Data: nnfv1alpha4.NnfContainerProfileData{ PreRunTimeoutSeconds: &prerun, UserID: &userid, GroupID: &groupid, @@ -200,13 +200,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfContainerProfile should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfContainerProfile{ + src := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfContainerProfile")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfContainerProfile")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -217,20 +217,20 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovement should write source object to destination", func(*testing.T) { - destpath := &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + destpath := &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: "little/red", } - srcpath := &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + srcpath := &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: "/dev/null", } - src := &nnfv1alpha3.NnfDataMovement{ + src := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfDataMovementSpec{ + Spec: nnfv1alpha4.NnfDataMovementSpec{ Destination: destpath, Source: srcpath, }, @@ -251,13 +251,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovement should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovement{ + src := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfDataMovement")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfDataMovement")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -268,14 +268,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovementManager should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementManager{ + src := &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfDataMovementManagerSpec{ + Spec: nnfv1alpha4.NnfDataMovementManagerSpec{ HostPath: "/this/dir", MountPath: "/mnts", }, @@ -296,13 +296,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovementManager should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementManager{ + src := &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfDataMovementManager")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfDataMovementManager")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -313,14 +313,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovementProfile should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementProfile{ + src := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Data: nnfv1alpha3.NnfDataMovementProfileData{ + Data: nnfv1alpha4.NnfDataMovementProfileData{ Command: "mpirun is cool", StatCommand: "stat --something", }, @@ -341,13 +341,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfDataMovementProfile should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementProfile{ + src := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfDataMovementProfile")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfDataMovementProfile")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -359,14 +359,14 @@ func TestMarshalData(t *testing.T) { t.Run("NnfLustreMGT should write source object to destination", func(*testing.T) { blacklist := []string{"black-fly", "black bird"} - src := &nnfv1alpha3.NnfLustreMGT{ + src := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ FsNameStart: "aaaa-pizza", FsNameBlackList: blacklist, }, @@ -388,13 +388,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfLustreMGT should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfLustreMGT{ + src := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfLustreMGT")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfLustreMGT")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -405,14 +405,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNode should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfNode{ + src := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfNodeSpec{ + Spec: nnfv1alpha4.NnfNodeSpec{ Name: "rabbit-1", Pod: "nnf-thingy-122", }, @@ -433,13 +433,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNode should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfNode{ + src := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfNode")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfNode")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -450,17 +450,17 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeBlockStorage should write source object to destination", func(*testing.T) { - alloc := []nnfv1alpha3.NnfNodeBlockStorageAllocationSpec{ + alloc := []nnfv1alpha4.NnfNodeBlockStorageAllocationSpec{ {Access: []string{"rabbit-44", "rabbit-10002"}}, } - src := &nnfv1alpha3.NnfNodeBlockStorage{ + src := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfNodeBlockStorageSpec{ + Spec: nnfv1alpha4.NnfNodeBlockStorageSpec{ Allocations: alloc, }, } @@ -480,13 +480,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeBlockStorage should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeBlockStorage{ + src := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfNodeBlockStorage")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfNodeBlockStorage")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -497,18 +497,18 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeECData should write source object to destination", func(*testing.T) { - elem1 := nnfv1alpha3.NnfNodeECPrivateData{"element1": "the world"} - priv := map[string]nnfv1alpha3.NnfNodeECPrivateData{ + elem1 := nnfv1alpha4.NnfNodeECPrivateData{"element1": "the world"} + priv := map[string]nnfv1alpha4.NnfNodeECPrivateData{ "thing1": elem1, } - src := &nnfv1alpha3.NnfNodeECData{ + src := &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Status: nnfv1alpha3.NnfNodeECDataStatus{ + Status: nnfv1alpha4.NnfNodeECDataStatus{ Data: priv, }, } @@ -529,13 +529,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeECData should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeECData{ + src := &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfNodeECData")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfNodeECData")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -546,14 +546,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeStorage should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeStorage{ + src := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfNodeStorageSpec{ + Spec: nnfv1alpha4.NnfNodeStorageSpec{ UserID: 4997, GroupID: 2112, FileSystemType: "gfs2", @@ -576,13 +576,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfNodeStorage should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeStorage{ + src := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfNodeStorage")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfNodeStorage")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -593,14 +593,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfPortManager should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfPortManager{ + src := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfPortManagerSpec{ + Spec: nnfv1alpha4.NnfPortManagerSpec{ SystemConfiguration: corev1.ObjectReference{ Namespace: "willy-wonka", Name: "candy-land", @@ -623,13 +623,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfPortManager should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfPortManager{ + src := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfPortManager")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfPortManager")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -640,14 +640,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfStorage should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfStorage{ + src := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfStorageSpec{ + Spec: nnfv1alpha4.NnfStorageSpec{ FileSystemType: "gfs2", UserID: 4004, GroupID: 2992, @@ -670,13 +670,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfStorage should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfStorage{ + src := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfStorage")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfStorage")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -687,15 +687,15 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfStorageProfile should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfStorageProfile{ + src := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Data: nnfv1alpha3.NnfStorageProfileData{ - LustreStorage: nnfv1alpha3.NnfStorageProfileLustreData{ + Data: nnfv1alpha4.NnfStorageProfileData{ + LustreStorage: nnfv1alpha4.NnfStorageProfileLustreData{ ExternalMGS: "kfi@1:this@that", }, }, @@ -715,13 +715,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfStorageProfile should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfStorageProfile{ + src := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfStorageProfile")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfStorageProfile")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -732,14 +732,14 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfSystemStorage should write source object to destination", func(*testing.T) { - src := &nnfv1alpha3.NnfSystemStorage{ + src := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", Labels: map[string]string{ "label1": "", }, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{ + Spec: nnfv1alpha4.NnfSystemStorageSpec{ ClientMountPath: "/on/this", }, } @@ -758,13 +758,13 @@ func TestMarshalData(t *testing.T) { }) t.Run("NnfSystemStorage should append the annotation", func(*testing.T) { - src := &nnfv1alpha3.NnfSystemStorage{ + src := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, } dst := &unstructured.Unstructured{} - dst.SetGroupVersionKind(nnfv1alpha3.GroupVersion.WithKind("NnfSystemStorage")) + dst.SetGroupVersionKind(nnfv1alpha4.GroupVersion.WithKind("NnfSystemStorage")) dst.SetName("test-1") dst.SetAnnotations(map[string]string{ "annotation": "1", @@ -781,7 +781,7 @@ func TestUnmarshalData(t *testing.T) { g := NewWithT(t) t.Run("NnfAccess should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfAccess{ + src := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -803,7 +803,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfAccess{ + dst := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -828,7 +828,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfAccess{ + dst := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -843,7 +843,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfContainerProfile should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfContainerProfile{ + src := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -865,7 +865,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfContainerProfile{ + dst := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -890,7 +890,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfContainerProfile{ + dst := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -905,7 +905,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfDataMovement should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovement{ + src := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -927,7 +927,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovement{ + dst := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -952,7 +952,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovement{ + dst := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -967,7 +967,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfDataMovementManager should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementManager{ + src := &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -989,7 +989,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovementManager{ + dst := &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1014,7 +1014,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovementManager{ + dst := &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1029,7 +1029,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfDataMovementProfile should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfDataMovementProfile{ + src := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1051,7 +1051,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovementProfile{ + dst := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1076,7 +1076,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfDataMovementProfile{ + dst := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1091,7 +1091,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfLustreMGT should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfLustreMGT{ + src := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1113,7 +1113,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfLustreMGT{ + dst := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1138,7 +1138,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfLustreMGT{ + dst := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1153,7 +1153,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfNode should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfNode{ + src := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1175,7 +1175,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNode{ + dst := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1200,7 +1200,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNode{ + dst := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1215,7 +1215,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfNodeBlockStorage should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeBlockStorage{ + src := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1237,7 +1237,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeBlockStorage{ + dst := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1262,7 +1262,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeBlockStorage{ + dst := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1277,7 +1277,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfNodeECData should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeECData{ + src := &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1299,7 +1299,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeECData{ + dst := &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1324,7 +1324,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeECData{ + dst := &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1339,7 +1339,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfNodeStorage should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfNodeStorage{ + src := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1361,7 +1361,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeStorage{ + dst := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1386,7 +1386,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfNodeStorage{ + dst := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1401,7 +1401,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfPortManager should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfPortManager{ + src := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1423,7 +1423,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfPortManager{ + dst := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1448,7 +1448,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfPortManager{ + dst := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1463,7 +1463,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfStorage should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfStorage{ + src := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1485,7 +1485,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfStorage{ + dst := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1510,7 +1510,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfStorage{ + dst := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1525,7 +1525,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfStorageProfile should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfStorageProfile{ + src := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1547,7 +1547,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfStorageProfile{ + dst := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1572,7 +1572,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfStorageProfile{ + dst := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1587,7 +1587,7 @@ func TestUnmarshalData(t *testing.T) { }) t.Run("NnfSystemStorage should return false without errors if annotation doesn't exist", func(*testing.T) { - src := &nnfv1alpha3.NnfSystemStorage{ + src := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1609,7 +1609,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfSystemStorage{ + dst := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, @@ -1634,7 +1634,7 @@ func TestUnmarshalData(t *testing.T) { DataAnnotation: "{\"metadata\":{\"name\":\"test-1\",\"creationTimestamp\":null,\"labels\":{\"label1\":\"\"}},\"spec\":{},\"status\":{}}", }) - dst := &nnfv1alpha3.NnfSystemStorage{ + dst := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "test-1", }, diff --git a/go.mod b/go.mod index edb41aea4..cca0a9e9e 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/DataWorkflowServices/dws v0.0.1-0.20241029172011-d5898d0b8640 - github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240925185149-26d9d6071a1c - github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241017152925-afc4d0cf1a4b + github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec + github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v1.4.1 github.com/google/go-cmp v0.6.0 diff --git a/go.sum b/go.sum index 7bb263ea8..057bebf05 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,10 @@ github.com/DataWorkflowServices/dws v0.0.1-0.20241029172011-d5898d0b8640 h1:JSjg github.com/DataWorkflowServices/dws v0.0.1-0.20241029172011-d5898d0b8640/go.mod h1:6MrEEHISskyooSKcKU6R3mFqH6Yh6KzWgajhcw2s+nM= github.com/HewlettPackard/structex v1.0.4 h1:RVTdN5FWhDWr1IkjllU8wxuLjISo4gr6u5ryZpzyHcA= github.com/HewlettPackard/structex v1.0.4/go.mod h1:3frC4RY/cPsP/4+N8rkxsNAGlQwHV+zDC7qvrN+N+rE= -github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240925185149-26d9d6071a1c h1:fSuMz3j8UzlYZI59Ded8XuUjYd7C5IyLB55jwgSTIew= -github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240925185149-26d9d6071a1c/go.mod h1:3wENUqk1b7V0q5L5kNQ2ZE3z/NywL4sqXqVYolsiJ94= -github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241017152925-afc4d0cf1a4b h1:Foz6dsOk49tPimuKOxHAijX2BPuLxLH3Z+IegBMKHsU= -github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241017152925-afc4d0cf1a4b/go.mod h1:oxdwMqfttOF9dabJhqrWlirCnMk8/8eyLMwl+hducjk= +github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec h1:LPeWeG5xeqixm1YfE26jY5mbhFS8jNkErrI+WmQLFgg= +github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec/go.mod h1:3JGfBMIfipAZbbAAesSvKzGmKGAh2Wu6pPGQWMP2f8w= +github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d h1:s+zaQp8959Z1KjAo/zRP05CRJUrHTKx2ItbR4C3ffQw= +github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d/go.mod h1:oxdwMqfttOF9dabJhqrWlirCnMk8/8eyLMwl+hducjk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= diff --git a/internal/controller/conversion_test.go b/internal/controller/conversion_test.go index 3361ac2ea..a72b9800f 100644 --- a/internal/controller/conversion_test.go +++ b/internal/controller/conversion_test.go @@ -30,9 +30,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1" nnfv1alpha2 "github.com/NearNodeFlash/nnf-sos/api/v1alpha2" 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" ) @@ -47,16 +47,16 @@ var _ = Describe("Conversion Webhook Test", func() { // have that annotation when it is accessed by its hub API. Context("NnfAccess", func() { - var resHub *nnfv1alpha3.NnfAccess + var resHub *nnfv1alpha4.NnfAccess BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfAccess{ + resHub = &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfAccessSpec{ + Spec: nnfv1alpha4.NnfAccessSpec{ DesiredState: "mounted", TeardownState: "Teardown", Target: "all", @@ -71,22 +71,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfAccess{} + expected := &nnfv1alpha4.NnfAccess{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfAccess resource via spoke v1alpha1", func() { + It("reads NnfAccess resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfAccess{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfAccess{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfAccess resource via hub and via spoke v1alpha2", func() { + It("reads NnfAccess resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfAccess{} + resSpoke := &nnfv1alpha3.NnfAccess{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -106,16 +118,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfContainerProfile", func() { - var resHub *nnfv1alpha3.NnfContainerProfile + var resHub *nnfv1alpha4.NnfContainerProfile BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfContainerProfile{ + resHub = &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Data: nnfv1alpha3.NnfContainerProfileData{ + Data: nnfv1alpha4.NnfContainerProfileData{ Spec: &corev1.PodSpec{ NodeName: "rabbit-1", Containers: []corev1.Container{{Name: "one"}}, @@ -129,22 +141,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfContainerProfile{} + expected := &nnfv1alpha4.NnfContainerProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfContainerProfile resource via spoke v1alpha1", func() { + It("reads NnfContainerProfile resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfContainerProfile{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfContainerProfile{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfContainerProfile resource via hub and via spoke v1alpha2", func() { + It("reads NnfContainerProfile resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfContainerProfile{} + resSpoke := &nnfv1alpha3.NnfContainerProfile{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -164,16 +188,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfDataMovement", func() { - var resHub *nnfv1alpha3.NnfDataMovement + var resHub *nnfv1alpha4.NnfDataMovement BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfDataMovement{ + resHub = &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfDataMovementSpec{}, + Spec: nnfv1alpha4.NnfDataMovementSpec{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -182,22 +206,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfDataMovement{} + expected := &nnfv1alpha4.NnfDataMovement{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfDataMovement resource via spoke v1alpha1", func() { + It("reads NnfDataMovement resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfDataMovement{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfDataMovement{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfDataMovement resource via hub and via spoke v1alpha2", func() { + It("reads NnfDataMovement resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfDataMovement{} + resSpoke := &nnfv1alpha3.NnfDataMovement{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -217,16 +253,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfDataMovementManager", func() { - var resHub *nnfv1alpha3.NnfDataMovementManager + var resHub *nnfv1alpha4.NnfDataMovementManager BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfDataMovementManager{ + resHub = &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfDataMovementManagerSpec{ + Spec: nnfv1alpha4.NnfDataMovementManagerSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{{ @@ -244,22 +280,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfDataMovementManager{} + expected := &nnfv1alpha4.NnfDataMovementManager{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfDataMovementManager resource via spoke v1alpha1", func() { + It("reads NnfDataMovementManager resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfDataMovementManager{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfDataMovementManager{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfDataMovementManager resource via hub and via spoke v1alpha2", func() { + It("reads NnfDataMovementManager resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfDataMovementManager{} + resSpoke := &nnfv1alpha3.NnfDataMovementManager{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -279,16 +327,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfDataMovementProfile", func() { - var resHub *nnfv1alpha3.NnfDataMovementProfile + var resHub *nnfv1alpha4.NnfDataMovementProfile BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfDataMovementProfile{ + resHub = &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Data: nnfv1alpha3.NnfDataMovementProfileData{}, + Data: nnfv1alpha4.NnfDataMovementProfileData{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -297,22 +345,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfDataMovementProfile{} + expected := &nnfv1alpha4.NnfDataMovementProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfDataMovementProfile resource via spoke v1alpha1", func() { + It("reads NnfDataMovementProfile resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfDataMovementProfile{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfDataMovementProfile{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfDataMovementProfile resource via hub and via spoke v1alpha2", func() { + It("reads NnfDataMovementProfile resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfDataMovementProfile{} + resSpoke := &nnfv1alpha3.NnfDataMovementProfile{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -332,16 +392,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfLustreMGT", func() { - var resHub *nnfv1alpha3.NnfLustreMGT + var resHub *nnfv1alpha4.NnfLustreMGT BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfLustreMGT{ + resHub = &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{"rabbit-1@tcp", "rabbit-2@tcp"}, }, } @@ -352,22 +412,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfLustreMGT{} + expected := &nnfv1alpha4.NnfLustreMGT{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfLustreMGT resource via spoke v1alpha1", func() { + It("reads NnfLustreMGT resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfLustreMGT{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfLustreMGT{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfLustreMGT resource via hub and via spoke v1alpha2", func() { + It("reads NnfLustreMGT resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfLustreMGT{} + resSpoke := &nnfv1alpha3.NnfLustreMGT{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -387,16 +459,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfNode", func() { - var resHub *nnfv1alpha3.NnfNode + var resHub *nnfv1alpha4.NnfNode BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfNode{ + resHub = &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfNodeSpec{ + Spec: nnfv1alpha4.NnfNodeSpec{ State: "Enable", }, } @@ -407,22 +479,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfNode{} + expected := &nnfv1alpha4.NnfNode{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfNode resource via spoke v1alpha1", func() { + It("reads NnfNode resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfNode{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfNode{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfNode resource via hub and via spoke v1alpha2", func() { + It("reads NnfNode resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfNode{} + resSpoke := &nnfv1alpha3.NnfNode{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -442,16 +526,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfNodeBlockStorage", func() { - var resHub *nnfv1alpha3.NnfNodeBlockStorage + var resHub *nnfv1alpha4.NnfNodeBlockStorage BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfNodeBlockStorage{ + resHub = &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfNodeBlockStorageSpec{}, + Spec: nnfv1alpha4.NnfNodeBlockStorageSpec{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -460,22 +544,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfNodeBlockStorage{} + expected := &nnfv1alpha4.NnfNodeBlockStorage{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfNodeBlockStorage resource via spoke v1alpha1", func() { + It("reads NnfNodeBlockStorage resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfNodeBlockStorage{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfNodeBlockStorage{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfNodeBlockStorage resource via hub and via spoke v1alpha2", func() { + It("reads NnfNodeBlockStorage resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfNodeBlockStorage{} + resSpoke := &nnfv1alpha3.NnfNodeBlockStorage{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -495,16 +591,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfNodeECData", func() { - var resHub *nnfv1alpha3.NnfNodeECData + var resHub *nnfv1alpha4.NnfNodeECData BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfNodeECData{ + resHub = &nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfNodeECDataSpec{}, + Spec: nnfv1alpha4.NnfNodeECDataSpec{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -513,22 +609,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfNodeECData{} + expected := &nnfv1alpha4.NnfNodeECData{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfNodeECData resource via spoke v1alpha1", func() { + It("reads NnfNodeECData resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfNodeECData{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfNodeECData{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfNodeECData resource via hub and via spoke v1alpha2", func() { + It("reads NnfNodeECData resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfNodeECData{} + resSpoke := &nnfv1alpha3.NnfNodeECData{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -548,16 +656,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfNodeStorage", func() { - var resHub *nnfv1alpha3.NnfNodeStorage + var resHub *nnfv1alpha4.NnfNodeStorage BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfNodeStorage{ + resHub = &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfNodeStorageSpec{}, + Spec: nnfv1alpha4.NnfNodeStorageSpec{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -566,22 +674,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfNodeStorage{} + expected := &nnfv1alpha4.NnfNodeStorage{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfNodeStorage resource via spoke v1alpha1", func() { + It("reads NnfNodeStorage resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfNodeStorage{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfNodeStorage{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfNodeStorage resource via hub and via spoke v1alpha2", func() { + It("reads NnfNodeStorage resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfNodeStorage{} + resSpoke := &nnfv1alpha3.NnfNodeStorage{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -601,17 +721,17 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfPortManager", func() { - var resHub *nnfv1alpha3.NnfPortManager + var resHub *nnfv1alpha4.NnfPortManager BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfPortManager{ + resHub = &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfPortManagerSpec{ - Allocations: make([]nnfv1alpha3.NnfPortManagerAllocationSpec, 0), + Spec: nnfv1alpha4.NnfPortManagerSpec{ + Allocations: make([]nnfv1alpha4.NnfPortManagerAllocationSpec, 0), }, } @@ -621,22 +741,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfPortManager{} + expected := &nnfv1alpha4.NnfPortManager{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfPortManager resource via spoke v1alpha1", func() { + It("reads NnfPortManager resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfPortManager{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfPortManager{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfPortManager resource via hub and via spoke v1alpha2", func() { + It("reads NnfPortManager resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfPortManager{} + resSpoke := &nnfv1alpha3.NnfPortManager{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -656,17 +788,17 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfStorage", func() { - var resHub *nnfv1alpha3.NnfStorage + var resHub *nnfv1alpha4.NnfStorage BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfStorage{ + resHub = &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfStorageSpec{ - AllocationSets: []nnfv1alpha3.NnfStorageAllocationSetSpec{}, + Spec: nnfv1alpha4.NnfStorageSpec{ + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{}, }, } @@ -676,22 +808,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfStorage{} + expected := &nnfv1alpha4.NnfStorage{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfStorage resource via spoke v1alpha1", func() { + It("reads NnfStorage resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfStorage{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfStorage{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfStorage resource via hub and via spoke v1alpha2", func() { + It("reads NnfStorage resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfStorage{} + resSpoke := &nnfv1alpha3.NnfStorage{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -711,16 +855,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfStorageProfile", func() { - var resHub *nnfv1alpha3.NnfStorageProfile + var resHub *nnfv1alpha4.NnfStorageProfile BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfStorageProfile{ + resHub = &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Data: nnfv1alpha3.NnfStorageProfileData{}, + Data: nnfv1alpha4.NnfStorageProfileData{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -729,22 +873,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfStorageProfile{} + expected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfStorageProfile resource via spoke v1alpha1", func() { + It("reads NnfStorageProfile resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfStorageProfile{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfStorageProfile{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfStorageProfile resource via hub and via spoke v1alpha2", func() { + It("reads NnfStorageProfile resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfStorageProfile{} + resSpoke := &nnfv1alpha3.NnfStorageProfile{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() @@ -764,16 +920,16 @@ var _ = Describe("Conversion Webhook Test", func() { }) Context("NnfSystemStorage", func() { - var resHub *nnfv1alpha3.NnfSystemStorage + var resHub *nnfv1alpha4.NnfSystemStorage BeforeEach(func() { id := uuid.NewString()[0:8] - resHub = &nnfv1alpha3.NnfSystemStorage{ + resHub = &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: id, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{}, + Spec: nnfv1alpha4.NnfSystemStorageSpec{}, } Expect(k8sClient.Create(context.TODO(), resHub)).To(Succeed()) @@ -782,22 +938,34 @@ var _ = Describe("Conversion Webhook Test", func() { AfterEach(func() { if resHub != nil { Expect(k8sClient.Delete(context.TODO(), resHub)).To(Succeed()) - expected := &nnfv1alpha3.NnfSystemStorage{} + expected := &nnfv1alpha4.NnfSystemStorage{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present. return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), expected) }).ShouldNot(Succeed()) } }) - It("is unable to read NnfSystemStorage resource via spoke v1alpha1", func() { + It("reads NnfSystemStorage resource via hub and via spoke v1alpha2", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha1.NnfSystemStorage{} - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).ToNot(Succeed()) + resSpoke := &nnfv1alpha2.NnfSystemStorage{} + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) + anno := resSpoke.GetAnnotations() + g.Expect(anno).To(HaveLen(1)) + g.Expect(anno).Should(HaveKey(utilconversion.DataAnnotation)) + }).Should(Succeed()) + + // Hub should not have annotation. + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resHub)).To(Succeed()) + anno := resHub.GetAnnotations() + g.Expect(anno).To(HaveLen(0)) + }).Should(Succeed()) }) - It("reads NnfSystemStorage resource via hub and via spoke v1alpha2", func() { + It("reads NnfSystemStorage resource via hub and via spoke v1alpha3", func() { // Spoke should have annotation. - resSpoke := &nnfv1alpha2.NnfSystemStorage{} + resSpoke := &nnfv1alpha3.NnfSystemStorage{} Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(resHub), resSpoke)).To(Succeed()) anno := resSpoke.GetAnnotations() diff --git a/internal/controller/directivebreakdown_controller.go b/internal/controller/directivebreakdown_controller.go index fd3e1dfa2..437c94962 100644 --- a/internal/controller/directivebreakdown_controller.go +++ b/internal/controller/directivebreakdown_controller.go @@ -43,7 +43,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/dwdparse" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -624,7 +624,7 @@ func populateStorageAllocationSet(a *dwsv1alpha2.StorageAllocationSet, strategy func (r *DirectiveBreakdownReconciler) SetupWithManager(mgr ctrl.Manager) error { r.ChildObjects = []dwsv1alpha2.ObjectList{ &dwsv1alpha2.ServersList{}, - &nnfv1alpha3.NnfStorageProfileList{}, + &nnfv1alpha4.NnfStorageProfileList{}, &dwsv1alpha2.PersistentStorageInstanceList{}, } @@ -634,6 +634,6 @@ func (r *DirectiveBreakdownReconciler) SetupWithManager(mgr ctrl.Manager) error For(&dwsv1alpha2.DirectiveBreakdown{}). Owns(&dwsv1alpha2.Servers{}). Owns(&dwsv1alpha2.PersistentStorageInstance{}). - Owns(&nnfv1alpha3.NnfStorageProfile{}). + Owns(&nnfv1alpha4.NnfStorageProfile{}). Complete(r) } diff --git a/internal/controller/directivebreakdown_controller_test.go b/internal/controller/directivebreakdown_controller_test.go index e489f6902..1600b310d 100644 --- a/internal/controller/directivebreakdown_controller_test.go +++ b/internal/controller/directivebreakdown_controller_test.go @@ -30,12 +30,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("DirectiveBreakdown test", func() { var ( - storageProfile *nnfv1alpha3.NnfStorageProfile + storageProfile *nnfv1alpha4.NnfStorageProfile ) BeforeEach(func() { @@ -45,7 +45,7 @@ var _ = Describe("DirectiveBreakdown test", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) @@ -81,7 +81,7 @@ var _ = Describe("DirectiveBreakdown test", func() { return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(servers), servers) }).Should(Succeed(), "Create the DWS Servers Resource") - pinnedStorageProfile := &nnfv1alpha3.NnfStorageProfile{ + pinnedStorageProfile := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: directiveBreakdown.GetName(), Namespace: directiveBreakdown.GetNamespace(), diff --git a/internal/controller/dws_servers_controller.go b/internal/controller/dws_servers_controller.go index 5a6019310..163db61ec 100644 --- a/internal/controller/dws_servers_controller.go +++ b/internal/controller/dws_servers_controller.go @@ -42,7 +42,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -170,7 +170,7 @@ func (r *DWSServersReconciler) updateCapacityUsed(ctx context.Context, servers * // Get the NnfStorage with the same name/namespace as the servers resource. It may not exist // yet if we're still in proposal phase, or if it was deleted in teardown. - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, types.NamespacedName{Name: servers.Name, Namespace: servers.Namespace}, nnfStorage); err != nil { if apierrors.IsNotFound(err) { return r.statusSetEmpty(ctx, servers) @@ -222,13 +222,13 @@ func (r *DWSServersReconciler) updateCapacityUsed(ctx context.Context, servers * // Loop through the nnfNodeStorages corresponding to each of the Rabbit nodes and find matchLabels := dwsv1alpha2.MatchingOwner(nnfStorage) - matchLabels[nnfv1alpha3.AllocationSetLabel] = label + matchLabels[nnfv1alpha4.AllocationSetLabel] = label listOptions := []client.ListOption{ matchLabels, } - nnfNodeBlockStorageList := &nnfv1alpha3.NnfNodeBlockStorageList{} + nnfNodeBlockStorageList := &nnfv1alpha4.NnfNodeBlockStorageList{} if err := r.List(ctx, nnfNodeBlockStorageList, listOptions...); err != nil { return ctrl.Result{}, err } @@ -363,7 +363,7 @@ func (r *DWSServersReconciler) checkDeletedStorage(ctx context.Context, servers log := r.Log.WithValues("Servers", types.NamespacedName{Name: servers.Name, Namespace: servers.Namespace}) // Get the NnfStorage with the same name/namespace as the servers resource - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, types.NamespacedName{Name: servers.Name, Namespace: servers.Namespace}, nnfStorage); err != nil { if apierrors.IsNotFound(err) { log.Info("NnfStorage is deleted") @@ -394,6 +394,6 @@ func (r *DWSServersReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). For(&dwsv1alpha2.Servers{}). - Watches(&nnfv1alpha3.NnfStorage{}, handler.EnqueueRequestsFromMapFunc(nnfStorageServersMapFunc)). + Watches(&nnfv1alpha4.NnfStorage{}, handler.EnqueueRequestsFromMapFunc(nnfStorageServersMapFunc)). Complete(r) } diff --git a/internal/controller/dws_storage_controller.go b/internal/controller/dws_storage_controller.go index bdfae142f..787d33e0a 100644 --- a/internal/controller/dws_storage_controller.go +++ b/internal/controller/dws_storage_controller.go @@ -38,7 +38,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) type DWSStorageReconciler struct { @@ -103,7 +103,7 @@ func (r *DWSStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) } // Ensure the storage resource is updated with the latest NNF Node resource status - nnfNode := &nnfv1alpha3.NnfNode{ + nnfNode := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: storage.GetName(), @@ -155,7 +155,7 @@ func (r *DWSStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) device.Slot = drive.Slot device.Status = drive.Status.ConvertToDWSResourceStatus() - if drive.Status == nnfv1alpha3.ResourceReady { + if drive.Status == nnfv1alpha4.ResourceReady { wearLevel := drive.WearLevel device.Model = drive.Model device.SerialNumber = drive.SerialNumber @@ -273,7 +273,7 @@ func (r *DWSStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&dwsv1alpha2.Storage{}). - Watches(&nnfv1alpha3.NnfNode{}, handler.EnqueueRequestsFromMapFunc(nnfNodeMapFunc)). + Watches(&nnfv1alpha4.NnfNode{}, handler.EnqueueRequestsFromMapFunc(nnfNodeMapFunc)). Watches(&corev1.Node{}, handler.EnqueueRequestsFromMapFunc(nodeMapFunc)). Complete(r) } diff --git a/internal/controller/filesystem_helpers.go b/internal/controller/filesystem_helpers.go index aafc352e8..169a40ce1 100644 --- a/internal/controller/filesystem_helpers.go +++ b/internal/controller/filesystem_helpers.go @@ -35,21 +35,36 @@ import ( "github.com/go-logr/logr" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) //+kubebuilder:rbac:groups=nnf.cray.hpe.com,resources=nnfnodestorages,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=nnf.cray.hpe.com,resources=nnfnodestorages/finalizers,verbs=update //+kubebuilder:rbac:groups=nnf.cray.hpe.com,resources=nnfstorageprofiles,verbs=get;create;list;watch;update;patch;delete;deletecollection -func getBlockDeviceAndFileSystemForKind(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, filesystem.FileSystem, error) { +func getBlockDeviceAndFileSystemForMock(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, filesystem.FileSystem, error) { blockDevice, err := newMockBlockDevice(ctx, c, nnfNodeStorage, index, log) if err != nil { return nil, nil, dwsv1alpha2.NewResourceError("could not create mock block device").WithError(err).WithMajor() } - fileSystem, err := newMockFileSystem(ctx, c, nnfNodeStorage, blockDevice, index, log) + fileSystem, err := newMockFileSystem(nnfNodeStorage, index, log) + if err != nil { + return nil, nil, dwsv1alpha2.NewResourceError("could not create mock file system").WithError(err).WithMajor() + } + + return blockDevice, fileSystem, nil +} + +func getBlockDeviceAndFileSystemForKind(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, filesystem.FileSystem, error) { + + blockDevice, err := newMockBlockDevice(ctx, c, nnfNodeStorage, index, log) + if err != nil { + return nil, nil, dwsv1alpha2.NewResourceError("could not create mock block device").WithError(err).WithMajor() + } + + fileSystem, err := newKindFileSystem(nnfNodeStorage, index, log) if err != nil { return nil, nil, dwsv1alpha2.NewResourceError("could not create mock file system").WithError(err).WithMajor() } @@ -58,9 +73,12 @@ func getBlockDeviceAndFileSystemForKind(ctx context.Context, c client.Client, nn } // getBlockDeviceAndFileSystem returns blockdevice and filesystem interfaces based on the allocation type and NnfStorageProfile. -func getBlockDeviceAndFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, filesystem.FileSystem, error) { - _, found := os.LookupEnv("NNF_TEST_ENVIRONMENT") - if found || os.Getenv("ENVIRONMENT") == "kind" { +func getBlockDeviceAndFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, filesystem.FileSystem, error) { + if _, found := os.LookupEnv("NNF_TEST_ENVIRONMENT"); found { + return getBlockDeviceAndFileSystemForMock(ctx, c, nnfNodeStorage, index, log) + + } + if os.Getenv("ENVIRONMENT") == "kind" { return getBlockDeviceAndFileSystemForKind(ctx, c, nnfNodeStorage, index, log) } @@ -107,21 +125,17 @@ func getBlockDeviceAndFileSystem(ctx context.Context, c client.Client, nnfNodeSt return blockDevice, fileSystem, nil case "lustre": - commandLines := nnfv1alpha3.NnfStorageProfileLustreCmdLines{} + var commandLines nnfv1alpha4.NnfStorageProfileLustreCmdLines switch nnfNodeStorage.Spec.LustreStorage.TargetType { case "mgt": commandLines = nnfStorageProfile.Data.LustreStorage.MgtCmdLines - break case "mgtmdt": commandLines = nnfStorageProfile.Data.LustreStorage.MgtMdtCmdLines - break case "mdt": commandLines = nnfStorageProfile.Data.LustreStorage.MdtCmdLines - break case "ost": commandLines = nnfStorageProfile.Data.LustreStorage.OstCmdLines - break default: return nil, nil, dwsv1alpha2.NewResourceError("invalid Lustre target type %s", nnfNodeStorage.Spec.LustreStorage.TargetType).WithFatal() } @@ -151,7 +165,7 @@ func getBlockDeviceAndFileSystem(ctx context.Context, c client.Client, nnfNodeSt return nil, nil, dwsv1alpha2.NewResourceError("unsupported file system type %s", nnfNodeStorage.Spec.FileSystemType).WithMajor() } -func isNodeBlockStorageCurrent(ctx context.Context, c client.Client, nnfNodeBlockStorage *nnfv1alpha3.NnfNodeBlockStorage) (bool, error) { +func isNodeBlockStorageCurrent(ctx context.Context, c client.Client, nnfNodeBlockStorage *nnfv1alpha4.NnfNodeBlockStorage) (bool, error) { if _, found := os.LookupEnv("NNF_TEST_ENVIRONMENT"); found { return true, nil } @@ -188,15 +202,15 @@ func isNodeBlockStorageCurrent(ctx context.Context, c client.Client, nnfNodeBloc return false, nil } -func newZpoolBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileLustreCmdLines, index int, log logr.Logger) (blockdevice.BlockDevice, error) { +func newZpoolBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileLustreCmdLines, index int, log logr.Logger) (blockdevice.BlockDevice, error) { zpool := blockdevice.Zpool{} // This is for the fake NnfNodeStorage case. We don't need to create the zpool BlockDevice - if nnfNodeStorage.Spec.BlockReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfNodeBlockStorage{}).Name() { + if nnfNodeStorage.Spec.BlockReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfNodeBlockStorage{}).Name() { return newMockBlockDevice(ctx, c, nnfNodeStorage, index, log) } - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{ + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorage.GetName(), Namespace: nnfNodeStorage.GetNamespace(), @@ -207,7 +221,7 @@ func newZpoolBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *n return nil, dwsv1alpha2.NewResourceError("could not get NnfNodeBlockStorage: %v", client.ObjectKeyFromObject(nnfNodeBlockStorage)).WithError(err).WithUserMessage("could not find storage allocation").WithMajor() } - if nnfNodeBlockStorage.Status.Ready == false { + if !nnfNodeBlockStorage.Status.Ready { return nil, dwsv1alpha2.NewResourceError("NnfNodeBlockStorage: %v not ready", client.ObjectKeyFromObject(nnfNodeBlockStorage)) } @@ -237,7 +251,7 @@ func newZpoolBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *n return &zpool, nil } -func newLvmBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileCmdLines, index int, log logr.Logger) (blockdevice.BlockDevice, error) { +func newLvmBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileCmdLines, index int, log logr.Logger) (blockdevice.BlockDevice, error) { lvmDesc := blockdevice.Lvm{} devices := []string{} @@ -246,8 +260,8 @@ func newLvmBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnf blockIndex = 0 } - if nnfNodeStorage.Spec.BlockReference.Kind == reflect.TypeOf(nnfv1alpha3.NnfNodeBlockStorage{}).Name() { - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{ + if nnfNodeStorage.Spec.BlockReference.Kind == reflect.TypeOf(nnfv1alpha4.NnfNodeBlockStorage{}).Name() { + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorage.GetName(), Namespace: nnfNodeStorage.GetNamespace(), @@ -259,7 +273,7 @@ func newLvmBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnf return nil, dwsv1alpha2.NewResourceError("could not get NnfNodeBlockStorage: %v", client.ObjectKeyFromObject(nnfNodeBlockStorage)).WithError(err).WithUserMessage("could not find storage allocation").WithMajor() } - if nnfNodeBlockStorage.Status.Ready == false { + if !nnfNodeBlockStorage.Status.Ready { return nil, dwsv1alpha2.NewResourceError("NnfNodeBlockStorage: %v not ready", client.ObjectKeyFromObject(nnfNodeBlockStorage)) } @@ -330,7 +344,7 @@ func newLvmBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnf return &lvmDesc, nil } -func newMockBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, error) { +func newMockBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (blockdevice.BlockDevice, error) { blockDevice := blockdevice.MockBlockDevice{ Log: log, } @@ -338,7 +352,7 @@ func newMockBlockDevice(ctx context.Context, c client.Client, nnfNodeStorage *nn return &blockDevice, nil } -func newBindFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { +func newBindFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { fs := filesystem.SimpleFileSystem{} fs.Log = log @@ -348,8 +362,8 @@ func newBindFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnf fs.TempDir = fmt.Sprintf("/mnt/temp/%s-%d", nnfNodeStorage.Name, index) fs.CommandArgs.Mount = "-o bind $DEVICE $MOUNT_PATH" - fs.CommandArgs.PostActivate = cmdLines.PostActivate - fs.CommandArgs.PreDeactivate = cmdLines.PreDeactivate + fs.CommandArgs.PostMount = cmdLines.PostMount + fs.CommandArgs.PreUnmount = cmdLines.PreUnmount fs.CommandArgs.Vars = map[string]string{ "$USERID": fmt.Sprintf("%d", nnfNodeStorage.Spec.UserID), "$GROUPID": fmt.Sprintf("%d", nnfNodeStorage.Spec.GroupID), @@ -358,7 +372,7 @@ func newBindFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnf return &fs, nil } -func newGfs2FileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { +func newGfs2FileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { fs := filesystem.SimpleFileSystem{} fs.Log = log @@ -372,8 +386,8 @@ func newGfs2FileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnf } else { fs.CommandArgs.Mount = cmdLines.MountCompute } - fs.CommandArgs.PostActivate = cmdLines.PostActivate - fs.CommandArgs.PreDeactivate = cmdLines.PreDeactivate + fs.CommandArgs.PostMount = cmdLines.PostMount + fs.CommandArgs.PreUnmount = cmdLines.PreUnmount fs.CommandArgs.Mkfs = fmt.Sprintf("-O %s", cmdLines.Mkfs) fs.CommandArgs.Vars = map[string]string{ "$CLUSTER_NAME": nnfNodeStorage.Namespace, @@ -386,7 +400,7 @@ func newGfs2FileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnf return &fs, nil } -func newXfsFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { +func newXfsFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileCmdLines, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { fs := filesystem.SimpleFileSystem{} fs.Log = log @@ -400,8 +414,8 @@ func newXfsFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv } else { fs.CommandArgs.Mount = cmdLines.MountCompute } - fs.CommandArgs.PostActivate = cmdLines.PostActivate - fs.CommandArgs.PreDeactivate = cmdLines.PreDeactivate + fs.CommandArgs.PostMount = cmdLines.PostMount + fs.CommandArgs.PreUnmount = cmdLines.PreUnmount fs.CommandArgs.Mkfs = cmdLines.Mkfs fs.CommandArgs.Vars = map[string]string{ "$USERID": fmt.Sprintf("%d", nnfNodeStorage.Spec.UserID), @@ -411,7 +425,7 @@ func newXfsFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv return &fs, nil } -func newLustreFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, cmdLines nnfv1alpha3.NnfStorageProfileLustreCmdLines, mountCommand string, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { +func newLustreFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, cmdLines nnfv1alpha4.NnfStorageProfileLustreCmdLines, mountCommand string, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { fs := filesystem.LustreFileSystem{} targetPath, err := lustreTargetPath(ctx, c, nnfNodeStorage, nnfNodeStorage.Spec.LustreStorage.TargetType, nnfNodeStorage.Spec.LustreStorage.StartIndex+index) @@ -427,21 +441,31 @@ func newLustreFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *n fs.MgsAddress = nnfNodeStorage.Spec.LustreStorage.MgsAddress fs.Index = nnfNodeStorage.Spec.LustreStorage.StartIndex + index fs.BackFs = nnfNodeStorage.Spec.LustreStorage.BackFs - fs.CommandArgs.Mkfs = cmdLines.Mkfs fs.CommandArgs.MountTarget = cmdLines.MountTarget fs.CommandArgs.Mount = mountCommand fs.CommandArgs.PostActivate = cmdLines.PostActivate + fs.CommandArgs.PostMount = cmdLines.PostMount + fs.CommandArgs.PreUnmount = cmdLines.PreUnmount fs.CommandArgs.PreDeactivate = cmdLines.PreDeactivate + fs.TempDir = fmt.Sprintf("/mnt/temp/%s-%d", nnfNodeStorage.Name, index) + + components := nnfNodeStorage.Spec.LustreStorage.LustreComponents + fs.CommandArgs.Vars = map[string]string{ - "$USERID": fmt.Sprintf("%d", nnfNodeStorage.Spec.UserID), - "$GROUPID": fmt.Sprintf("%d", nnfNodeStorage.Spec.GroupID), + "$USERID": fmt.Sprintf("%d", nnfNodeStorage.Spec.UserID), + "$GROUPID": fmt.Sprintf("%d", nnfNodeStorage.Spec.GroupID), + "$NUM_MDTS": fmt.Sprintf("%d", len(components.MDTs)), + "$NUM_MGTS": fmt.Sprintf("%d", len(components.MGTs)), + "$NUM_MGTMDTS": fmt.Sprintf("%d", len(components.MGTMDTs)), + "$NUM_OSTS": fmt.Sprintf("%d", len(components.OSTs)), + "$NUM_NNFNODES": fmt.Sprintf("%d", len(components.NNFNodes)), } return &fs, nil } -func newMockFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, blockDevice blockdevice.BlockDevice, index int, log logr.Logger) (filesystem.FileSystem, error) { +func newMockFileSystem(nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (filesystem.FileSystem, error) { path := os.Getenv("MOCK_FILE_SYSTEM_PATH") if len(path) == 0 { path = "/mnt/filesystems" @@ -451,11 +475,24 @@ func newMockFileSystem(ctx context.Context, c client.Client, nnfNodeStorage *nnf Log: log, Path: fmt.Sprintf("/%s/%s-%d", path, nnfNodeStorage.GetName(), index), } + return &fs, nil +} + +func newKindFileSystem(nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int, log logr.Logger) (filesystem.FileSystem, error) { + path := os.Getenv("MOCK_FILE_SYSTEM_PATH") + if len(path) == 0 { + path = "/mnt/nnf" + } + fs := filesystem.KindFileSystem{ + Log: log, + Path: fmt.Sprintf("/%s/%s-%d", path, nnfNodeStorage.GetName(), index), + } return &fs, nil + } -func lustreTargetPath(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, targetType string, index int) (string, error) { +func lustreTargetPath(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, targetType string, index int) (string, error) { labels := nnfNodeStorage.GetLabels() // Use the NnfStorage UID since the NnfStorage exists for as long as the storage allocation exists. @@ -468,7 +505,7 @@ func lustreTargetPath(ctx context.Context, c client.Client, nnfNodeStorage *nnfv return fmt.Sprintf("/mnt/nnf/%s-%s-%d", nnfStorageUid, targetType, index), nil } -func zpoolName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, targetType string, index int) (string, error) { +func zpoolName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, targetType string, index int) (string, error) { labels := nnfNodeStorage.GetLabels() // Use the NnfStorage UID since the NnfStorage exists for as long as the storage allocation exists. @@ -481,7 +518,7 @@ func zpoolName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3 return fmt.Sprintf("pool-%s-%s-%d", nnfStorageUid, targetType, index), nil } -func volumeGroupName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int) (string, error) { +func volumeGroupName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int) (string, error) { labels := nnfNodeStorage.GetLabels() // Use the NnfStorage UID since the NnfStorage exists for as long as the storage allocation exists. @@ -490,7 +527,7 @@ func volumeGroupName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1 if !ok { return "", fmt.Errorf("missing Owner UID label on NnfNodeStorage") } - directiveIndex, ok := labels[nnfv1alpha3.DirectiveIndexLabel] + directiveIndex, ok := labels[nnfv1alpha4.DirectiveIndexLabel] if !ok { return "", fmt.Errorf("missing directive index label on NnfNodeStorage") } @@ -502,7 +539,7 @@ func volumeGroupName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1 return fmt.Sprintf("%s_%s_%d", nnfStorageUid, directiveIndex, index), nil } -func logicalVolumeName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int) (string, error) { +func logicalVolumeName(ctx context.Context, c client.Client, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int) (string, error) { if nnfNodeStorage.Spec.SharedAllocation { // For a shared VG, the LV name must be unique in the VG return fmt.Sprintf("lv-%d", index), nil diff --git a/internal/controller/integration_test.go b/internal/controller/integration_test.go index 2d1ee4d14..b36f0b022 100644 --- a/internal/controller/integration_test.go +++ b/internal/controller/integration_test.go @@ -42,7 +42,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" dwparse "github.com/DataWorkflowServices/dws/utils/dwdparse" lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("Integration Test", func() { @@ -62,9 +62,9 @@ var _ = Describe("Integration Test", func() { persistentInstance *dwsv1alpha2.PersistentStorageInstance nodeNames []string setup sync.Once - storageProfile *nnfv1alpha3.NnfStorageProfile - dmProfile *nnfv1alpha3.NnfDataMovementProfile - dmm *nnfv1alpha3.NnfDataMovementManager + storageProfile *nnfv1alpha4.NnfStorageProfile + dmProfile *nnfv1alpha4.NnfDataMovementProfile + dmm *nnfv1alpha4.NnfDataMovementManager ) advanceState := func(state dwsv1alpha2.WorkflowState, w *dwsv1alpha2.Workflow, testStackOffset int) { @@ -82,19 +82,22 @@ var _ = Describe("Integration Test", func() { }).WithOffset(testStackOffset).Should(Equal(state), fmt.Sprintf("Waiting on state %s", state)) } - verifyNnfNodeStoragesHaveStorageProfileLabel := func(nnfStorage *nnfv1alpha3.NnfStorage) { + verifyNnfNodeStoragesHaveStorageProfileLabel := func(nnfStorage *nnfv1alpha4.NnfStorage) { for allocationSetIndex := range nnfStorage.Spec.AllocationSets { allocationSet := nnfStorage.Spec.AllocationSets[allocationSetIndex] for i, node := range allocationSet.Nodes { // Per Rabbit namespace. - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{ + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorageName(nnfStorage, allocationSetIndex, i), Namespace: node.Name, }, } - Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(nnfNodeStorage), nnfNodeStorage)).To(Succeed()) + Eventually(func() error { + return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(nnfNodeStorage), nnfNodeStorage) + }).Should(Succeed()) + By("Verify that the NnfNodeStorage has a label for the pinned profile") _, err := getPinnedStorageProfileFromLabel(context.TODO(), k8sClient, nnfNodeStorage) Expect(err).ShouldNot(HaveOccurred()) @@ -138,14 +141,14 @@ var _ = Describe("Integration Test", func() { if findDataMovementDirectiveIndex() >= 0 { - dms := &nnfv1alpha3.NnfDataMovementList{} + dms := &nnfv1alpha4.NnfDataMovementList{} Expect(k8sClient.List(context.TODO(), dms)).To(Succeed()) for _, dm := range dms.Items { dm := dm g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(&dm), &dm)).To(Succeed()) - dm.Status.State = nnfv1alpha3.DataMovementConditionTypeFinished - dm.Status.Status = nnfv1alpha3.DataMovementConditionReasonSuccess + dm.Status.State = nnfv1alpha4.DataMovementConditionTypeFinished + dm.Status.Status = nnfv1alpha4.DataMovementConditionReasonSuccess g.Expect(k8sClient.Status().Update(context.TODO(), &dm)).To(Succeed()) } } @@ -164,7 +167,7 @@ var _ = Describe("Integration Test", func() { } By("Verify that the NnfStorage now owns the pinned profile") commonName, commonNamespace := getStorageReferenceNameFromWorkflowActual(w, dwIndex) - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: commonName, Namespace: commonNamespace}, nnfStorage)).To(Succeed()) Expect(verifyPinnedProfile(context.TODO(), k8sClient, commonNamespace, commonName)).WithOffset(testStackOffset).To(Succeed()) @@ -257,7 +260,7 @@ var _ = Describe("Integration Test", func() { BlockOwnerDeletion: &blockOwnerDeletion, } - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if nnfStoragePresent { Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(persistentInstance), nnfStorage)).To(Succeed(), "Fetch NnfStorage matching PersistentStorageInstance") Expect(nnfStorage.ObjectMeta.OwnerReferences).To(ContainElement(persistentStorageOwnerRef), "NnfStorage owned by PersistentStorageInstance") @@ -345,7 +348,7 @@ var _ = Describe("Integration Test", func() { ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Labels: map[string]string{ - nnfv1alpha3.RabbitNodeSelectorLabel: "true", + nnfv1alpha4.RabbitNodeSelectorLabel: "true", }, }, Status: corev1.NodeStatus{ @@ -361,16 +364,16 @@ var _ = Describe("Integration Test", func() { Expect(k8sClient.Create(context.TODO(), node)).To(Succeed()) // Create the NNF Node resource - nnfNode := &nnfv1alpha3.NnfNode{ + nnfNode := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: nodeName, }, - Spec: nnfv1alpha3.NnfNodeSpec{ + Spec: nnfv1alpha4.NnfNodeSpec{ Name: nodeName, - State: nnfv1alpha3.ResourceEnable, + State: nnfv1alpha4.ResourceEnable, }, - Status: nnfv1alpha3.NnfNodeStatus{}, + Status: nnfv1alpha4.NnfNodeStatus{}, } Expect(k8sClient.Create(context.TODO(), nnfNode)).To(Succeed()) @@ -422,26 +425,26 @@ var _ = Describe("Integration Test", func() { workflow = nil Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) Expect(k8sClient.Delete(context.TODO(), dmProfile)).To(Succeed()) - dmProfExpected := &nnfv1alpha3.NnfDataMovementProfile{} + dmProfExpected := &nnfv1alpha4.NnfDataMovementProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dmProfile), dmProfExpected) }).ShouldNot(Succeed()) for _, nodeName := range nodeNames { - nnfNode := &nnfv1alpha3.NnfNode{ + nnfNode := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: nodeName, }, } Expect(k8sClient.Delete(context.TODO(), nnfNode)).To(Succeed()) - tempNnfNode := &nnfv1alpha3.NnfNode{} + tempNnfNode := &nnfv1alpha4.NnfNode{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(nnfNode), tempNnfNode) }).ShouldNot(Succeed()) @@ -741,7 +744,7 @@ var _ = Describe("Integration Test", func() { Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: dbdRef.Name, Namespace: dbdRef.Namespace}, dbd)).To(Succeed()) By("Check for an NNF Access describing the computes") - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", dbd.Name, "computes"), Namespace: workflow.Namespace, @@ -783,9 +786,9 @@ var _ = Describe("Integration Test", func() { Expect(access.Spec.StorageReference).To(MatchFields(IgnoreExtras, Fields{ "Name": Equal(storageName), "Namespace": Equal(workflow.Namespace), // Namespace is the same as the workflow - "Kind": Equal(reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name()), + "Kind": Equal(reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name()), })) - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: access.Spec.StorageReference.Name, Namespace: access.Spec.StorageReference.Namespace, @@ -811,7 +814,7 @@ var _ = Describe("Integration Test", func() { // For shared file systems, there should also be a NNF Access for the Rabbit as well as corresponding Client Mounts per Rabbit if fsType == "gfs2" { By("Checking for an NNF Access describing the servers") - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", dbd.Name, "servers"), Namespace: workflow.Namespace, @@ -841,7 +844,7 @@ var _ = Describe("Integration Test", func() { Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: dbdRef.Name, Namespace: dbdRef.Namespace}, dbd)).To(Succeed()) By("Check that NNF Access describing computes is not present") - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", dbd.Name, "computes"), Namespace: workflow.Namespace, @@ -857,7 +860,7 @@ var _ = Describe("Integration Test", func() { if fsType == "gfs2" { By("Check that NNF Access describing computes is not present") - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%s", dbd.Name, "servers"), Namespace: workflow.Namespace, @@ -901,7 +904,7 @@ var _ = Describe("Integration Test", func() { Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: dbd.Status.Storage.Reference.Name, Namespace: dbd.Status.Storage.Reference.Namespace}, servers)).To(Succeed()) By("NNFStorages for persistentStorageInstance should NOT be deleted") - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} Consistently(func() error { return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(servers), nnfStorage) }).Should(Succeed(), "NnfStorage should continue to exist") @@ -916,7 +919,7 @@ var _ = Describe("Integration Test", func() { Expect(k8sClient.Get(context.TODO(), types.NamespacedName{Name: dbd.Status.Storage.Reference.Name, Namespace: dbd.Status.Storage.Reference.Namespace}, servers)).To(Succeed()) By("NNFStorages associated with jobdw should be deleted") - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(servers), nnfStorage) }).ShouldNot(Succeed(), "NnfStorage should be deleted") @@ -1009,7 +1012,7 @@ var _ = Describe("Integration Test", func() { BeforeEach(func() { ns := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: nnfv1alpha3.DataMovementNamespace, + Name: nnfv1alpha4.DataMovementNamespace, }, } @@ -1028,12 +1031,12 @@ var _ = Describe("Integration Test", func() { }, } - dmm = &nnfv1alpha3.NnfDataMovementManager{ + dmm = &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ - Name: nnfv1alpha3.DataMovementManagerName, - Namespace: nnfv1alpha3.DataMovementNamespace, + Name: nnfv1alpha4.DataMovementManagerName, + Namespace: nnfv1alpha4.DataMovementNamespace, }, - Spec: nnfv1alpha3.NnfDataMovementManagerSpec{ + Spec: nnfv1alpha4.NnfDataMovementManagerSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{{ @@ -1043,7 +1046,7 @@ var _ = Describe("Integration Test", func() { }, }, }, - Status: nnfv1alpha3.NnfDataMovementManagerStatus{ + Status: nnfv1alpha4.NnfDataMovementManagerStatus{ Ready: true, }, } @@ -1151,7 +1154,7 @@ var _ = Describe("Integration Test", func() { validateNnfAccessHasCorrectTeardownState := func(state dwsv1alpha2.WorkflowState) { Expect(workflow.Status.DirectiveBreakdowns).To(HaveLen(1)) - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d-%s", workflow.Name, 0, "servers"), Namespace: workflow.Namespace, @@ -1174,7 +1177,7 @@ var _ = Describe("Integration Test", func() { validateNnfAccessIsNotFound := func() { Expect(workflow.Status.DirectiveBreakdowns).To(HaveLen(1)) - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d-%s", workflow.Name, 0, "servers"), Namespace: workflow.Namespace, @@ -1278,15 +1281,15 @@ var _ = Describe("Integration Test", func() { By("Injecting an error in the data movement resource") - dm := &nnfv1alpha3.NnfDataMovement{ + dm := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: "failed-data-movement", - Namespace: nnfv1alpha3.DataMovementNamespace, + Namespace: nnfv1alpha4.DataMovementNamespace, }, } dwsv1alpha2.AddWorkflowLabels(dm, workflow) dwsv1alpha2.AddOwnerLabels(dm, workflow) - nnfv1alpha3.AddDataMovementTeardownStateLabel(dm, dwsv1alpha2.StatePostRun) + nnfv1alpha4.AddDataMovementTeardownStateLabel(dm, dwsv1alpha2.StatePostRun) Expect(k8sClient.Create(context.TODO(), dm)).To(Succeed()) @@ -1294,8 +1297,8 @@ var _ = Describe("Integration Test", func() { return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dm), dm) }).Should(Succeed()) - dm.Status.State = nnfv1alpha3.DataMovementConditionTypeFinished - dm.Status.Status = nnfv1alpha3.DataMovementConditionReasonFailed + dm.Status.State = nnfv1alpha4.DataMovementConditionTypeFinished + dm.Status.Status = nnfv1alpha4.DataMovementConditionReasonFailed Expect(k8sClient.Status().Update(context.TODO(), dm)).To(Succeed()) @@ -1324,7 +1327,7 @@ var _ = Describe("Integration Test", func() { Describe("Test with container directives", func() { var ( - containerProfile *nnfv1alpha3.NnfContainerProfile + containerProfile *nnfv1alpha4.NnfContainerProfile ) BeforeEach(func() { @@ -1395,7 +1398,7 @@ var _ = Describe("Integration Test", func() { By("verifying the number of targeted NNF nodes for the container jobs") matchLabels := dwsv1alpha2.MatchingWorkflow(workflow) - matchLabels[nnfv1alpha3.DirectiveIndexLabel] = "0" + matchLabels[nnfv1alpha4.DirectiveIndexLabel] = "0" jobList := &batchv1.JobList{} Eventually(func() int { @@ -1419,9 +1422,9 @@ var _ = Describe("Integration Test", func() { var ( intendedDirective string - profileExternalMGS *nnfv1alpha3.NnfStorageProfile - profileCombinedMGTMDT *nnfv1alpha3.NnfStorageProfile - nnfLustreMgt *nnfv1alpha3.NnfLustreMGT + profileExternalMGS *nnfv1alpha4.NnfStorageProfile + profileCombinedMGTMDT *nnfv1alpha4.NnfStorageProfile + nnfLustreMgt *nnfv1alpha4.NnfLustreMGT profileMgsNid string @@ -1452,13 +1455,13 @@ var _ = Describe("Integration Test", func() { Expect(createNnfStorageProfile(profileExternalMGS, true)).ToNot(BeNil()) Expect(createNnfStorageProfile(profileCombinedMGTMDT, true)).ToNot(BeNil()) - nnfLustreMgt = &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt = &nnfv1alpha4.NnfLustreMGT{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "profile-mgs", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{profileMgsNid}, FsNameStart: "dddddddd", }, @@ -1565,7 +1568,7 @@ var _ = Describe("Integration Test", func() { By(fmt.Sprintf("Verify that the MGS NID %s is used by the filesystem", getNidVia)) advanceStateAndCheckReady(dwsv1alpha2.StateSetup, workflow) // The NnfStorage's name matches the Server resource's name. - nnfstorage := &nnfv1alpha3.NnfStorage{} + nnfstorage := &nnfv1alpha4.NnfStorage{} Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dbdServer), nnfstorage)).To(Succeed()) for _, comp := range nnfstorage.Spec.AllocationSets { Expect(comp.MgsAddress).To(Equal(desiredNid)) diff --git a/internal/controller/nnf_access_controller.go b/internal/controller/nnf_access_controller.go index 426b793e1..3d489d86a 100644 --- a/internal/controller/nnf_access_controller.go +++ b/internal/controller/nnf_access_controller.go @@ -47,7 +47,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -83,7 +83,7 @@ func (r *NnfAccessReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( metrics.NnfAccessReconcilesTotal.Inc() - access := &nnfv1alpha3.NnfAccess{} + access := &nnfv1alpha4.NnfAccess{} if err := r.Get(ctx, req.NamespacedName, access); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -91,7 +91,7 @@ func (r *NnfAccessReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, client.IgnoreNotFound(err) } - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfAccessStatus](access) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfAccessStatus](access) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { access.Status.SetResourceErrorAndLog(err, log) }() @@ -200,7 +200,7 @@ func (r *NnfAccessReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, nil } -func (r *NnfAccessReconciler) mount(ctx context.Context, access *nnfv1alpha3.NnfAccess, clientList []string, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (*ctrl.Result, error) { +func (r *NnfAccessReconciler) mount(ctx context.Context, access *nnfv1alpha4.NnfAccess, clientList []string, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (*ctrl.Result, error) { // Lock the NnfStorage by adding an annotation with the name/namespace for this // NnfAccess. This is used for non-clustered file systems that can only be mounted // from a single host. @@ -217,7 +217,7 @@ func (r *NnfAccessReconciler) mount(ctx context.Context, access *nnfv1alpha3.Nnf err = r.addBlockStorageAccess(ctx, access, storageMapping) if err != nil { if apierrors.IsConflict(err) { - return &ctrl.Result{}, nil + return &ctrl.Result{RequeueAfter: time.Second * 2}, nil } return nil, dwsv1alpha2.NewResourceError("unable to add endpoints to NnfNodeStorage").WithError(err) @@ -257,7 +257,7 @@ func (r *NnfAccessReconciler) mount(ctx context.Context, access *nnfv1alpha3.Nnf return nil, nil } -func (r *NnfAccessReconciler) unmount(ctx context.Context, access *nnfv1alpha3.NnfAccess, clientList []string, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (*ctrl.Result, error) { +func (r *NnfAccessReconciler) unmount(ctx context.Context, access *nnfv1alpha4.NnfAccess, clientList []string, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (*ctrl.Result, error) { // Update client mounts to trigger unmount operation err := r.manageClientMounts(ctx, access, storageMapping) if err != nil { @@ -291,9 +291,9 @@ func (r *NnfAccessReconciler) unmount(ctx context.Context, access *nnfv1alpha3.N // lockStorage applies an annotation to the NnfStorage resource with the name and namespace of the NnfAccess resource. // This acts as a lock to prevent multiple NnfAccess resources from mounting the same file system. This is only necessary // for non-clustered file systems -func (r *NnfAccessReconciler) lockStorage(ctx context.Context, access *nnfv1alpha3.NnfAccess) (bool, error) { +func (r *NnfAccessReconciler) lockStorage(ctx context.Context, access *nnfv1alpha4.NnfAccess) (bool, error) { - if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { return false, fmt.Errorf("invalid StorageReference kind %s", access.Spec.StorageReference.Kind) } @@ -302,7 +302,7 @@ func (r *NnfAccessReconciler) lockStorage(ctx context.Context, access *nnfv1alph Namespace: access.Spec.StorageReference.Namespace, } - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, namespacedName, nnfStorage); err != nil { return false, err } @@ -345,10 +345,10 @@ func (r *NnfAccessReconciler) lockStorage(ctx context.Context, access *nnfv1alph } // unlockStorage removes the NnfAccess annotation from an NnfStorage resource if it was added from lockStorage() -func (r *NnfAccessReconciler) unlockStorage(ctx context.Context, access *nnfv1alpha3.NnfAccess) error { - nnfStorage := &nnfv1alpha3.NnfStorage{} +func (r *NnfAccessReconciler) unlockStorage(ctx context.Context, access *nnfv1alpha4.NnfAccess) error { + nnfStorage := &nnfv1alpha4.NnfStorage{} - if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { return nil } @@ -395,7 +395,7 @@ func (r *NnfAccessReconciler) unlockStorage(ctx context.Context, access *nnfv1al } // getClientList returns the list of client node names from either the Computes resource of the NnfStorage resource -func (r *NnfAccessReconciler) getClientList(ctx context.Context, access *nnfv1alpha3.NnfAccess) ([]string, error) { +func (r *NnfAccessReconciler) getClientList(ctx context.Context, access *nnfv1alpha4.NnfAccess) ([]string, error) { if access.Spec.ClientReference != (corev1.ObjectReference{}) { return r.getClientListFromClientReference(ctx, access) } @@ -404,7 +404,7 @@ func (r *NnfAccessReconciler) getClientList(ctx context.Context, access *nnfv1al } // getClientListFromClientReference returns a list of client nodes names from the Computes resource -func (r *NnfAccessReconciler) getClientListFromClientReference(ctx context.Context, access *nnfv1alpha3.NnfAccess) ([]string, error) { +func (r *NnfAccessReconciler) getClientListFromClientReference(ctx context.Context, access *nnfv1alpha4.NnfAccess) ([]string, error) { computes := &dwsv1alpha2.Computes{} if access.Spec.ClientReference.Kind != reflect.TypeOf(dwsv1alpha2.Computes{}).Name() { @@ -430,9 +430,9 @@ func (r *NnfAccessReconciler) getClientListFromClientReference(ctx context.Conte // getClientListFromStorageReference returns a list of client node names from the NnfStorage resource. This is the list of Rabbit // nodes that host the storage -func (r *NnfAccessReconciler) getClientListFromStorageReference(ctx context.Context, access *nnfv1alpha3.NnfAccess) ([]string, error) { +func (r *NnfAccessReconciler) getClientListFromStorageReference(ctx context.Context, access *nnfv1alpha4.NnfAccess) ([]string, error) { - if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { return nil, fmt.Errorf("Invalid StorageReference kind %s", access.Spec.StorageReference.Kind) } @@ -441,7 +441,7 @@ func (r *NnfAccessReconciler) getClientListFromStorageReference(ctx context.Cont Namespace: access.Spec.StorageReference.Namespace, } - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, namespacedName, nnfStorage); err != nil { return nil, err } @@ -463,10 +463,10 @@ func (r *NnfAccessReconciler) getClientListFromStorageReference(ctx context.Cont } // mapClientStorage returns a map of the clients with a list of mounts to make. This picks a device for each client -func (r *NnfAccessReconciler) mapClientStorage(ctx context.Context, access *nnfv1alpha3.NnfAccess, clients []string) (map[string][]dwsv1alpha2.ClientMountInfo, error) { - nnfStorage := &nnfv1alpha3.NnfStorage{} +func (r *NnfAccessReconciler) mapClientStorage(ctx context.Context, access *nnfv1alpha4.NnfAccess, clients []string) (map[string][]dwsv1alpha2.ClientMountInfo, error) { + nnfStorage := &nnfv1alpha4.NnfStorage{} - if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { return nil, fmt.Errorf("Invalid StorageReference kind %s", access.Spec.StorageReference.Kind) } @@ -504,7 +504,7 @@ func (r *NnfAccessReconciler) mapClientStorage(ctx context.Context, access *nnfv // mapClientNetworkStorage provides the Lustre MGS address information for the clients. All clients get the same // mount information -func (r *NnfAccessReconciler) mapClientNetworkStorage(ctx context.Context, access *nnfv1alpha3.NnfAccess, clients []string, nnfStorage *nnfv1alpha3.NnfStorage, setIndex int) (map[string][]dwsv1alpha2.ClientMountInfo, error) { +func (r *NnfAccessReconciler) mapClientNetworkStorage(ctx context.Context, access *nnfv1alpha4.NnfAccess, clients []string, nnfStorage *nnfv1alpha4.NnfStorage, setIndex int) (map[string][]dwsv1alpha2.ClientMountInfo, error) { storageMapping := make(map[string][]dwsv1alpha2.ClientMountInfo) for _, client := range clients { @@ -535,7 +535,7 @@ func (r *NnfAccessReconciler) mapClientNetworkStorage(ctx context.Context, acces // mapClientLocalStorage picks storage device(s) for each client to access based on locality information // from the (DWS) Storage resources. -func (r *NnfAccessReconciler) mapClientLocalStorage(ctx context.Context, access *nnfv1alpha3.NnfAccess, clients []string, nnfStorage *nnfv1alpha3.NnfStorage, setIndex int) (map[string][]dwsv1alpha2.ClientMountInfo, error) { +func (r *NnfAccessReconciler) mapClientLocalStorage(ctx context.Context, access *nnfv1alpha4.NnfAccess, clients []string, nnfStorage *nnfv1alpha4.NnfStorage, setIndex int) (map[string][]dwsv1alpha2.ClientMountInfo, error) { allocationSetSpec := nnfStorage.Spec.AllocationSets[setIndex] // Use information from the NnfStorage resource to determine how many allocations @@ -567,14 +567,14 @@ func (r *NnfAccessReconciler) mapClientLocalStorage(ctx context.Context, access // allocation. for nodeName, storageCount := range storageCountMap { matchLabels := dwsv1alpha2.MatchingOwner(nnfStorage) - matchLabels[nnfv1alpha3.AllocationSetLabel] = allocationSetSpec.Name + matchLabels[nnfv1alpha4.AllocationSetLabel] = allocationSetSpec.Name listOptions := []client.ListOption{ matchLabels, client.InNamespace(nodeName), } - nnfNodeStorageList := &nnfv1alpha3.NnfNodeStorageList{} + nnfNodeStorageList := &nnfv1alpha4.NnfNodeStorageList{} if err := r.List(ctx, nnfNodeStorageList, listOptions...); err != nil { return nil, err } @@ -597,7 +597,7 @@ func (r *NnfAccessReconciler) mapClientLocalStorage(ctx context.Context, access // so clientmountd will not look at the DeviceReference struct. The DeviceReference information is used by // the data movement code to match up mounts between the Rabbit and compute node. mountInfo.Device.DeviceReference = &dwsv1alpha2.ClientMountDeviceReference{} - mountInfo.Device.DeviceReference.ObjectReference.Kind = reflect.TypeOf(nnfv1alpha3.NnfNodeStorage{}).Name() + mountInfo.Device.DeviceReference.ObjectReference.Kind = reflect.TypeOf(nnfv1alpha4.NnfNodeStorage{}).Name() mountInfo.Device.DeviceReference.ObjectReference.Name = nnfNodeStorage.Name mountInfo.Device.DeviceReference.ObjectReference.Namespace = nnfNodeStorage.Namespace mountInfo.Device.DeviceReference.Data = i @@ -711,7 +711,7 @@ type mountReference struct { // addNodeStorageEndpoints adds the compute node information to the NnfNodeStorage resource // so it can make the NVMe namespaces accessible on the compute node. This is done on the rabbit // by creating StorageGroup resources through swordfish for the correct endpoint. -func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access *nnfv1alpha3.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { +func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access *nnfv1alpha4.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { // NnfNodeStorage clientReferences only need to be added for compute nodes. If // this nnfAccess is not for compute nodes, then there's no work to do. if access.Spec.ClientReference == (corev1.ObjectReference{}) { @@ -728,7 +728,7 @@ func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access continue } - if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfNodeStorage{}).Name() { + if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfNodeStorage{}).Name() { continue } @@ -744,7 +744,7 @@ func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access // Loop through the NnfNodeBlockStorages and add client access information for each of the // computes that need access to an allocation. for nodeStorageReference, mountRefList := range nodeStorageMap { - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{ + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nodeStorageReference.Name, Namespace: nodeStorageReference.Namespace, @@ -755,7 +755,7 @@ func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access return err } - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{ + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorage.Spec.BlockReference.Name, Namespace: nnfNodeStorage.Spec.BlockReference.Namespace, @@ -801,7 +801,7 @@ func (r *NnfAccessReconciler) addBlockStorageAccess(ctx context.Context, access return nil } -func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, access *nnfv1alpha3.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (bool, error) { +func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, access *nnfv1alpha4.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) (bool, error) { // NnfNodeStorage clientReferences only need to be checked for compute nodes. If // this nnfAccess is not for compute nodes, then there's no work to do. if access.Spec.ClientReference == (corev1.ObjectReference{}) { @@ -818,7 +818,7 @@ func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, a continue } - if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfNodeStorage{}).Name() { + if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfNodeStorage{}).Name() { continue } @@ -832,10 +832,10 @@ func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, a } } - nnfNodeBlockStorages := []nnfv1alpha3.NnfNodeBlockStorage{} + nnfNodeBlockStorages := []nnfv1alpha4.NnfNodeBlockStorage{} for nodeStorageReference := range nodeStorageMap { - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{ + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nodeStorageReference.Name, Namespace: nodeStorageReference.Namespace, @@ -846,7 +846,7 @@ func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, a return false, err } - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{ + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorage.Spec.BlockReference.Name, Namespace: nnfNodeStorage.Spec.BlockReference.Namespace, @@ -870,6 +870,34 @@ func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, a for allocationIndex, allocation := range nnfNodeBlockStorage.Spec.Allocations { for _, nodeName := range allocation.Access { blockAccess, exists := nnfNodeBlockStorage.Status.Allocations[allocationIndex].Accesses[nodeName] + if access.Spec.IgnoreOfflineComputes { + storage := &dwsv1alpha2.Storage{ + ObjectMeta: metav1.ObjectMeta{ + Name: nnfNodeBlockStorage.GetNamespace(), + Namespace: corev1.NamespaceDefault, + }, + } + + if err := r.Get(ctx, client.ObjectKeyFromObject(storage), storage); err != nil { + return false, err + } + + computeOffline := false + for _, compute := range storage.Status.Access.Computes { + if compute.Name != nodeName { + continue + } + + if compute.Status == dwsv1alpha2.OfflineStatus { + computeOffline = true + } + } + + // If the compute is offline, don't check its status + if computeOffline { + continue + } + } // if the map entry doesn't exist in the status section for this node yet, then keep waiting if !exists { @@ -890,7 +918,7 @@ func (r *NnfAccessReconciler) getBlockStorageAccessStatus(ctx context.Context, a // removeNodeStorageEndpoints modifies the NnfNodeStorage resources to remove the client endpoints for the // compute nodes that had mounted the storage. This causes NnfNodeStorage to remove the StorageGroups for // those compute nodes and remove access to the NVMe namespaces from the computes. -func (r *NnfAccessReconciler) removeBlockStorageAccess(ctx context.Context, access *nnfv1alpha3.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { +func (r *NnfAccessReconciler) removeBlockStorageAccess(ctx context.Context, access *nnfv1alpha4.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { // NnfNodeStorage clientReferences only need to be removed for compute nodes. If // this nnfAccess is not for compute nodes, then there's no work to do. if access.Spec.ClientReference == (corev1.ObjectReference{}) { @@ -907,7 +935,7 @@ func (r *NnfAccessReconciler) removeBlockStorageAccess(ctx context.Context, acce continue } - if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfNodeStorage{}).Name() { + if mount.Device.DeviceReference.ObjectReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfNodeStorage{}).Name() { continue } @@ -924,7 +952,7 @@ func (r *NnfAccessReconciler) removeBlockStorageAccess(ctx context.Context, acce Namespace: nodeBlockStorageReference.Namespace, } - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{} + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{} err := r.Get(ctx, namespacedName, nnfNodeBlockStorage) if err != nil { if apierrors.IsNotFound(err) { @@ -952,18 +980,18 @@ func (r *NnfAccessReconciler) removeBlockStorageAccess(ctx context.Context, acce } // manageClientMounts creates or updates the ClientMount resources based on the information in the storageMapping map. -func (r *NnfAccessReconciler) manageClientMounts(ctx context.Context, access *nnfv1alpha3.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { +func (r *NnfAccessReconciler) manageClientMounts(ctx context.Context, access *nnfv1alpha4.NnfAccess, storageMapping map[string][]dwsv1alpha2.ClientMountInfo) error { log := r.Log.WithValues("NnfAccess", client.ObjectKeyFromObject(access)) if !access.Spec.MakeClientMounts { return nil } - if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if access.Spec.StorageReference.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { return dwsv1alpha2.NewResourceError("invalid StorageReference kind %s", access.Spec.StorageReference.Kind).WithFatal() } - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: access.Spec.StorageReference.Name, Namespace: access.Spec.StorageReference.Namespace, @@ -1032,7 +1060,7 @@ func (r *NnfAccessReconciler) manageClientMounts(ctx context.Context, access *nn } // getClientMountStatus aggregates the status from all the ClientMount resources -func (r *NnfAccessReconciler) getClientMountStatus(ctx context.Context, access *nnfv1alpha3.NnfAccess, clientList []string) (bool, error) { +func (r *NnfAccessReconciler) getClientMountStatus(ctx context.Context, access *nnfv1alpha4.NnfAccess, clientList []string) (bool, error) { log := r.Log.WithValues("NnfAccess", client.ObjectKeyFromObject(access)) if !access.Spec.MakeClientMounts { @@ -1103,7 +1131,7 @@ func (r *NnfAccessReconciler) getClientMountStatus(ctx context.Context, access * return false, nil } - if mount.Ready == false { + if !mount.Ready { return false, nil } } @@ -1118,7 +1146,7 @@ func (r *NnfAccessReconciler) getClientMountStatus(ctx context.Context, access * return true, nil } -func clientMountName(access *nnfv1alpha3.NnfAccess) string { +func clientMountName(access *nnfv1alpha4.NnfAccess) string { return access.Namespace + "-" + access.Name } @@ -1192,7 +1220,7 @@ func (r *NnfAccessReconciler) ComputesEnqueueRequests(ctx context.Context, o cli }), } - nnfAccessList := &nnfv1alpha3.NnfAccessList{} + nnfAccessList := &nnfv1alpha4.NnfAccessList{} if err := r.List(context.TODO(), nnfAccessList, listOptions...); err != nil { log.Info("Could not list NnfAccesses", "error", err) return requests @@ -1230,7 +1258,7 @@ func (r *NnfAccessReconciler) SetupWithManager(mgr ctrl.Manager) error { maxReconciles := runtime.GOMAXPROCS(0) return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). - For(&nnfv1alpha3.NnfAccess{}). + For(&nnfv1alpha4.NnfAccess{}). Watches(&dwsv1alpha2.Computes{}, handler.EnqueueRequestsFromMapFunc(r.ComputesEnqueueRequests)). Watches(&dwsv1alpha2.ClientMount{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). Complete(r) diff --git a/internal/controller/nnf_access_controller_test.go b/internal/controller/nnf_access_controller_test.go index b78600921..c0f6b8ad9 100644 --- a/internal/controller/nnf_access_controller_test.go +++ b/internal/controller/nnf_access_controller_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("Access Controller Test", func() { @@ -43,11 +43,11 @@ var _ = Describe("Access Controller Test", func() { "rabbit-nnf-access-test-node-1", "rabbit-nnf-access-test-node-2"} - nnfNodes := [2]*nnfv1alpha3.NnfNode{} + nnfNodes := [2]*nnfv1alpha4.NnfNode{} nodes := [2]*corev1.Node{} var systemConfiguration *dwsv1alpha2.SystemConfiguration - var storageProfile *nnfv1alpha3.NnfStorageProfile + var storageProfile *nnfv1alpha4.NnfStorageProfile var setup sync.Once BeforeEach(func() { @@ -84,7 +84,7 @@ var _ = Describe("Access Controller Test", func() { ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Labels: map[string]string{ - nnfv1alpha3.RabbitNodeSelectorLabel: "true", + nnfv1alpha4.RabbitNodeSelectorLabel: "true", }, }, Status: corev1.NodeStatus{ @@ -99,14 +99,14 @@ var _ = Describe("Access Controller Test", func() { Expect(k8sClient.Create(context.TODO(), nodes[i])).To(Succeed()) - nnfNodes[i] = &nnfv1alpha3.NnfNode{ + nnfNodes[i] = &nnfv1alpha4.NnfNode{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: nodeName, }, - Spec: nnfv1alpha3.NnfNodeSpec{ - State: nnfv1alpha3.ResourceEnable, + Spec: nnfv1alpha4.NnfNodeSpec{ + State: nnfv1alpha4.ResourceEnable, }, } Expect(k8sClient.Create(context.TODO(), nnfNodes[i])).To(Succeed()) @@ -137,14 +137,14 @@ var _ = Describe("Access Controller Test", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) for i := range nodeNames { Expect(k8sClient.Delete(context.TODO(), nnfNodes[i])).To(Succeed()) - tempNnfNode := &nnfv1alpha3.NnfNode{} + tempNnfNode := &nnfv1alpha4.NnfNode{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(nnfNodes[i]), tempNnfNode) }).ShouldNot(Succeed()) @@ -166,29 +166,29 @@ var _ = Describe("Access Controller Test", func() { Describe("Create Client Mounts", func() { It("Creates Lustre Client Mount", func() { - allocationNodes := make([]nnfv1alpha3.NnfStorageAllocationNodes, len(nodeNames)) + allocationNodes := make([]nnfv1alpha4.NnfStorageAllocationNodes, len(nodeNames)) for idx, nodeName := range nodeNames { - allocationNodes[idx] = nnfv1alpha3.NnfStorageAllocationNodes{ + allocationNodes[idx] = nnfv1alpha4.NnfStorageAllocationNodes{ Count: 1, Name: nodeName, } } - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-access-test-storage-lustre", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfStorageSpec{ + Spec: nnfv1alpha4.NnfStorageSpec{ FileSystemType: "lustre", - AllocationSets: []nnfv1alpha3.NnfStorageAllocationSetSpec{ + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{ { Name: "mgtmdt", Capacity: 50000000000, - NnfStorageLustreSpec: nnfv1alpha3.NnfStorageLustreSpec{ + NnfStorageLustreSpec: nnfv1alpha4.NnfStorageLustreSpec{ TargetType: "mgtmdt", }, - Nodes: []nnfv1alpha3.NnfStorageAllocationNodes{ + Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ { Count: 1, Name: nodeNames[0], @@ -198,7 +198,7 @@ var _ = Describe("Access Controller Test", func() { { Name: "ost", Capacity: 50000000000, - NnfStorageLustreSpec: nnfv1alpha3.NnfStorageLustreSpec{ + NnfStorageLustreSpec: nnfv1alpha4.NnfStorageLustreSpec{ TargetType: "ost", }, Nodes: allocationNodes, @@ -212,18 +212,18 @@ var _ = Describe("Access Controller Test", func() { It("Creates XFS Client Mount", func() { - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-access-test-storage-xfs", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfStorageSpec{ + Spec: nnfv1alpha4.NnfStorageSpec{ FileSystemType: "xfs", - AllocationSets: []nnfv1alpha3.NnfStorageAllocationSetSpec{ + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{ { Name: "xfs", Capacity: 50000000000, - Nodes: []nnfv1alpha3.NnfStorageAllocationNodes{ + Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ { Count: 1, Name: nodeNames[0], @@ -243,18 +243,18 @@ var _ = Describe("Access Controller Test", func() { It("Creates GFS2 Client Mount", func() { - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-access-test-storage-gfs2", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfStorageSpec{ + Spec: nnfv1alpha4.NnfStorageSpec{ FileSystemType: "gfs2", - AllocationSets: []nnfv1alpha3.NnfStorageAllocationSetSpec{ + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{ { Name: "gfs2", Capacity: 50000000000, - Nodes: []nnfv1alpha3.NnfStorageAllocationNodes{ + Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ { Count: 1, Name: nodeNames[0], @@ -274,7 +274,7 @@ var _ = Describe("Access Controller Test", func() { }) }) -func verifyClientMount(storage *nnfv1alpha3.NnfStorage, storageProfile *nnfv1alpha3.NnfStorageProfile, nodeNames []string) { +func verifyClientMount(storage *nnfv1alpha4.NnfStorage, storageProfile *nnfv1alpha4.NnfStorageProfile, nodeNames []string) { Expect(k8sClient.Create(context.TODO(), storage)).To(Succeed(), "Create NNF Storage") Eventually(func(g Gomega) error { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storage), storage)).To(Succeed()) @@ -283,12 +283,12 @@ func verifyClientMount(storage *nnfv1alpha3.NnfStorage, storageProfile *nnfv1alp }).Should(Succeed()) mountPath := "/mnt/nnf/12345-0/" - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-access-test-access-" + storage.Spec.FileSystemType, Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfAccessSpec{ + Spec: nnfv1alpha4.NnfAccessSpec{ DesiredState: "mounted", TeardownState: dwsv1alpha2.StatePreRun, @@ -299,7 +299,7 @@ func verifyClientMount(storage *nnfv1alpha3.NnfStorage, storageProfile *nnfv1alp MountPathPrefix: mountPath, StorageReference: corev1.ObjectReference{ - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), Name: storage.Name, Namespace: storage.Namespace, }, diff --git a/internal/controller/nnf_clientmount_controller.go b/internal/controller/nnf_clientmount_controller.go index 0a65e052d..3132a4f90 100644 --- a/internal/controller/nnf_clientmount_controller.go +++ b/internal/controller/nnf_clientmount_controller.go @@ -44,7 +44,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -318,7 +318,9 @@ func (r *NnfClientMountReconciler) dumpServersToFile(ctx context.Context, client defer file.Close() encoder := json.NewEncoder(file) - err = encoder.Encode(createLustreMapping(server)) + + components := getLustreMappingFromServer(server) + err = encoder.Encode(components) if err != nil { return dwsv1alpha2.NewResourceError("could not write JSON to file").WithError(err).WithMajor() } @@ -348,15 +350,15 @@ func (r *NnfClientMountReconciler) getServerForClientMount(ctx context.Context, ownerKind, ownerExists := clientMount.Labels[dwsv1alpha2.OwnerKindLabel] ownerName, ownerNameExists := clientMount.Labels[dwsv1alpha2.OwnerNameLabel] ownerNS, ownerNSExists := clientMount.Labels[dwsv1alpha2.OwnerNamespaceLabel] - _, idxExists := clientMount.Labels[nnfv1alpha3.DirectiveIndexLabel] + _, idxExists := clientMount.Labels[nnfv1alpha4.DirectiveIndexLabel] - // We should expect the owner of the ClientMount to be NnfStorage and have the expected labels + // We should expect the owner to be NnfStorage and have the expected labels if !ownerExists || !ownerNameExists || !ownerNSExists || !idxExists || ownerKind != storageKind { - return nil, dwsv1alpha2.NewResourceError("expected ClientMount owner to be of kind NnfStorage and have the expected labels").WithMajor() + return nil, dwsv1alpha2.NewResourceError("expected owner to be of kind NnfStorage and have the expected labels").WithMajor() } // Retrieve the NnfStorage resource - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: ownerName, Namespace: ownerNS, @@ -370,12 +372,12 @@ func (r *NnfClientMountReconciler) getServerForClientMount(ctx context.Context, ownerKind, ownerExists = storage.Labels[dwsv1alpha2.OwnerKindLabel] ownerName, ownerNameExists = storage.Labels[dwsv1alpha2.OwnerNameLabel] ownerNS, ownerNSExists = storage.Labels[dwsv1alpha2.OwnerNamespaceLabel] - idx, idxExists := storage.Labels[nnfv1alpha3.DirectiveIndexLabel] + idx, idxExists := storage.Labels[nnfv1alpha4.DirectiveIndexLabel] // We should expect the owner of the NnfStorage to be Workflow or PersistentStorageInstance and // have the expected labels if !ownerExists || !ownerNameExists || !ownerNSExists || !idxExists || (ownerKind != workflowKind && ownerKind != persistentKind) { - return nil, dwsv1alpha2.NewResourceError("expected NnfStorage owner to be of kind Workflow or PersistentStorageInstance and have the expected labels").WithMajor() + return nil, dwsv1alpha2.NewResourceError("expected owner to be of kind Workflow or PersistentStorageInstance and have the expected labels").WithMajor() } // If the owner is a workflow, then we can use the workflow labels and directive index to get @@ -386,7 +388,7 @@ func (r *NnfClientMountReconciler) getServerForClientMount(ctx context.Context, client.MatchingLabels(map[string]string{ dwsv1alpha2.WorkflowNameLabel: ownerName, dwsv1alpha2.WorkflowNamespaceLabel: ownerNS, - nnfv1alpha3.DirectiveIndexLabel: idx, + nnfv1alpha4.DirectiveIndexLabel: idx, }), } } else { @@ -414,43 +416,47 @@ func (r *NnfClientMountReconciler) getServerForClientMount(ctx context.Context, return &serversList.Items[0], nil } -/* -Flatten the AllocationSets to create mapping for lustre information. Example: - - { - "ost": [ - "rabbit-node-1", - "rabbit-node=2" - ] - "mdt": [ - "rabbit-node-1", - "rabbit-node=2" - ] - } -*/ -func createLustreMapping(server *dwsv1alpha2.Servers) map[string][]string { - - m := map[string][]string{} - - for _, allocationSet := range server.Status.AllocationSets { +// Go through the Server's allocation sets to determine the number of Lustre components and rabbit +// nodes. Returns a map with keys for each lustre component type and also the nnf nodes involved. The +// list of nnf nodes is kept unique, but mdts, osts, etc can include a node multiple times. +func getLustreMappingFromServer(server *dwsv1alpha2.Servers) map[string][]string { + nnfNodeKey := "nnfNode" + components := map[string][]string{ + "mdt": []string{}, + "mgt": []string{}, + "mgtmdt": []string{}, + "ost": []string{}, + nnfNodeKey: []string{}, + } + rabbitMap := make(map[string]bool) // use a map to keep the list unique + + // Gather the info from the allocation set + for _, allocationSet := range server.Spec.AllocationSets { label := allocationSet.Label - if _, found := m[label]; !found { - m[label] = []string{} - } + for _, storage := range allocationSet.Storage { + node := storage.Name - for nnfNode, _ := range allocationSet.Storage { - m[label] = append(m[label], nnfNode) + // add to the list for that lustre component for each allocationCount + for i := 0; i < storage.AllocationCount; i++ { + components[label] = append(components[label], node) + } + + // add to the unique list of rabbits + if _, found := rabbitMap[node]; !found { + rabbitMap[node] = true + components[nnfNodeKey] = append(components[nnfNodeKey], node) + } } } - return m + return components } // fakeNnfNodeStorage creates an NnfNodeStorage resource filled in with only the fields // that are necessary to mount the file system. This is done to reduce the API server load // because the compute nodes don't need to Get() the actual NnfNodeStorage. -func (r *NnfClientMountReconciler) fakeNnfNodeStorage(ctx context.Context, clientMount *dwsv1alpha2.ClientMount, index int) (*nnfv1alpha3.NnfNodeStorage, error) { - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{ +func (r *NnfClientMountReconciler) fakeNnfNodeStorage(ctx context.Context, clientMount *dwsv1alpha2.ClientMount, index int) (*nnfv1alpha4.NnfNodeStorage, error) { + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: clientMount.Spec.Mounts[index].Device.DeviceReference.ObjectReference.Name, Namespace: clientMount.Spec.Mounts[index].Device.DeviceReference.ObjectReference.Namespace, @@ -462,7 +468,7 @@ func (r *NnfClientMountReconciler) fakeNnfNodeStorage(ctx context.Context, clien // labels that are important for doing the mount are there and correct dwsv1alpha2.InheritParentLabels(nnfNodeStorage, clientMount) labels := nnfNodeStorage.GetLabels() - labels[nnfv1alpha3.DirectiveIndexLabel] = getTargetDirectiveIndexLabel(clientMount) + labels[nnfv1alpha4.DirectiveIndexLabel] = getTargetDirectiveIndexLabel(clientMount) labels[dwsv1alpha2.OwnerUidLabel] = getTargetOwnerUIDLabel(clientMount) nnfNodeStorage.SetLabels(labels) diff --git a/internal/controller/nnf_clientmount_controller_test.go b/internal/controller/nnf_clientmount_controller_test.go index 4eb2066b4..6443d3247 100644 --- a/internal/controller/nnf_clientmount_controller_test.go +++ b/internal/controller/nnf_clientmount_controller_test.go @@ -30,36 +30,48 @@ var _ = Describe("Clientmount Controller Test", func() { It("It should correctly create a human-readable lustre mapping for Servers ", func() { s := dwsv1alpha2.Servers{ - Status: dwsv1alpha2.ServersStatus{ - AllocationSets: []dwsv1alpha2.ServersStatusAllocationSet{ - {Label: "ost", Storage: map[string]dwsv1alpha2.ServersStatusStorage{ - "rabbit-node-1": dwsv1alpha2.ServersStatusStorage{ - AllocationSize: 123345, - }, - "rabbit-node-2": dwsv1alpha2.ServersStatusStorage{ - AllocationSize: 123345, - }, - }}, - {Label: "mdt", Storage: map[string]dwsv1alpha2.ServersStatusStorage{ - "rabbit-node-3": dwsv1alpha2.ServersStatusStorage{ - AllocationSize: 123345, - }, - "rabbit-node-4": dwsv1alpha2.ServersStatusStorage{ - AllocationSize: 123345, - }, - "rabbit-node-8": dwsv1alpha2.ServersStatusStorage{ - AllocationSize: 123345, - }, - }}, + Spec: dwsv1alpha2.ServersSpec{ + AllocationSets: []dwsv1alpha2.ServersSpecAllocationSet{ + {Label: "ost", Storage: []dwsv1alpha2.ServersSpecStorage{ + {Name: "rabbit-node-1", AllocationCount: 2}, + {Name: "rabbit-node-2", AllocationCount: 1}}, + }, + // throw another OST on rabbit-node-2 + {Label: "ost", Storage: []dwsv1alpha2.ServersSpecStorage{ + {Name: "rabbit-node-2", AllocationCount: 1}}, + }, + {Label: "mdt", Storage: []dwsv1alpha2.ServersSpecStorage{ + {Name: "rabbit-node-3", AllocationCount: 1}, + {Name: "rabbit-node-4", AllocationCount: 1}, + {Name: "rabbit-node-8", AllocationCount: 1}}, + }, + {Label: "mgt", Storage: []dwsv1alpha2.ServersSpecStorage{ + {Name: "rabbit-node-3", AllocationCount: 1}}, + }, + {Label: "mgtmdt", Storage: []dwsv1alpha2.ServersSpecStorage{ + {Name: "rabbit-node-4", AllocationCount: 1}}, + }, }, }, } - m := createLustreMapping(&s) - Expect(m).To(HaveLen(2)) - Expect(m["ost"]).To(HaveLen(2)) - Expect(m["ost"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2")) + Expect(s.Spec.AllocationSets).To(HaveLen(5)) + m := getLustreMappingFromServer(&s) + Expect(m).To(HaveLen(5)) // should have keys for 4 lustre components (i.e. ost, mdt, mgt, mgtmdt) + rabbits + + Expect(m["ost"]).To(HaveLen(4)) + Expect(m["ost"]).Should(ContainElements("rabbit-node-1", "rabbit-node-1", "rabbit-node-2", "rabbit-node-2")) + Expect(m["mdt"]).To(HaveLen(3)) Expect(m["mdt"]).Should(ContainElements("rabbit-node-3", "rabbit-node-4", "rabbit-node-8")) + + Expect(m["mgt"]).To(HaveLen(1)) + Expect(m["mgt"]).Should(ContainElements("rabbit-node-3")) + + Expect(m["mgtmdt"]).To(HaveLen(1)) + Expect(m["mgtmdt"]).Should(ContainElements("rabbit-node-4")) + + Expect(m["nnfNode"]).To(HaveLen(5)) + Expect(m["nnfNode"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8")) }) }) diff --git a/internal/controller/nnf_lustre_mgt_controller.go b/internal/controller/nnf_lustre_mgt_controller.go index df71976d6..fbf00c712 100644 --- a/internal/controller/nnf_lustre_mgt_controller.go +++ b/internal/controller/nnf_lustre_mgt_controller.go @@ -39,7 +39,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" "github.com/NearNodeFlash/nnf-sos/pkg/command" ) @@ -85,7 +85,7 @@ func (r *NnfLustreMGTReconciler) Reconcile(ctx context.Context, req ctrl.Request metrics.NnfLustreMGTReconcilesTotal.Inc() - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{} + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{} if err := r.Get(ctx, req.NamespacedName, nnfLustreMgt); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -93,7 +93,7 @@ func (r *NnfLustreMGTReconciler) Reconcile(ctx context.Context, req ctrl.Request return ctrl.Result{}, client.IgnoreNotFound(err) } - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfLustreMGTStatus](nnfLustreMgt) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfLustreMGTStatus](nnfLustreMgt) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { nnfLustreMgt.Status.SetResourceErrorAndLog(err, log) }() @@ -224,7 +224,7 @@ func incrementFsName(fsname string) string { return string(incrementRuneList(runeList, 'a', 'z')) } -func isFsNameBlackListed(nnfLustreMgt *nnfv1alpha3.NnfLustreMGT, fsname string) bool { +func isFsNameBlackListed(nnfLustreMgt *nnfv1alpha4.NnfLustreMGT, fsname string) bool { // Check the blacklist for _, blackListedFsName := range nnfLustreMgt.Spec.FsNameBlackList { if fsname == blackListedFsName { @@ -237,7 +237,7 @@ func isFsNameBlackListed(nnfLustreMgt *nnfv1alpha3.NnfLustreMGT, fsname string) // SetFsNameNext sets the Status.FsNameNext field to the next available fsname. It also // updates the configmap the FsNameStartReference field if needed. -func (r *NnfLustreMGTReconciler) SetFsNameNext(ctx context.Context, nnfLustreMgt *nnfv1alpha3.NnfLustreMGT, fsname string) (*ctrl.Result, error) { +func (r *NnfLustreMGTReconciler) SetFsNameNext(ctx context.Context, nnfLustreMgt *nnfv1alpha4.NnfLustreMGT, fsname string) (*ctrl.Result, error) { // Find the next available fsname that isn't blacklisted for { fsname = incrementFsName(fsname) @@ -286,7 +286,7 @@ func (r *NnfLustreMGTReconciler) SetFsNameNext(ctx context.Context, nnfLustreMgt // HandleNewClaims looks for any new claims in Spec.ClaimList and assigns them // an fsname -func (r *NnfLustreMGTReconciler) HandleNewClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha3.NnfLustreMGT) (*ctrl.Result, error) { +func (r *NnfLustreMGTReconciler) HandleNewClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha4.NnfLustreMGT) (*ctrl.Result, error) { claimMap := map[corev1.ObjectReference]string{} for _, claim := range nnfLustreMgt.Status.ClaimList { claimMap[claim.Reference] = claim.FsName @@ -304,7 +304,7 @@ func (r *NnfLustreMGTReconciler) HandleNewClaims(ctx context.Context, nnfLustreM return result, nil } - newClaim := nnfv1alpha3.NnfLustreMGTStatusClaim{ + newClaim := nnfv1alpha4.NnfLustreMGTStatusClaim{ Reference: reference, FsName: fsnameNext, } @@ -320,7 +320,7 @@ func (r *NnfLustreMGTReconciler) HandleNewClaims(ctx context.Context, nnfLustreM // RemoveOldClaims removes any old entries from the Status.ClaimList and erases the fsname from // the MGT if necessary. -func (r *NnfLustreMGTReconciler) RemoveOldClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha3.NnfLustreMGT) error { +func (r *NnfLustreMGTReconciler) RemoveOldClaims(ctx context.Context, nnfLustreMgt *nnfv1alpha4.NnfLustreMGT) error { claimMap := map[corev1.ObjectReference]bool{} for _, reference := range nnfLustreMgt.Spec.ClaimList { claimMap[reference] = true @@ -341,7 +341,7 @@ func (r *NnfLustreMGTReconciler) RemoveOldClaims(ctx context.Context, nnfLustreM return nil } -func (r *NnfLustreMGTReconciler) EraseOldFsName(nnfLustreMgt *nnfv1alpha3.NnfLustreMGT, fsname string) error { +func (r *NnfLustreMGTReconciler) EraseOldFsName(nnfLustreMgt *nnfv1alpha4.NnfLustreMGT, fsname string) error { log := r.Log.WithValues("NnfLustreMGT", client.ObjectKeyFromObject(nnfLustreMgt)) if os.Getenv("ENVIRONMENT") == "kind" { @@ -386,7 +386,7 @@ func filterByNnfSystemNamespace() predicate.Predicate { func (r *NnfLustreMGTReconciler) SetupWithManager(mgr ctrl.Manager) error { builder := ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: 1}). - For(&nnfv1alpha3.NnfLustreMGT{}) + For(&nnfv1alpha4.NnfLustreMGT{}) switch r.ControllerType { case ControllerRabbit: diff --git a/internal/controller/nnf_lustre_mgt_controller_test.go b/internal/controller/nnf_lustre_mgt_controller_test.go index d2bcc55a2..cc022980b 100644 --- a/internal/controller/nnf_lustre_mgt_controller_test.go +++ b/internal/controller/nnf_lustre_mgt_controller_test.go @@ -30,18 +30,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("NnfLustreMGT Controller Test", func() { It("Verifies a single fsname consumer", func() { - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "test-mgt", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{"1.1.1.1@tcp"}, FsNameStart: "bbbbbbbb", }, @@ -87,13 +87,13 @@ var _ = Describe("NnfLustreMGT Controller Test", func() { }) It("Verifies two fsname consumers with fsname wrap", func() { - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "test-mgt", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{"1.1.1.1@tcp"}, FsNameStart: "zzzzzzzz", }, @@ -164,13 +164,13 @@ var _ = Describe("NnfLustreMGT Controller Test", func() { } Expect(k8sClient.Create(context.TODO(), configMap)).To(Succeed()) - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "test-mgt", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{"1.1.1.1@tcp"}, FsNameStart: "bbbbbbbb", FsNameStartReference: corev1.ObjectReference{ diff --git a/internal/controller/nnf_node_block_storage_controller.go b/internal/controller/nnf_node_block_storage_controller.go index 8fa3eb3c9..0978be697 100644 --- a/internal/controller/nnf_node_block_storage_controller.go +++ b/internal/controller/nnf_node_block_storage_controller.go @@ -55,7 +55,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" "github.com/NearNodeFlash/nnf-sos/pkg/blockdevice/nvme" ) @@ -106,7 +106,7 @@ func (r *NnfNodeBlockStorageReconciler) EventHandler(e nnfevent.Event) error { log.Info("triggering watch") - r.Events <- event.GenericEvent{Object: &nnfv1alpha3.NnfNodeBlockStorage{ + r.Events <- event.GenericEvent{Object: &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-ec-event", Namespace: "nnf-ec-event", @@ -159,7 +159,7 @@ func (r *NnfNodeBlockStorageReconciler) Reconcile(ctx context.Context, req ctrl. metrics.NnfNodeBlockStorageReconcilesTotal.Inc() - nodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{} + nodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{} if err := r.Get(ctx, req.NamespacedName, nodeBlockStorage); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -178,7 +178,7 @@ func (r *NnfNodeBlockStorageReconciler) Reconcile(ctx context.Context, req ctrl. return ctrl.Result{RequeueAfter: 1 * time.Second}, nil } - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfNodeBlockStorageStatus](nodeBlockStorage) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfNodeBlockStorageStatus](nodeBlockStorage) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { nodeBlockStorage.Status.SetResourceErrorAndLog(err, log) }() @@ -226,9 +226,9 @@ func (r *NnfNodeBlockStorageReconciler) Reconcile(ctx context.Context, req ctrl. // Initialize the status section with empty allocation statuses. if len(nodeBlockStorage.Status.Allocations) == 0 { - nodeBlockStorage.Status.Allocations = make([]nnfv1alpha3.NnfNodeBlockStorageAllocationStatus, len(nodeBlockStorage.Spec.Allocations)) + nodeBlockStorage.Status.Allocations = make([]nnfv1alpha4.NnfNodeBlockStorageAllocationStatus, len(nodeBlockStorage.Spec.Allocations)) for i := range nodeBlockStorage.Status.Allocations { - nodeBlockStorage.Status.Allocations[i].Accesses = make(map[string]nnfv1alpha3.NnfNodeBlockStorageAccessStatus) + nodeBlockStorage.Status.Allocations[i].Accesses = make(map[string]nnfv1alpha4.NnfNodeBlockStorageAccessStatus) } return ctrl.Result{}, nil @@ -287,7 +287,7 @@ func (r *NnfNodeBlockStorageReconciler) Reconcile(ctx context.Context, req ctrl. return ctrl.Result{}, nil } -func (r *NnfNodeBlockStorageReconciler) allocateStorage(nodeBlockStorage *nnfv1alpha3.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { +func (r *NnfNodeBlockStorageReconciler) allocateStorage(nodeBlockStorage *nnfv1alpha4.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfNodeBlockStorage", types.NamespacedName{Name: nodeBlockStorage.Name, Namespace: nodeBlockStorage.Namespace}) ss := nnf.NewDefaultStorageService(r.Options.DeleteUnknownVolumes()) @@ -307,7 +307,7 @@ func (r *NnfNodeBlockStorageReconciler) allocateStorage(nodeBlockStorage *nnfv1a } if len(allocationStatus.Devices) == 0 { - allocationStatus.Devices = make([]nnfv1alpha3.NnfNodeBlockStorageDeviceStatus, len(vc.Members)) + allocationStatus.Devices = make([]nnfv1alpha4.NnfNodeBlockStorageDeviceStatus, len(vc.Members)) } if len(allocationStatus.Devices) != len(vc.Members) { @@ -345,7 +345,7 @@ func (r *NnfNodeBlockStorageReconciler) allocateStorage(nodeBlockStorage *nnfv1a return nil, nil } -func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, nodeBlockStorage *nnfv1alpha3.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { +func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, nodeBlockStorage *nnfv1alpha4.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfNodeBlockStorage", types.NamespacedName{Name: nodeBlockStorage.Name, Namespace: nodeBlockStorage.Namespace}) ss := nnf.NewDefaultStorageService(r.Options.DeleteUnknownVolumes()) @@ -423,7 +423,7 @@ func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, n } else { // The kind environment doesn't support endpoints beyond the Rabbit if os.Getenv("ENVIRONMENT") == "kind" && endpointID != os.Getenv("RABBIT_NODE") { - allocationStatus.Accesses[nodeName] = nnfv1alpha3.NnfNodeBlockStorageAccessStatus{StorageGroupId: "fake-storage-group"} + allocationStatus.Accesses[nodeName] = nnfv1alpha4.NnfNodeBlockStorageAccessStatus{StorageGroupId: "fake-storage-group"} continue } @@ -433,7 +433,7 @@ func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, n } // Skip the endpoints that are not ready - if nnfv1alpha3.StaticResourceStatus(endPoint.Status) != nnfv1alpha3.ResourceReady { + if nnfv1alpha4.StaticResourceStatus(endPoint.Status) != nnfv1alpha4.ResourceReady { continue } @@ -443,13 +443,13 @@ func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, n } if allocationStatus.Accesses == nil { - allocationStatus.Accesses = make(map[string]nnfv1alpha3.NnfNodeBlockStorageAccessStatus) + allocationStatus.Accesses = make(map[string]nnfv1alpha4.NnfNodeBlockStorageAccessStatus) } // If the access status doesn't exist then we just created the resource. Save the ID in the NnfNodeBlockStorage if _, ok := allocationStatus.Accesses[nodeName]; !ok { log.Info("Created storage group", "Id", storageGroupId) - allocationStatus.Accesses[nodeName] = nnfv1alpha3.NnfNodeBlockStorageAccessStatus{StorageGroupId: sg.Id} + allocationStatus.Accesses[nodeName] = nnfv1alpha4.NnfNodeBlockStorageAccessStatus{StorageGroupId: sg.Id} } // The device paths are discovered below. This is only relevant for the Rabbit node access @@ -506,7 +506,7 @@ func (r *NnfNodeBlockStorageReconciler) createBlockDevice(ctx context.Context, n } -func (r *NnfNodeBlockStorageReconciler) deleteStorage(nodeBlockStorage *nnfv1alpha3.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { +func (r *NnfNodeBlockStorageReconciler) deleteStorage(nodeBlockStorage *nnfv1alpha4.NnfNodeBlockStorage, index int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfNodeBlockStorage", types.NamespacedName{Name: nodeBlockStorage.Name, Namespace: nodeBlockStorage.Namespace}) ss := nnf.NewDefaultStorageService(r.Options.DeleteUnknownVolumes()) @@ -531,7 +531,7 @@ func (r *NnfNodeBlockStorageReconciler) deleteStorage(nodeBlockStorage *nnfv1alp return nil, nil } -func getStoragePoolID(nodeBlockStorage *nnfv1alpha3.NnfNodeBlockStorage, index int) string { +func getStoragePoolID(nodeBlockStorage *nnfv1alpha4.NnfNodeBlockStorage, index int) string { return fmt.Sprintf("%s-%d", nodeBlockStorage.Name, index) } @@ -643,7 +643,7 @@ func (r *NnfNodeBlockStorageReconciler) NnfEcEventEnqueueHandler(ctx context.Con client.InNamespace(os.Getenv("NNF_NODE_NAME")), } - nnfNodeBlockStorageList := &nnfv1alpha3.NnfNodeBlockStorageList{} + nnfNodeBlockStorageList := &nnfv1alpha4.NnfNodeBlockStorageList{} if err := r.List(context.TODO(), nnfNodeBlockStorageList, listOptions...); err != nil { log.Error(err, "Could not list block storages") @@ -652,7 +652,7 @@ func (r *NnfNodeBlockStorageReconciler) NnfEcEventEnqueueHandler(ctx context.Con time.Sleep(time.Second * 10) log.Info("triggering watch after List() error") - r.Events <- event.GenericEvent{Object: &nnfv1alpha3.NnfNodeBlockStorage{ + r.Events <- event.GenericEvent{Object: &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-ec-event", Namespace: "nnf-ec-event", @@ -681,7 +681,7 @@ func (r *NnfNodeBlockStorageReconciler) SetupWithManager(mgr ctrl.Manager) error // nnf-ec is not thread safe, so we are limited to a single reconcile thread. return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: 1}). - For(&nnfv1alpha3.NnfNodeBlockStorage{}). + For(&nnfv1alpha4.NnfNodeBlockStorage{}). WatchesRawSource(&source.Channel{Source: r.Events}, handler.EnqueueRequestsFromMapFunc(r.NnfEcEventEnqueueHandler)). Complete(r) } diff --git a/internal/controller/nnf_node_controller.go b/internal/controller/nnf_node_controller.go index a673e13cf..fc5165b44 100644 --- a/internal/controller/nnf_node_controller.go +++ b/internal/controller/nnf_node_controller.go @@ -53,7 +53,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -118,7 +118,7 @@ func (r *NnfNodeReconciler) Start(ctx context.Context) error { log.Info("Created Namespace") } - node := &nnfv1alpha3.NnfNode{} + node := &nnfv1alpha4.NnfNode{} if err := r.Get(ctx, r.NamespacedName, node); err != nil { if !errors.IsNotFound(err) { @@ -139,7 +139,7 @@ func (r *NnfNodeReconciler) Start(ctx context.Context) error { } else { err := retry.RetryOnConflict(retry.DefaultRetry, func() error { - node := &nnfv1alpha3.NnfNode{} + node := &nnfv1alpha4.NnfNode{} if err := r.Get(ctx, r.NamespacedName, node); err != nil { return err } @@ -155,8 +155,8 @@ func (r *NnfNodeReconciler) Start(ctx context.Context) error { } // Mark the node's status as starting - if node.Status.Status != nnfv1alpha3.ResourceStarting { - node.Status.Status = nnfv1alpha3.ResourceStarting + if node.Status.Status != nnfv1alpha4.ResourceStarting { + node.Status.Status = nnfv1alpha4.ResourceStarting if err := r.Status().Update(ctx, node); err != nil { return err @@ -205,7 +205,7 @@ func (r *NnfNodeReconciler) EventHandler(e nnfevent.Event) error { log.Info("triggering watch") - r.Events <- event.GenericEvent{Object: &nnfv1alpha3.NnfNode{ + r.Events <- event.GenericEvent{Object: &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: r.NamespacedName.Name, Namespace: r.NamespacedName.Namespace, @@ -235,7 +235,7 @@ func (r *NnfNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re metrics.NnfNodeReconcilesTotal.Inc() - node := &nnfv1alpha3.NnfNode{} + node := &nnfv1alpha4.NnfNode{} if err := r.Get(ctx, req.NamespacedName, node); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -244,7 +244,7 @@ func (r *NnfNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re } // Prepare to update the node's status - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfNodeStatus](node) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfNodeStatus](node) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() // Access the default storage service running in the NNF Element @@ -257,8 +257,8 @@ func (r *NnfNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re return ctrl.Result{}, err } - node.Status.Status = nnfv1alpha3.ResourceStatus(storageService.Status) - node.Status.Health = nnfv1alpha3.ResourceHealth(storageService.Status) + node.Status.Status = nnfv1alpha4.ResourceStatus(storageService.Status) + node.Status.Health = nnfv1alpha4.ResourceHealth(storageService.Status) if storageService.Status.State != sf.ENABLED_RST { return ctrl.Result{RequeueAfter: 1 * time.Second}, nil @@ -348,26 +348,26 @@ func (r *NnfNodeReconciler) createNamespace() *corev1.Namespace { } } -func (r *NnfNodeReconciler) createNode() *nnfv1alpha3.NnfNode { - return &nnfv1alpha3.NnfNode{ +func (r *NnfNodeReconciler) createNode() *nnfv1alpha4.NnfNode { + return &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: r.Name, Namespace: r.Namespace, }, - Spec: nnfv1alpha3.NnfNodeSpec{ + Spec: nnfv1alpha4.NnfNodeSpec{ Name: r.Namespace, // Note the conversion here from namespace to name, each NNF Node is given a unique namespace, which then becomes how the NLC is controlled. Pod: os.Getenv("NNF_POD_NAME"), // Providing the podname gives users quick means to query the pod for a particular NNF Node - State: nnfv1alpha3.ResourceEnable, + State: nnfv1alpha4.ResourceEnable, }, - Status: nnfv1alpha3.NnfNodeStatus{ - Status: nnfv1alpha3.ResourceStarting, + Status: nnfv1alpha4.NnfNodeStatus{ + Status: nnfv1alpha4.ResourceStarting, Capacity: 0, }, } } // Update the Servers status of the NNF Node if necessary -func (r *NnfNodeReconciler) updateServers(node *nnfv1alpha3.NnfNode, log logr.Logger) error { +func (r *NnfNodeReconciler) updateServers(node *nnfv1alpha4.NnfNode, log logr.Logger) error { ss := nnf.NewDefaultStorageService(r.Options.DeleteUnknownVolumes()) @@ -379,7 +379,7 @@ func (r *NnfNodeReconciler) updateServers(node *nnfv1alpha3.NnfNode, log logr.Lo } if len(node.Status.Servers) < len(serverEndpointCollection.Members) { - node.Status.Servers = make([]nnfv1alpha3.NnfServerStatus, len(serverEndpointCollection.Members)) + node.Status.Servers = make([]nnfv1alpha4.NnfServerStatus, len(serverEndpointCollection.Members)) } // Iterate over the server endpoints to ensure we've reflected @@ -393,11 +393,11 @@ func (r *NnfNodeReconciler) updateServers(node *nnfv1alpha3.NnfNode, log logr.Lo return err } - node.Status.Servers[idx].NnfResourceStatus = nnfv1alpha3.NnfResourceStatus{ + node.Status.Servers[idx].NnfResourceStatus = nnfv1alpha4.NnfResourceStatus{ ID: serverEndpoint.Id, Name: serverEndpoint.Name, - Status: nnfv1alpha3.ResourceStatus(serverEndpoint.Status), - Health: nnfv1alpha3.ResourceHealth(serverEndpoint.Status), + Status: nnfv1alpha4.ResourceStatus(serverEndpoint.Status), + Health: nnfv1alpha4.ResourceHealth(serverEndpoint.Status), } } @@ -405,7 +405,7 @@ func (r *NnfNodeReconciler) updateServers(node *nnfv1alpha3.NnfNode, log logr.Lo } // Update the Drives status of the NNF Node if necessary -func updateDrives(node *nnfv1alpha3.NnfNode, log logr.Logger) error { +func updateDrives(node *nnfv1alpha4.NnfNode, log logr.Logger) error { storageService := nvme.NewDefaultStorageService() storageCollection := &sf.StorageCollectionStorageCollection{} @@ -415,7 +415,7 @@ func updateDrives(node *nnfv1alpha3.NnfNode, log logr.Logger) error { } if len(node.Status.Drives) < len(storageCollection.Members) { - node.Status.Drives = make([]nnfv1alpha3.NnfDriveStatus, len(storageCollection.Members)) + node.Status.Drives = make([]nnfv1alpha4.NnfDriveStatus, len(storageCollection.Members)) } // Iterate over the storage devices and controllers to ensure we've reflected @@ -431,11 +431,11 @@ func updateDrives(node *nnfv1alpha3.NnfNode, log logr.Logger) error { } drive.Slot = fmt.Sprintf("%d", storage.Location.PartLocation.LocationOrdinalValue) - drive.NnfResourceStatus = nnfv1alpha3.NnfResourceStatus{ + drive.NnfResourceStatus = nnfv1alpha4.NnfResourceStatus{ ID: storage.Id, Name: storage.Name, - Status: nnfv1alpha3.ResourceStatus(storage.Status), - Health: nnfv1alpha3.ResourceHealth(storage.Status), + Status: nnfv1alpha4.ResourceStatus(storage.Status), + Health: nnfv1alpha4.ResourceHealth(storage.Status), } if storage.Status.State == sf.ENABLED_RST { @@ -499,7 +499,7 @@ func (r *NnfNodeReconciler) SetupWithManager(mgr ctrl.Manager) error { // There can be only one NnfNode resource for this controller to // manage, so we don't set MaxConcurrentReconciles. return ctrl.NewControllerManagedBy(mgr). - For(&nnfv1alpha3.NnfNode{}). + For(&nnfv1alpha4.NnfNode{}). Owns(&corev1.Namespace{}). // The node will create a namespace for itself, so it can watch changes to the NNF Node custom resource Watches(&dwsv1alpha2.SystemConfiguration{}, handler.EnqueueRequestsFromMapFunc(systemConfigurationMapFunc)). WatchesRawSource(&source.Channel{Source: r.Events}, &handler.EnqueueRequestForObject{}). diff --git a/internal/controller/nnf_node_ec_data_controller.go b/internal/controller/nnf_node_ec_data_controller.go index 6708f9636..f40979601 100644 --- a/internal/controller/nnf_node_ec_data_controller.go +++ b/internal/controller/nnf_node_ec_data_controller.go @@ -34,7 +34,7 @@ import ( nnfec "github.com/NearNodeFlash/nnf-ec/pkg" ec "github.com/NearNodeFlash/nnf-ec/pkg/ec" "github.com/NearNodeFlash/nnf-ec/pkg/persistent" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" "github.com/NearNodeFlash/nnf-sos/pkg/blockdevice" "github.com/go-logr/logr" @@ -71,14 +71,14 @@ func (r *NnfNodeECDataReconciler) Start(ctx context.Context) error { if !testing { // Create the resource if necessary - data := nnfv1alpha3.NnfNodeECData{} + data := nnfv1alpha4.NnfNodeECData{} if err := r.Get(ctx, r.NamespacedName, &data); err != nil { if !errors.IsNotFound(err) { return err } - data := nnfv1alpha3.NnfNodeECData{ + data := nnfv1alpha4.NnfNodeECData{ ObjectMeta: metav1.ObjectMeta{ Name: r.Name, Namespace: r.Namespace, @@ -172,7 +172,7 @@ func (*crdPersistentStorageInterface) Close() error { } func (psi *crdPersistentStorageInterface) View(fn func(persistent.PersistentStorageTransactionApi) error) error { - data := nnfv1alpha3.NnfNodeECData{} + data := nnfv1alpha4.NnfNodeECData{} if err := psi.reconciler.Get(context.TODO(), psi.reconciler.NamespacedName, &data); err != nil { return err } @@ -184,17 +184,17 @@ func (psi *crdPersistentStorageInterface) Update(fn func(persistent.PersistentSt Retry: - data := nnfv1alpha3.NnfNodeECData{} + data := nnfv1alpha4.NnfNodeECData{} if err := psi.reconciler.Get(context.TODO(), psi.reconciler.NamespacedName, &data); err != nil { return err } if data.Status.Data == nil { - data.Status.Data = make(map[string]nnfv1alpha3.NnfNodeECPrivateData) + data.Status.Data = make(map[string]nnfv1alpha4.NnfNodeECPrivateData) } if _, found := data.Status.Data[psi.name]; !found { - data.Status.Data[psi.name] = make(nnfv1alpha3.NnfNodeECPrivateData) + data.Status.Data[psi.name] = make(nnfv1alpha4.NnfNodeECPrivateData) } if err := fn(persistent.NewBase64PersistentStorageTransaction(data.Status.Data[psi.name])); err != nil { @@ -216,7 +216,7 @@ func (psi *crdPersistentStorageInterface) Delete(key string) error { Retry: - data := nnfv1alpha3.NnfNodeECData{} + data := nnfv1alpha4.NnfNodeECData{} if err := psi.reconciler.Get(context.TODO(), psi.reconciler.NamespacedName, &data); err != nil { return err } @@ -241,6 +241,6 @@ func (r *NnfNodeECDataReconciler) SetupWithManager(mgr ctrl.Manager) error { } return ctrl.NewControllerManagedBy(mgr). - For(&nnfv1alpha3.NnfNodeECData{}). + For(&nnfv1alpha4.NnfNodeECData{}). Complete(r) } diff --git a/internal/controller/nnf_node_storage_controller.go b/internal/controller/nnf_node_storage_controller.go index 94dc8dc2b..e40604a18 100644 --- a/internal/controller/nnf_node_storage_controller.go +++ b/internal/controller/nnf_node_storage_controller.go @@ -39,7 +39,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -49,8 +49,6 @@ const ( // prevents the system from deleting the custom resource until the // reconciler has finished using the resource. finalizerNnfNodeStorage = "nnf.cray.hpe.com/nnf_node_storage" - - nnfNodeStorageResourceName = "nnf-node-storage" ) // NnfNodeStorageReconciler contains the elements needed during reconciliation for NnfNodeStorage @@ -109,7 +107,7 @@ func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reque metrics.NnfNodeStorageReconcilesTotal.Inc() - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{} + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{} if err := r.Get(ctx, req.NamespacedName, nnfNodeStorage); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -125,7 +123,7 @@ func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reque // so when we would normally call "return ctrl.Result{}, nil", at that time // "err" is nil - and if permitted we will update err with the result of // the r.Update() - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfNodeStorageStatus](nnfNodeStorage) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfNodeStorageStatus](nnfNodeStorage) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { nnfNodeStorage.Status.SetResourceErrorAndLog(err, log) }() @@ -184,7 +182,7 @@ func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reque // Initialize the status section with empty allocation statuses. if len(nnfNodeStorage.Status.Allocations) == 0 { - nnfNodeStorage.Status.Allocations = make([]nnfv1alpha3.NnfNodeStorageAllocationStatus, nnfNodeStorage.Spec.Count) + nnfNodeStorage.Status.Allocations = make([]nnfv1alpha4.NnfNodeStorageAllocationStatus, nnfNodeStorage.Spec.Count) for i := range nnfNodeStorage.Status.Allocations { nnfNodeStorage.Status.Allocations[i].Ready = false } @@ -216,7 +214,7 @@ func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reque } for _, allocation := range nnfNodeStorage.Status.Allocations { - if allocation.Ready == false { + if !allocation.Ready { nnfNodeStorage.Status.Ready = false return ctrl.Result{Requeue: true}, nil @@ -228,7 +226,7 @@ func (r *NnfNodeStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reque return ctrl.Result{}, nil } -func (r *NnfNodeStorageReconciler) deleteAllocation(ctx context.Context, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, index int) (*ctrl.Result, error) { +func (r *NnfNodeStorageReconciler) deleteAllocation(ctx context.Context, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, index int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfNodeStorage", client.ObjectKeyFromObject(nnfNodeStorage), "index", index) blockDevice, fileSystem, err := getBlockDeviceAndFileSystem(ctx, r.Client, nnfNodeStorage, index, log) @@ -259,6 +257,17 @@ func (r *NnfNodeStorageReconciler) deleteAllocation(ctx context.Context, nnfNode log.Info("Activated file system", "allocation", index) } + lustreOST0 := nnfNodeStorage.Spec.FileSystemType == "lustre" && nnfNodeStorage.Spec.LustreStorage.TargetType == "ost" && nnfNodeStorage.Spec.LustreStorage.StartIndex == 0 + if lustreOST0 || nnfNodeStorage.Spec.FileSystemType != "lustre" { + ran, err = fileSystem.PreUnmount(ctx) + if err != nil { + return nil, dwsv1alpha2.NewResourceError("could not run pre unmount for file system").WithError(err).WithMajor() + } + if ran { + log.Info("Pre unmount file system", "allocation", index) + } + } + ran, err = fileSystem.PreDeactivate(ctx) if err != nil { return nil, dwsv1alpha2.NewResourceError("could not run pre deactivate for file system").WithError(err).WithMajor() @@ -303,7 +312,7 @@ func (r *NnfNodeStorageReconciler) deleteAllocation(ctx context.Context, nnfNode return nil, nil } -func (r *NnfNodeStorageReconciler) createAllocations(ctx context.Context, nnfNodeStorage *nnfv1alpha3.NnfNodeStorage, blockDevices []blockdevice.BlockDevice, fileSystems []filesystem.FileSystem) (*ctrl.Result, error) { +func (r *NnfNodeStorageReconciler) createAllocations(ctx context.Context, nnfNodeStorage *nnfv1alpha4.NnfNodeStorage, blockDevices []blockdevice.BlockDevice, fileSystems []filesystem.FileSystem) (*ctrl.Result, error) { log := r.Log.WithValues("NnfNodeStorage", client.ObjectKeyFromObject(nnfNodeStorage)) for index, blockDevice := range blockDevices { @@ -363,6 +372,19 @@ func (r *NnfNodeStorageReconciler) createAllocations(ctx context.Context, nnfNod log.Info("Post activate file system", "allocation", index) } + // For lustre, PostMount should only happen on OST0 only. For other file systems, just run + // PostMount + lustreOST0 := nnfNodeStorage.Spec.FileSystemType == "lustre" && nnfNodeStorage.Spec.LustreStorage.TargetType == "ost" && nnfNodeStorage.Spec.LustreStorage.StartIndex == 0 + if lustreOST0 || nnfNodeStorage.Spec.FileSystemType != "lustre" { + ran, err = fileSystem.PostMount(ctx, allocationStatus.Ready) + if err != nil { + return nil, dwsv1alpha2.NewResourceError("could not run post mount").WithError(err).WithMajor() + } + if ran { + log.Info("Post mount file system", "allocation", index) + } + } + allocationStatus.Ready = true } @@ -377,6 +399,6 @@ func (r *NnfNodeStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { maxReconciles := runtime.GOMAXPROCS(0) return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). - For(&nnfv1alpha3.NnfNodeStorage{}). + For(&nnfv1alpha4.NnfNodeStorage{}). Complete(r) } diff --git a/internal/controller/nnf_node_storage_controller_test.go b/internal/controller/nnf_node_storage_controller_test.go index 87a973abd..366ead0d9 100644 --- a/internal/controller/nnf_node_storage_controller_test.go +++ b/internal/controller/nnf_node_storage_controller_test.go @@ -31,13 +31,13 @@ import ( "k8s.io/apimachinery/pkg/types" nnf "github.com/NearNodeFlash/nnf-ec/pkg" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = PDescribe("NNF Node Storage Controller Test", func() { var ( key types.NamespacedName - storage *nnfv1alpha3.NnfNodeStorage + storage *nnfv1alpha4.NnfNodeStorage ) BeforeEach(func() { @@ -55,12 +55,12 @@ var _ = PDescribe("NNF Node Storage Controller Test", func() { Namespace: corev1.NamespaceDefault, } - storage = &nnfv1alpha3.NnfNodeStorage{ + storage = &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: key.Name, Namespace: key.Namespace, }, - Spec: nnfv1alpha3.NnfNodeStorageSpec{ + Spec: nnfv1alpha4.NnfNodeStorageSpec{ Count: 1, }, } @@ -70,13 +70,13 @@ var _ = PDescribe("NNF Node Storage Controller Test", func() { Expect(k8sClient.Create(context.TODO(), storage)).To(Succeed()) Eventually(func() error { - expected := &nnfv1alpha3.NnfNodeStorage{} + expected := &nnfv1alpha4.NnfNodeStorage{} return k8sClient.Get(context.TODO(), key, expected) }, "3s", "1s").Should(Succeed(), "expected return after create. key: "+key.String()) }) AfterEach(func() { - expected := &nnfv1alpha3.NnfNodeStorage{} + expected := &nnfv1alpha4.NnfNodeStorage{} Expect(k8sClient.Get(context.TODO(), key, expected)).To(Succeed()) Expect(k8sClient.Delete(context.TODO(), expected)).To(Succeed()) }) @@ -87,7 +87,7 @@ var _ = PDescribe("NNF Node Storage Controller Test", func() { }) It("is successful", func() { - expected := &nnfv1alpha3.NnfNodeStorage{} + expected := &nnfv1alpha4.NnfNodeStorage{} Expect(k8sClient.Get(context.TODO(), key, expected)).To(Succeed()) }) }) @@ -96,7 +96,7 @@ var _ = PDescribe("NNF Node Storage Controller Test", func() { BeforeEach(func() { storage.Spec.FileSystemType = "lustre" - storage.Spec.LustreStorage = nnfv1alpha3.LustreStorageSpec{ + storage.Spec.LustreStorage = nnfv1alpha4.LustreStorageSpec{ FileSystemName: "test", StartIndex: 0, MgsAddress: "test", @@ -106,7 +106,7 @@ var _ = PDescribe("NNF Node Storage Controller Test", func() { }) It("is successful", func() { - expected := &nnfv1alpha3.NnfNodeStorage{} + expected := &nnfv1alpha4.NnfNodeStorage{} Expect(k8sClient.Get(context.TODO(), key, expected)).To(Succeed()) }) }) diff --git a/internal/controller/nnf_persistentstorageinstance_controller.go b/internal/controller/nnf_persistentstorageinstance_controller.go index 421da5ced..9229d07e7 100644 --- a/internal/controller/nnf_persistentstorageinstance_controller.go +++ b/internal/controller/nnf_persistentstorageinstance_controller.go @@ -38,7 +38,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/dwdparse" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -153,8 +153,8 @@ func (r *PersistentStorageReconciler) Reconcile(ctx context.Context, req ctrl.Re return ctrl.Result{}, dwsv1alpha2.NewResourceError("").WithUserMessage("creating persistent MGT does not accept 'capacity' argument").WithFatal().WithUser() } labels := persistentStorage.GetLabels() - if _, ok := labels[nnfv1alpha3.StandaloneMGTLabel]; !ok { - labels[nnfv1alpha3.StandaloneMGTLabel] = pinnedProfile.Data.LustreStorage.StandaloneMGTPoolName + if _, ok := labels[nnfv1alpha4.StandaloneMGTLabel]; !ok { + labels[nnfv1alpha4.StandaloneMGTLabel] = pinnedProfile.Data.LustreStorage.StandaloneMGTPoolName persistentStorage.SetLabels(labels) if err := r.Update(ctx, persistentStorage); err != nil { if !apierrors.IsConflict(err) { @@ -193,7 +193,7 @@ func (r *PersistentStorageReconciler) Reconcile(ctx context.Context, req ctrl.Re } else if persistentStorage.Spec.State == dwsv1alpha2.PSIStateActive { // Wait for the NnfStorage to be ready before marking the persistent storage // state as "active" - nnfStorage := &nnfv1alpha3.NnfStorage{} + nnfStorage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, req.NamespacedName, nnfStorage); err != nil { return ctrl.Result{}, client.IgnoreNotFound(err) } @@ -261,9 +261,9 @@ func (r *PersistentStorageReconciler) createServers(ctx context.Context, persist // SetupWithManager sets up the controller with the Manager. func (r *PersistentStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { r.ChildObjects = []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfStorageList{}, + &nnfv1alpha4.NnfStorageList{}, &dwsv1alpha2.ServersList{}, - &nnfv1alpha3.NnfStorageProfileList{}, + &nnfv1alpha4.NnfStorageProfileList{}, } maxReconciles := runtime.GOMAXPROCS(0) @@ -271,7 +271,7 @@ func (r *PersistentStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). For(&dwsv1alpha2.PersistentStorageInstance{}). Owns(&dwsv1alpha2.Servers{}). - Owns(&nnfv1alpha3.NnfStorage{}). - Owns(&nnfv1alpha3.NnfStorageProfile{}). + Owns(&nnfv1alpha4.NnfStorage{}). + Owns(&nnfv1alpha4.NnfStorageProfile{}). Complete(r) } diff --git a/internal/controller/nnf_persistentstorageinstance_controller_test.go b/internal/controller/nnf_persistentstorageinstance_controller_test.go index 7d3e922d1..cb79fc401 100644 --- a/internal/controller/nnf_persistentstorageinstance_controller_test.go +++ b/internal/controller/nnf_persistentstorageinstance_controller_test.go @@ -30,12 +30,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("PersistentStorage test", func() { var ( - storageProfile *nnfv1alpha3.NnfStorageProfile + storageProfile *nnfv1alpha4.NnfStorageProfile ) BeforeEach(func() { @@ -45,7 +45,7 @@ var _ = Describe("PersistentStorage test", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) @@ -83,7 +83,7 @@ var _ = Describe("PersistentStorage test", func() { return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(servers), servers) }).Should(Succeed(), "Create the DWS Servers Resource") - pinnedStorageProfile := &nnfv1alpha3.NnfStorageProfile{ + pinnedStorageProfile := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: persistentStorage.GetName(), Namespace: persistentStorage.GetNamespace(), diff --git a/internal/controller/nnf_port_manager_controller.go b/internal/controller/nnf_port_manager_controller.go index f31333a8c..e71af5e3e 100644 --- a/internal/controller/nnf_port_manager_controller.go +++ b/internal/controller/nnf_port_manager_controller.go @@ -36,7 +36,7 @@ import ( "github.com/go-logr/logr" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // NnfPortManagerReconciler reconciles a NnfPortManager object @@ -46,8 +46,8 @@ type NnfPortManagerReconciler struct { } // type aliases for name shortening -type AllocationSpec = nnfv1alpha3.NnfPortManagerAllocationSpec -type AllocationStatus = nnfv1alpha3.NnfPortManagerAllocationStatus +type AllocationSpec = nnfv1alpha4.NnfPortManagerAllocationSpec +type AllocationStatus = nnfv1alpha4.NnfPortManagerAllocationStatus //+kubebuilder:rbac:groups=nnf.cray.hpe.com,resources=nnfportmanagers,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=nnf.cray.hpe.com,resources=nnfportmanagers/status,verbs=get;update;patch @@ -65,13 +65,13 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque log := log.FromContext(ctx) unsatisfiedRequests := 0 - mgr := &nnfv1alpha3.NnfPortManager{} + mgr := &nnfv1alpha4.NnfPortManager{} if err := r.Get(ctx, req.NamespacedName, mgr); err != nil { return ctrl.Result{}, client.IgnoreNotFound(err) } // Create a resource status updater to ensure the status subresource is updated. - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfPortManagerStatus](mgr) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfPortManagerStatus](mgr) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() // Read in the system configuration which contains the available ports. @@ -82,14 +82,14 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque }, } - mgr.Status.Status = nnfv1alpha3.NnfPortManagerStatusReady + mgr.Status.Status = nnfv1alpha4.NnfPortManagerStatusReady if err := r.Get(ctx, client.ObjectKeyFromObject(config), config); err != nil { if !errors.IsNotFound(err) { return ctrl.Result{}, err } log.Info("System Configuration not found", "config", client.ObjectKeyFromObject(config).String()) - mgr.Status.Status = nnfv1alpha3.NnfPortManagerStatusSystemConfigurationNotFound + mgr.Status.Status = nnfv1alpha4.NnfPortManagerStatusSystemConfigurationNotFound res = ctrl.Result{Requeue: true} // Force a requeue - we want the manager to go ready even if there are zero allocations } @@ -100,18 +100,18 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque // allocating the desired ports. for _, spec := range mgr.Spec.Allocations { var ports []uint16 - var status nnfv1alpha3.NnfPortManagerAllocationStatusStatus - var allocationStatus *nnfv1alpha3.NnfPortManagerAllocationStatus + var status nnfv1alpha4.NnfPortManagerAllocationStatusStatus + var allocationStatus *nnfv1alpha4.NnfPortManagerAllocationStatus // If the specification is already included in the allocations and InUse, continue allocationStatus = r.findAllocationStatus(mgr, spec) - if allocationStatus != nil && allocationStatus.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInUse { + if allocationStatus != nil && allocationStatus.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInUse { continue } // Determine if the port manager is ready and find a free port - if mgr.Status.Status != nnfv1alpha3.NnfPortManagerStatusReady { - ports, status = nil, nnfv1alpha3.NnfPortManagerAllocationStatusInvalidConfiguration + if mgr.Status.Status != nnfv1alpha4.NnfPortManagerStatusReady { + ports, status = nil, nnfv1alpha4.NnfPortManagerAllocationStatusInvalidConfiguration } else { ports, status = r.findFreePorts(log, mgr, config, spec) } @@ -119,7 +119,7 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque log.Info("Allocation", "requester", spec.Requester, "count", spec.Count, "ports", ports, "status", status) // Port could not be allocated - try again next time - if status != nnfv1alpha3.NnfPortManagerAllocationStatusInUse { + if status != nnfv1alpha4.NnfPortManagerAllocationStatusInUse { unsatisfiedRequests++ log.Info("Allocation unsatisfied", "requester", spec.Requester, "count", spec.Count, "ports", ports, "status", status) } @@ -135,7 +135,7 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque spec.Requester.DeepCopyInto(allocationStatus.Requester) if mgr.Status.Allocations == nil { - mgr.Status.Allocations = make([]nnfv1alpha3.NnfPortManagerAllocationStatus, 0) + mgr.Status.Allocations = make([]nnfv1alpha4.NnfPortManagerAllocationStatus, 0) } mgr.Status.Allocations = append(mgr.Status.Allocations, allocationStatus) @@ -158,8 +158,8 @@ func (r *NnfPortManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reque // isAllocationNeeded returns true if the provided Port Allocation Status has a matching value // requester in the specification, and false otherwise. -func (r *NnfPortManagerReconciler) isAllocationNeeded(mgr *nnfv1alpha3.NnfPortManager, status *AllocationStatus) bool { - if status.Status != nnfv1alpha3.NnfPortManagerAllocationStatusInUse && status.Status != nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources { +func (r *NnfPortManagerReconciler) isAllocationNeeded(mgr *nnfv1alpha4.NnfPortManager, status *AllocationStatus) bool { + if status.Status != nnfv1alpha4.NnfPortManagerAllocationStatusInUse && status.Status != nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources { return false } @@ -176,7 +176,7 @@ func (r *NnfPortManagerReconciler) isAllocationNeeded(mgr *nnfv1alpha3.NnfPortMa return false } -func (r *NnfPortManagerReconciler) cleanupUnusedAllocations(log logr.Logger, mgr *nnfv1alpha3.NnfPortManager, cooldown int) { +func (r *NnfPortManagerReconciler) cleanupUnusedAllocations(log logr.Logger, mgr *nnfv1alpha4.NnfPortManager, cooldown int) { // Free unused allocations. This will check if the Status.Allocations exist in // the list of desired allocations in the Spec field and mark any unused allocations @@ -193,7 +193,7 @@ func (r *NnfPortManagerReconciler) cleanupUnusedAllocations(log logr.Logger, mgr if cooldown == 0 { allocsToRemove = append(allocsToRemove, idx) log.Info("Allocation unused - removing", "requester", status.Requester, "status", status.Status) - } else if status.Status == nnfv1alpha3.NnfPortManagerAllocationStatusCooldown { + } else if status.Status == nnfv1alpha4.NnfPortManagerAllocationStatusCooldown { period := now.Sub(status.TimeUnallocated.Time) log.Info("Allocation unused - checking cooldown", "requester", status.Requester, "status", status.Status, "period", period, "time", status.TimeUnallocated.String()) if period >= time.Duration(cooldown)*time.Second { @@ -202,7 +202,7 @@ func (r *NnfPortManagerReconciler) cleanupUnusedAllocations(log logr.Logger, mgr } } else if status.TimeUnallocated == nil { status.TimeUnallocated = &now - status.Status = nnfv1alpha3.NnfPortManagerAllocationStatusCooldown + status.Status = nnfv1alpha4.NnfPortManagerAllocationStatusCooldown log.Info("Allocation unused -- cooldown set", "requester", status.Requester, "status", status.Status) } } @@ -214,7 +214,7 @@ func (r *NnfPortManagerReconciler) cleanupUnusedAllocations(log logr.Logger, mgr } } -func (r *NnfPortManagerReconciler) findAllocationStatus(mgr *nnfv1alpha3.NnfPortManager, spec AllocationSpec) *AllocationStatus { +func (r *NnfPortManagerReconciler) findAllocationStatus(mgr *nnfv1alpha4.NnfPortManager, spec AllocationSpec) *AllocationStatus { for idx := range mgr.Status.Allocations { status := &mgr.Status.Allocations[idx] if status.Requester == nil { @@ -231,17 +231,17 @@ func (r *NnfPortManagerReconciler) findAllocationStatus(mgr *nnfv1alpha3.NnfPort // isAllocated returns true if the provided specification is in the Port Manager's allocation // status', and false otherwise. -func (r *NnfPortManagerReconciler) isAllocated(mgr *nnfv1alpha3.NnfPortManager, spec AllocationSpec) bool { +func (r *NnfPortManagerReconciler) isAllocated(mgr *nnfv1alpha4.NnfPortManager, spec AllocationSpec) bool { return r.findAllocationStatus(mgr, spec) != nil } // Find free ports to satisfy the provided specification. -func (r *NnfPortManagerReconciler) findFreePorts(log logr.Logger, mgr *nnfv1alpha3.NnfPortManager, config *dwsv1alpha2.SystemConfiguration, spec AllocationSpec) ([]uint16, nnfv1alpha3.NnfPortManagerAllocationStatusStatus) { +func (r *NnfPortManagerReconciler) findFreePorts(log logr.Logger, mgr *nnfv1alpha4.NnfPortManager, config *dwsv1alpha2.SystemConfiguration, spec AllocationSpec) ([]uint16, nnfv1alpha4.NnfPortManagerAllocationStatusStatus) { portsInUse := make([]uint16, 0) for _, status := range mgr.Status.Allocations { - if status.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInUse || - status.Status == nnfv1alpha3.NnfPortManagerAllocationStatusCooldown { + if status.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInUse || + status.Status == nnfv1alpha4.NnfPortManagerAllocationStatusCooldown { portsInUse = append(portsInUse, status.Ports...) } } @@ -276,7 +276,7 @@ func (r *NnfPortManagerReconciler) findFreePorts(log logr.Logger, mgr *nnfv1alph if len(ports) >= count { log.Info("Ports claimed from system configuration", "ports", ports) - return ports[:count], nnfv1alpha3.NnfPortManagerAllocationStatusInUse + return ports[:count], nnfv1alpha4.NnfPortManagerAllocationStatusInUse } // If we still haven't found a sufficient number of free ports, free up unused allocations @@ -293,7 +293,7 @@ func (r *NnfPortManagerReconciler) findFreePorts(log logr.Logger, mgr *nnfv1alph for idx := range mgr.Status.Allocations { status := &mgr.Status.Allocations[idx] - if status.Status == nnfv1alpha3.NnfPortManagerAllocationStatusFree { + if status.Status == nnfv1alpha4.NnfPortManagerAllocationStatusFree { log.Info("Ports claimed from free list", "ports", status.Ports) // Append this values ports to the returned ports. We could over-allocate here, but @@ -314,18 +314,18 @@ func (r *NnfPortManagerReconciler) findFreePorts(log logr.Logger, mgr *nnfv1alph for len(ports) < count { switch claimPortsFromFreeAllocation() { case exhausted: - return []uint16{}, nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources + return []uint16{}, nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources case more: // loop again if needed } } - return ports[:count], nnfv1alpha3.NnfPortManagerAllocationStatusInUse + return ports[:count], nnfv1alpha4.NnfPortManagerAllocationStatusInUse } // SetupWithManager sets up the controller with the Manager. func (r *NnfPortManagerReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&nnfv1alpha3.NnfPortManager{}). + For(&nnfv1alpha4.NnfPortManager{}). Complete(r) } diff --git a/internal/controller/nnf_port_manager_controller_test.go b/internal/controller/nnf_port_manager_controller_test.go index c5508fa3c..31135d02e 100644 --- a/internal/controller/nnf_port_manager_controller_test.go +++ b/internal/controller/nnf_port_manager_controller_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { @@ -47,7 +47,7 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { Describe("NNF Port Manager Controller Test", func() { var cfg *dwsv1alpha2.SystemConfiguration - var mgr *nnfv1alpha3.NnfPortManager + var mgr *nnfv1alpha4.NnfPortManager portCooldown := 1 JustBeforeEach(func() { @@ -73,18 +73,18 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { } }) - mgr = &nnfv1alpha3.NnfPortManager{ + mgr = &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-port-manager", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfPortManagerSpec{ + Spec: nnfv1alpha4.NnfPortManagerSpec{ SystemConfiguration: corev1.ObjectReference{ Name: cfg.Name, Namespace: cfg.Namespace, Kind: reflect.TypeOf(*cfg).Name(), }, - Allocations: make([]nnfv1alpha3.NnfPortManagerAllocationSpec, 0), + Allocations: make([]nnfv1alpha4.NnfPortManagerAllocationSpec, 0), }, } Expect(k8sClient.Create(ctx, mgr)).To(Succeed()) @@ -103,10 +103,10 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { // Submit an allocation and verify it has been accounted for - this doesn't mean the ports // were successfully allocated, however. - allocatePorts := func(mgr *nnfv1alpha3.NnfPortManager, name string, count int) []uint16 { + allocatePorts := func(mgr *nnfv1alpha4.NnfPortManager, name string, count int) []uint16 { By(fmt.Sprintf("Reserving %d ports for '%s'", count, name)) - allocation := nnfv1alpha3.NnfPortManagerAllocationSpec{ + allocation := nnfv1alpha4.NnfPortManagerAllocationSpec{ Requester: corev1.ObjectReference{Name: name}, Count: count, } @@ -129,10 +129,10 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { } // Submit an allocation and expect it to be successfully allocated (i.e. ports InUse) - reservePorts := func(mgr *nnfv1alpha3.NnfPortManager, name string, count int) []uint16 { + reservePorts := func(mgr *nnfv1alpha4.NnfPortManager, name string, count int) []uint16 { ports := allocatePorts(mgr, name, count) - allocation := nnfv1alpha3.NnfPortManagerAllocationSpec{ + allocation := nnfv1alpha4.NnfPortManagerAllocationSpec{ Requester: corev1.ObjectReference{Name: name}, Count: count, } @@ -140,16 +140,16 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { status := r.findAllocationStatus(mgr, allocation) Expect(status).ToNot(BeNil()) Expect(status.Ports).To(HaveLen(allocation.Count)) - Expect(status.Status).To(Equal(nnfv1alpha3.NnfPortManagerAllocationStatusInUse)) + Expect(status.Status).To(Equal(nnfv1alpha4.NnfPortManagerAllocationStatusInUse)) return ports } - reservePortsAllowFail := func(mgr *nnfv1alpha3.NnfPortManager, name string, count int) []uint16 { + reservePortsAllowFail := func(mgr *nnfv1alpha4.NnfPortManager, name string, count int) []uint16 { return allocatePorts(mgr, name, count) } - releasePorts := func(mgr *nnfv1alpha3.NnfPortManager, name string) { + releasePorts := func(mgr *nnfv1alpha4.NnfPortManager, name string) { By(fmt.Sprintf("Releasing ports for '%s'", name)) requester := corev1.ObjectReference{Name: name} @@ -170,7 +170,7 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { // Simple way to fire the reconciler to test the cooldown handling // without having to reserve new ports. This is just to limit the scope // of the test. - kickPortManager := func(mgr *nnfv1alpha3.NnfPortManager) { + kickPortManager := func(mgr *nnfv1alpha4.NnfPortManager) { By("Kicking port manager to force reconcile") Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(mgr), mgr)).To(Succeed()) @@ -183,7 +183,7 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { } // Verify the number of allocations in the status allocation list that are InUse - verifyNumAllocations := func(mgr *nnfv1alpha3.NnfPortManager, status nnfv1alpha3.NnfPortManagerAllocationStatusStatus, count int) { + verifyNumAllocations := func(mgr *nnfv1alpha4.NnfPortManager, status nnfv1alpha4.NnfPortManagerAllocationStatusStatus, count int) { By(fmt.Sprintf("Verifying there are %d allocations with Status %s in the status allocation list", count, status)) Eventually(func() int { @@ -198,16 +198,16 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { }).Should(Equal(count)) } - verifyNumAllocationsInUse := func(mgr *nnfv1alpha3.NnfPortManager, count int) { - verifyNumAllocations(mgr, nnfv1alpha3.NnfPortManagerAllocationStatusInUse, count) + verifyNumAllocationsInUse := func(mgr *nnfv1alpha4.NnfPortManager, count int) { + verifyNumAllocations(mgr, nnfv1alpha4.NnfPortManagerAllocationStatusInUse, count) } - verifyNumAllocationsCooldown := func(mgr *nnfv1alpha3.NnfPortManager, count int) { - verifyNumAllocations(mgr, nnfv1alpha3.NnfPortManagerAllocationStatusCooldown, count) + verifyNumAllocationsCooldown := func(mgr *nnfv1alpha4.NnfPortManager, count int) { + verifyNumAllocations(mgr, nnfv1alpha4.NnfPortManagerAllocationStatusCooldown, count) } - verifyNumAllocationsInsuffientResources := func(mgr *nnfv1alpha3.NnfPortManager, count int) { - verifyNumAllocations(mgr, nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources, count) + verifyNumAllocationsInsuffientResources := func(mgr *nnfv1alpha4.NnfPortManager, count int) { + verifyNumAllocations(mgr, nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources, count) } waitForCooldown := func(extra int) { @@ -226,10 +226,10 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { kickPortManager(mgr) - Eventually(func() nnfv1alpha3.NnfPortManagerStatusStatus { + Eventually(func() nnfv1alpha4.NnfPortManagerStatusStatus { k8sClient.Get(ctx, client.ObjectKeyFromObject(mgr), mgr) return mgr.Status.Status - }).Should(Equal(nnfv1alpha3.NnfPortManagerStatusSystemConfigurationNotFound)) + }).Should(Equal(nnfv1alpha4.NnfPortManagerStatusSystemConfigurationNotFound)) }) }) @@ -334,7 +334,7 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { const name = "all" reservePorts(mgr, name, portEnd-portStart+1) - allocation := nnfv1alpha3.NnfPortManagerAllocationSpec{ + allocation := nnfv1alpha4.NnfPortManagerAllocationSpec{ Requester: corev1.ObjectReference{Name: "insufficient-resources"}, Count: 1, } @@ -353,7 +353,7 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { status := r.findAllocationStatus(mgr, allocation) Expect(status).ToNot(BeNil()) Expect(status.Ports).To(BeEmpty()) - Expect(status.Status).To(Equal(nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources)) + Expect(status.Status).To(Equal(nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources)) }) }) @@ -388,12 +388,12 @@ var _ = Context("NNF Port Manager Controller Setup", Ordered, func() { By("Attempting to reserve an additional port and failing") ports := reservePortsAllowFail(mgr, "waiting", 1) - allocation := nnfv1alpha3.NnfPortManagerAllocationSpec{Requester: corev1.ObjectReference{Name: "waiting"}, Count: 1} + allocation := nnfv1alpha4.NnfPortManagerAllocationSpec{Requester: corev1.ObjectReference{Name: "waiting"}, Count: 1} status := r.findAllocationStatus(mgr, allocation) Expect(ports).To(HaveLen(0)) Expect(status).ToNot(BeNil()) - Expect(status.Status).To(Equal(nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources)) + Expect(status.Status).To(Equal(nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources)) verifyNumAllocationsInUse(mgr, portTotal) verifyNumAllocationsInsuffientResources(mgr, 1) diff --git a/internal/controller/nnf_storage_controller.go b/internal/controller/nnf_storage_controller.go index 360ae828b..a6a506b16 100644 --- a/internal/controller/nnf_storage_controller.go +++ b/internal/controller/nnf_storage_controller.go @@ -44,7 +44,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -63,10 +63,6 @@ const ( // has finished in using the resource. finalizerNnfStorage = "nnf.cray.hpe.com/nnf_storage" - // ownerAnnotation is a name/namespace pair used on the NnfNodeStorage resources - // for owner information. See nnfNodeStorageMapFunc() below. - ownerAnnotation = "nnf.cray.hpe.com/owner" - // Minimum size of lustre allocation sizes. If a user requests less than this, then the capacity // is set to this value. minimumLustreAllocationSizeInBytes = 4000000000 @@ -99,7 +95,7 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) log := r.Log.WithValues("NnfStorage", req.NamespacedName) metrics.NnfStorageReconcilesTotal.Inc() - storage := &nnfv1alpha3.NnfStorage{} + storage := &nnfv1alpha4.NnfStorage{} if err := r.Get(ctx, req.NamespacedName, storage); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -110,7 +106,7 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Create an updater for the entire node. This will handle calls to r.Status().Update() such // that we can repeatedly make calls to the internal update method, with the final update // occuring on the on function exit. - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfStorageStatus](storage) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfStorageStatus](storage) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { storage.Status.SetResourceErrorAndLog(err, log) }() @@ -160,7 +156,7 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Initialize the status section of the NnfStorage if it hasn't been done already. if len(storage.Status.AllocationSets) != len(storage.Spec.AllocationSets) { - storage.Status.AllocationSets = make([]nnfv1alpha3.NnfStorageAllocationSetStatus, len(storage.Spec.AllocationSets)) + storage.Status.AllocationSets = make([]nnfv1alpha4.NnfStorageAllocationSetStatus, len(storage.Spec.AllocationSets)) for i := range storage.Status.AllocationSets { storage.Status.AllocationSets[i].Ready = false } @@ -196,6 +192,18 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) } } + // Collect the lists of nodes for each lustre component used for the filesystem + if storage.Spec.FileSystemType == "lustre" { + components := getLustreMappingFromStorage(storage) + storage.Status.LustreComponents = nnfv1alpha4.NnfStorageLustreComponents{ + MDTs: components["mdt"], + MGTs: components["mgt"], + MGTMDTs: components["mgtmdt"], + OSTs: components["ost"], + NNFNodes: components["nnfNode"], + } + } + // For each allocation, create the NnfNodeStorage resources to fan out to the Rabbit nodes for i, allocationSet := range storage.Spec.AllocationSets { // Add a reference to the external MGS PersistentStorageInstance if necessary @@ -218,7 +226,7 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Collect status information from the NnfNodeStorage resources and aggregate it into the // NnfStorage for i := range storage.Spec.AllocationSets { - res, err := r.aggregateNodeStorageStatus(ctx, storage, i, false) + res, err := r.aggregateNodeStorageStatus(ctx, storage, i, false, false) if err != nil { return ctrl.Result{}, err } @@ -234,12 +242,12 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Wait for all the allocation sets to be ready for _, allocationSet := range storage.Status.AllocationSets { - if allocationSet.Ready == false { + if !allocationSet.Ready { return ctrl.Result{}, nil } } - if storage.Spec.FileSystemType == "lustre" && storage.Status.Ready == false { + if storage.Spec.FileSystemType == "lustre" && !storage.Status.Ready { res, err := r.setLustreOwnerGroup(ctx, storage) if err != nil { return ctrl.Result{}, err @@ -256,7 +264,7 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request) return ctrl.Result{}, nil } -func (r *NnfStorageReconciler) addPersistentStorageReference(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage, persistentMgsReference corev1.ObjectReference) error { +func (r *NnfStorageReconciler) addPersistentStorageReference(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage, persistentMgsReference corev1.ObjectReference) error { persistentStorage := &dwsv1alpha2.PersistentStorageInstance{ ObjectMeta: metav1.ObjectMeta{ Name: persistentMgsReference.Name, @@ -276,7 +284,7 @@ func (r *NnfStorageReconciler) addPersistentStorageReference(ctx context.Context reference := corev1.ObjectReference{ Name: nnfStorage.Name, Namespace: nnfStorage.Namespace, - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), } for _, existingReference := range persistentStorage.Spec.ConsumerReferences { @@ -290,7 +298,7 @@ func (r *NnfStorageReconciler) addPersistentStorageReference(ctx context.Context return r.Update(ctx, persistentStorage) } -func (r *NnfStorageReconciler) removePersistentStorageReference(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage, persistentMgsReference corev1.ObjectReference) error { +func (r *NnfStorageReconciler) removePersistentStorageReference(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage, persistentMgsReference corev1.ObjectReference) error { persistentStorage := &dwsv1alpha2.PersistentStorageInstance{ ObjectMeta: metav1.ObjectMeta{ Name: persistentMgsReference.Name, @@ -306,7 +314,7 @@ func (r *NnfStorageReconciler) removePersistentStorageReference(ctx context.Cont reference := corev1.ObjectReference{ Name: nnfStorage.Name, Namespace: nnfStorage.Namespace, - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), } for i, existingReference := range persistentStorage.Spec.ConsumerReferences { @@ -319,7 +327,7 @@ func (r *NnfStorageReconciler) removePersistentStorageReference(ctx context.Cont return nil } -func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { +func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfStorage", client.ObjectKeyFromObject(nnfStorage)) allocationSet := nnfStorage.Spec.AllocationSets[allocationSetIndex] @@ -327,7 +335,7 @@ func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfSt for i, node := range allocationSet.Nodes { // Per Rabbit namespace. - nnfNodeBlockStorage := &nnfv1alpha3.NnfNodeBlockStorage{ + nnfNodeBlockStorage := &nnfv1alpha4.NnfNodeBlockStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorageName(nnfStorage, allocationSetIndex, i), Namespace: node.Name, @@ -340,7 +348,7 @@ func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfSt dwsv1alpha2.AddOwnerLabels(nnfNodeBlockStorage, nnfStorage) labels := nnfNodeBlockStorage.GetLabels() - labels[nnfv1alpha3.AllocationSetLabel] = allocationSet.Name + labels[nnfv1alpha4.AllocationSetLabel] = allocationSet.Name nnfNodeBlockStorage.SetLabels(labels) expectedAllocations := node.Count @@ -350,7 +358,7 @@ func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfSt nnfNodeBlockStorage.Spec.SharedAllocation = allocationSet.SharedAllocation if len(nnfNodeBlockStorage.Spec.Allocations) == 0 { - nnfNodeBlockStorage.Spec.Allocations = make([]nnfv1alpha3.NnfNodeBlockStorageAllocationSpec, expectedAllocations) + nnfNodeBlockStorage.Spec.Allocations = make([]nnfv1alpha4.NnfNodeBlockStorageAllocationSpec, expectedAllocations) } if len(nnfNodeBlockStorage.Spec.Allocations) != expectedAllocations { @@ -400,15 +408,15 @@ func (r *NnfStorageReconciler) createNodeBlockStorage(ctx context.Context, nnfSt // Get the status from all the child NnfNodeBlockStorage resources and use them to build the status // for the NnfStorage. -func (r *NnfStorageReconciler) aggregateNodeBlockStorageStatus(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { +func (r *NnfStorageReconciler) aggregateNodeBlockStorageStatus(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfStorage", types.NamespacedName{Name: nnfStorage.Name, Namespace: nnfStorage.Namespace}) allocationSet := &nnfStorage.Status.AllocationSets[allocationSetIndex] allocationSet.AllocationCount = 0 - nnfNodeBlockStorageList := &nnfv1alpha3.NnfNodeBlockStorageList{} + nnfNodeBlockStorageList := &nnfv1alpha4.NnfNodeBlockStorageList{} matchLabels := dwsv1alpha2.MatchingOwner(nnfStorage) - matchLabels[nnfv1alpha3.AllocationSetLabel] = nnfStorage.Spec.AllocationSets[allocationSetIndex].Name + matchLabels[nnfv1alpha4.AllocationSetLabel] = nnfStorage.Spec.AllocationSets[allocationSetIndex].Name listOptions := []client.ListOption{ matchLabels, @@ -426,7 +434,7 @@ func (r *NnfStorageReconciler) aggregateNodeBlockStorageStatus(ctx context.Conte // prune out any entries that aren't in the NnfStorage. This can happen if the NnfStorage was modified // after it was created, as is the case with NnfStorages from an NnfSystemStorage - nnfNodeBlockStorages := []nnfv1alpha3.NnfNodeBlockStorage{} + nnfNodeBlockStorages := []nnfv1alpha4.NnfNodeBlockStorage{} for _, nnfNodeBlockStorage := range nnfNodeBlockStorageList.Items { if _, exists := nodeNameMap[nnfNodeBlockStorage.GetNamespace()]; exists { nnfNodeBlockStorages = append(nnfNodeBlockStorages, nnfNodeBlockStorage) @@ -470,7 +478,7 @@ func (r *NnfStorageReconciler) aggregateNodeBlockStorageStatus(ctx context.Conte } for _, nnfNodeBlockStorage := range nnfNodeBlockStorages { - if nnfNodeBlockStorage.Status.Ready == false { + if !nnfNodeBlockStorage.Status.Ready { return &ctrl.Result{}, nil } } @@ -491,7 +499,7 @@ func (r *NnfStorageReconciler) aggregateNodeBlockStorageStatus(ctx context.Conte // Create an NnfNodeStorage if it doesn't exist, or update it if it requires updating. Each // Rabbit node gets an NnfNodeStorage, and there may be multiple allocations requested in it. // This limits the number of resources that have to be broadcast to the Rabbits. -func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *nnfv1alpha3.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { +func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *nnfv1alpha4.NnfStorage, allocationSetIndex int) (*ctrl.Result, error) { log := r.Log.WithValues("NnfStorage", types.NamespacedName{Name: storage.Name, Namespace: storage.Namespace}) if storage.Spec.FileSystemType == "lustre" { @@ -503,7 +511,7 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n if allocationSet.TargetType == "mgt" || allocationSet.TargetType == "mgtmdt" { // Wait for the MGT to be set up before creating nnfnodestorages for the other allocation sets if allocationSetIndex != i { - if storage.Status.AllocationSets[i].Ready == false { + if !storage.Status.AllocationSets[i].Ready { return nil, nil } } @@ -514,7 +522,7 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n } if mgsNode != "" { - nnfNode := &nnfv1alpha3.NnfNode{ + nnfNode := &nnfv1alpha4.NnfNode{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: mgsNode, @@ -535,12 +543,12 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n // Create the NnfLustreMGT resource if this allocation set is for an MGT allocationSet := storage.Spec.AllocationSets[allocationSetIndex] if allocationSet.TargetType == "mgt" || allocationSet.TargetType == "mgtmdt" { - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: storage.GetName(), Namespace: mgsNode, }, - Spec: nnfv1alpha3.NnfLustreMGTSpec{ + Spec: nnfv1alpha4.NnfLustreMGTSpec{ Addresses: []string{mgsAddress}, FsNameStart: "aaaaaaaa", }, @@ -573,29 +581,63 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n } allocationSet := storage.Spec.AllocationSets[allocationSetIndex] + lustreOST := storage.Spec.FileSystemType == "lustre" && allocationSet.TargetType == "ost" + + // When creating lustre filesystems, we want to create Lustre OST0 last so we can signal to the + // NnfNodeStorage controller when it is OK to run PostMount commands. OST0 should be created + // last and only when all of the other NnfNodeStorage for each allocation sets is ready. Until + // those are ready, skip the creation of OST0. + skipOST0 := false + if lustreOST { + for i := range storage.Spec.AllocationSets { + res, err := r.aggregateNodeStorageStatus(ctx, storage, i, false, true) + if err != nil { + return &ctrl.Result{}, err + } + + if res != nil { + if *res == (ctrl.Result{}) { + skipOST0 = true // not ready, skip OST0 + continue + } else { + return res, nil + } + } + } + } + startIndex := 0 for i, node := range allocationSet.Nodes { // Per Rabbit namespace. - nnfNodeStorage := &nnfv1alpha3.NnfNodeStorage{ + nnfNodeStorage := &nnfv1alpha4.NnfNodeStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfNodeStorageName(storage, allocationSetIndex, i), Namespace: node.Name, }, } + // Do not create lustre OST0 until all other NnfNodeStorages are ready + if lustreOST && startIndex == 0 && skipOST0 { + startIndex += node.Count + continue + } + result, err := ctrl.CreateOrUpdate(ctx, r.Client, nnfNodeStorage, func() error { dwsv1alpha2.InheritParentLabels(nnfNodeStorage, storage) dwsv1alpha2.AddOwnerLabels(nnfNodeStorage, storage) labels := nnfNodeStorage.GetLabels() - labels[nnfv1alpha3.AllocationSetLabel] = allocationSet.Name + labels[nnfv1alpha4.AllocationSetLabel] = allocationSet.Name + if lustreOST && startIndex == 0 { + labels[nnfv1alpha4.AllocationSetOST0Label] = "true" + } nnfNodeStorage.SetLabels(labels) nnfNodeStorage.Spec.BlockReference = corev1.ObjectReference{ Name: nnfNodeStorageName(storage, allocationSetIndex, i), Namespace: node.Name, - Kind: reflect.TypeOf(nnfv1alpha3.NnfNodeBlockStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfNodeBlockStorage{}).Name(), } nnfNodeStorage.Spec.Capacity = allocationSet.Capacity nnfNodeStorage.Spec.UserID = storage.Spec.UserID @@ -609,6 +651,7 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n nnfNodeStorage.Spec.LustreStorage.TargetType = allocationSet.TargetType nnfNodeStorage.Spec.LustreStorage.FileSystemName = storage.Status.FileSystemName nnfNodeStorage.Spec.LustreStorage.MgsAddress = storage.Status.MgsAddress + nnfNodeStorage.Spec.LustreStorage.LustreComponents = storage.Status.LustreComponents // If this isn't the first allocation, then change MGTMDT to MDT so that we only get a single MGT if allocationSet.TargetType == "mgtmdt" && startIndex != 0 { @@ -641,13 +684,15 @@ func (r *NnfStorageReconciler) createNodeStorage(ctx context.Context, storage *n } // Get the status from all the child NnfNodeStorage resources and use them to build the status -// for the NnfStorage. -func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, storage *nnfv1alpha3.NnfStorage, allocationSetIndex int, deleting bool) (*ctrl.Result, error) { +// for the NnfStorage. When skipOST0 is set, expect 1 less NnfNodeStorage resource when processing +// allocationSets for Lustre OST. +func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, storage *nnfv1alpha4.NnfStorage, allocationSetIndex int, deleting, skipOST0 bool) (*ctrl.Result, error) { log := r.Log.WithValues("NnfStorage", types.NamespacedName{Name: storage.Name, Namespace: storage.Namespace}) + lustreOST := storage.Spec.FileSystemType == "lustre" && storage.Spec.AllocationSets[allocationSetIndex].TargetType == "ost" - nnfNodeStorageList := &nnfv1alpha3.NnfNodeStorageList{} + nnfNodeStorageList := &nnfv1alpha4.NnfNodeStorageList{} matchLabels := dwsv1alpha2.MatchingOwner(storage) - matchLabels[nnfv1alpha3.AllocationSetLabel] = storage.Spec.AllocationSets[allocationSetIndex].Name + matchLabels[nnfv1alpha4.AllocationSetLabel] = storage.Spec.AllocationSets[allocationSetIndex].Name listOptions := []client.ListOption{ matchLabels, @@ -665,7 +710,7 @@ func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, s // prune out any entries that aren't in the NnfStorage. This can happen if the NnfStorage was modified // after it was created, as is the case with NnfStorages from an NnfSystemStorage - nnfNodeStorages := []nnfv1alpha3.NnfNodeStorage{} + nnfNodeStorages := []nnfv1alpha4.NnfNodeStorage{} for _, nnfNodeStorage := range nnfNodeStorageList.Items { if _, exists := nodeNameMap[nnfNodeStorage.GetNamespace()]; exists { nnfNodeStorages = append(nnfNodeStorages, nnfNodeStorage) @@ -706,7 +751,7 @@ func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, s } for _, nnfNodeStorage := range nnfNodeStorages { - if nnfNodeStorage.Status.Ready == false { + if !nnfNodeStorage.Status.Ready { return &ctrl.Result{}, nil } } @@ -714,9 +759,18 @@ func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, s // Ensure that we found all the NnfNodeStorage resources we were expecting. This can be expected // transiently as it takes time for the client cache to be updated. Log a message in case the count // never reaches the expected value. - if len(nnfNodeStorages) != len(storage.Spec.AllocationSets[allocationSetIndex].Nodes) { + found := len(nnfNodeStorages) + expected := len(storage.Spec.AllocationSets[allocationSetIndex].Nodes) + + // In the Lustre OST0 case, the NnfNodeStorage has not been created yet, so we can safely expect + // 1 less than the total number of OSTs. + if lustreOST && skipOST0 { + expected = expected - 1 + } + + if found != expected { if storage.GetDeletionTimestamp().IsZero() { - log.Info("unexpected number of NnfNodeStorages", "found", len(nnfNodeStorages), "expected", len(storage.Spec.AllocationSets[allocationSetIndex].Nodes)) + log.Info("unexpected number of NnfNodeStorages", "found", found, "expected", expected) } return &ctrl.Result{}, nil } @@ -726,9 +780,9 @@ func (r *NnfStorageReconciler) aggregateNodeStorageStatus(ctx context.Context, s return nil, nil } -func (r *NnfStorageReconciler) getLustreMgt(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage) (*nnfv1alpha3.NnfLustreMGT, error) { +func (r *NnfStorageReconciler) getLustreMgt(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage) (*nnfv1alpha4.NnfLustreMGT, error) { if nnfStorage.Status.LustreMgtReference != (corev1.ObjectReference{}) { - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: nnfStorage.Status.LustreMgtReference.Name, Namespace: nnfStorage.Status.LustreMgtReference.Namespace, @@ -742,12 +796,12 @@ func (r *NnfStorageReconciler) getLustreMgt(ctx context.Context, nnfStorage *nnf return nnfLustreMgt, nil } - nnfLustreMgtList := &nnfv1alpha3.NnfLustreMGTList{} + nnfLustreMgtList := &nnfv1alpha4.NnfLustreMGTList{} if err := r.List(ctx, nnfLustreMgtList, []client.ListOption{}...); err != nil { return nil, dwsv1alpha2.NewResourceError("could not list NnfLustreMGTs").WithError(err).WithMajor() } - var nnfLustreMgt *nnfv1alpha3.NnfLustreMGT = nil + var nnfLustreMgt *nnfv1alpha4.NnfLustreMGT = nil for i := range nnfLustreMgtList.Items { if func(list []string, search string) bool { for _, element := range list { @@ -774,7 +828,7 @@ func (r *NnfStorageReconciler) getLustreMgt(ctx context.Context, nnfStorage *nnf return nnfLustreMgt, nil } -func (r *NnfStorageReconciler) getFsName(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage) (string, error) { +func (r *NnfStorageReconciler) getFsName(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage) (string, error) { nnfLustreMgt, err := r.getLustreMgt(ctx, nnfStorage) if err != nil { return "", dwsv1alpha2.NewResourceError("could not get NnfLustreMGT for address: %s", nnfStorage.Status.MgsAddress).WithError(err) @@ -785,7 +839,7 @@ func (r *NnfStorageReconciler) getFsName(ctx context.Context, nnfStorage *nnfv1a nnfStorage.Status.LustreMgtReference = corev1.ObjectReference{ Name: nnfLustreMgt.Name, Namespace: nnfLustreMgt.Namespace, - Kind: reflect.TypeOf(nnfv1alpha3.NnfLustreMGT{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfLustreMGT{}).Name(), } // This will update the status section of the NnfStorage with the reference and requeue @@ -795,7 +849,7 @@ func (r *NnfStorageReconciler) getFsName(ctx context.Context, nnfStorage *nnfv1a reference := corev1.ObjectReference{ Name: nnfStorage.Name, Namespace: nnfStorage.Namespace, - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), } // Check the status section of the NnfLustreMGT to see if an fsname has been assigned yet @@ -826,7 +880,7 @@ func (r *NnfStorageReconciler) getFsName(ctx context.Context, nnfStorage *nnfv1a } -func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStorage *nnfv1alpha3.NnfStorage) (*ctrl.Result, error) { +func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStorage *nnfv1alpha4.NnfStorage) (*ctrl.Result, error) { log := r.Log.WithValues("NnfStorage", client.ObjectKeyFromObject(nnfStorage)) // Don't create the clientmount in the test environment. Some tests don't fake out the @@ -901,21 +955,16 @@ func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStora return &ctrl.Result{}, dwsv1alpha2.NewResourceError("zero length node array for OST").WithFatal() } - tempMountDir := os.Getenv("NNF_TEMP_MOUNT_PATH") - if len(tempMountDir) == 0 { - tempMountDir = "/mnt/tmp/" - } - dwsv1alpha2.InheritParentLabels(clientMount, nnfStorage) dwsv1alpha2.AddOwnerLabels(clientMount, nnfStorage) clientMount.Spec.Node = allocationSet.Nodes[0].Name clientMount.Spec.DesiredState = dwsv1alpha2.ClientMountStateMounted clientMount.Spec.Mounts = []dwsv1alpha2.ClientMountInfo{ - dwsv1alpha2.ClientMountInfo{ + { Type: nnfStorage.Spec.FileSystemType, TargetType: "directory", - MountPath: fmt.Sprintf("/%s/%s", tempMountDir, nnfNodeStorageName(nnfStorage, index, 0)), + MountPath: getTempClientMountDir(nnfStorage, index), Device: dwsv1alpha2.ClientMountDevice{ Type: dwsv1alpha2.ClientMountDeviceTypeLustre, Lustre: &dwsv1alpha2.ClientMountDeviceLustre{ @@ -955,7 +1004,7 @@ func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStora switch clientMount.Status.Mounts[0].State { case dwsv1alpha2.ClientMountStateMounted: - if clientMount.Status.Mounts[0].Ready == false { + if !clientMount.Status.Mounts[0].Ready { return &ctrl.Result{}, nil } @@ -972,7 +1021,7 @@ func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStora return &ctrl.Result{}, nil case dwsv1alpha2.ClientMountStateUnmounted: - if clientMount.Status.Mounts[0].Ready == false { + if !clientMount.Status.Mounts[0].Ready { return &ctrl.Result{}, nil } @@ -983,9 +1032,21 @@ func (r *NnfStorageReconciler) setLustreOwnerGroup(ctx context.Context, nnfStora return &ctrl.Result{}, nil } +func getTempMountDir() string { + tempMountDir := os.Getenv("NNF_TEMP_MOUNT_PATH") + if len(tempMountDir) == 0 { + tempMountDir = "/mnt/tmp/" + } + return tempMountDir +} + +func getTempClientMountDir(nnfStorage *nnfv1alpha4.NnfStorage, index int) string { + return fmt.Sprintf("/%s/%s", getTempMountDir(), nnfNodeStorageName(nnfStorage, index, 0)) +} + // Get the status from all the child NnfNodeStorage resources and use them to build the status // for the NnfStorage. -func (r *NnfStorageReconciler) aggregateClientMountStatus(ctx context.Context, storage *nnfv1alpha3.NnfStorage, deleting bool) error { +func (r *NnfStorageReconciler) aggregateClientMountStatus(ctx context.Context, storage *nnfv1alpha4.NnfStorage, deleting bool) error { clientMountList := &dwsv1alpha2.ClientMountList{} matchLabels := dwsv1alpha2.MatchingOwner(storage) @@ -1015,7 +1076,7 @@ func (r *NnfStorageReconciler) aggregateClientMountStatus(ctx context.Context, s // or the object references in the storage resource. We may have created children // that aren't in the cache and we may not have been able to add the object reference // to the NnfStorage. -func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnfv1alpha3.NnfStorage) (nodeStoragesState, error) { +func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnfv1alpha4.NnfStorage) (nodeStoragesState, error) { // Delete any clientmounts that were created by the NnfStorage. deleteStatus, err := dwsv1alpha2.DeleteChildren(ctx, r.Client, []dwsv1alpha2.ObjectList{&dwsv1alpha2.ClientMountList{}}, storage) if err != nil { @@ -1031,18 +1092,38 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf } if storage.Spec.FileSystemType == "lustre" { - // Delete the OSTs and MDTs first so we can drop the claim on the NnfLustreMgt resource. This will trigger - // an lctl command to run to remove the fsname from the MGT. childObjects := []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfNodeStorageList{}, + &nnfv1alpha4.NnfNodeStorageList{}, } - ostDeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha3.AllocationSetLabel: "ost"}) + // Delete OST0 first so that PreUnmount commands can happen + ost0DeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha4.AllocationSetOST0Label: "true"}) if err != nil { return nodeStoragesExist, err } - mdtDeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha3.AllocationSetLabel: "mdt"}) + // Collect status information from the NnfNodeStorage resources and aggregate it into the + // NnfStorage + for i := range storage.Status.AllocationSets { + _, err := r.aggregateNodeStorageStatus(ctx, storage, i, true, false) + if err != nil { + return nodeStoragesExist, err + } + } + + // Ensure OST0 is deleted before continuing + if !ost0DeleteStatus.Complete() { + return nodeStoragesExist, nil + } + + // Then, delete the rest of the OSTs and MDTs so we can drop the claim on the NnfLustreMgt + // resource. This will trigger an lctl command to run to remove the fsname from the MGT. + ostDeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha4.AllocationSetLabel: "ost"}) + if err != nil { + return nodeStoragesExist, err + } + + mdtDeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha4.AllocationSetLabel: "mdt"}) if err != nil { return nodeStoragesExist, err } @@ -1050,7 +1131,7 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf // Collect status information from the NnfNodeStorage resources and aggregate it into the // NnfStorage for i := range storage.Status.AllocationSets { - _, err := r.aggregateNodeStorageStatus(ctx, storage, i, true) + _, err := r.aggregateNodeStorageStatus(ctx, storage, i, true, false) if err != nil { return nodeStoragesExist, err } @@ -1091,7 +1172,7 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf // Collect status information from the NnfNodeStorage resources and aggregate it into the // NnfStorage for i := range storage.Status.AllocationSets { - _, err := r.aggregateNodeStorageStatus(ctx, storage, i, true) + _, err := r.aggregateNodeStorageStatus(ctx, storage, i, true, false) if err != nil { return nodeStoragesExist, err } @@ -1106,7 +1187,7 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf // releaseLustreMGT removes the claim from NnfLustreMGT and returns "true" once the NnfLustreMGT has removed // the entry from the status section, indicating that the fsname has been removed from the MGT -func (r *NnfStorageReconciler) releaseLustreMgt(ctx context.Context, storage *nnfv1alpha3.NnfStorage) (bool, error) { +func (r *NnfStorageReconciler) releaseLustreMgt(ctx context.Context, storage *nnfv1alpha4.NnfStorage) (bool, error) { if storage.Spec.FileSystemType != "lustre" { return true, nil } @@ -1115,7 +1196,7 @@ func (r *NnfStorageReconciler) releaseLustreMgt(ctx context.Context, storage *nn return true, nil } - nnfLustreMgt := &nnfv1alpha3.NnfLustreMGT{ + nnfLustreMgt := &nnfv1alpha4.NnfLustreMGT{ ObjectMeta: metav1.ObjectMeta{ Name: storage.Status.LustreMgtReference.Name, Namespace: storage.Status.LustreMgtReference.Namespace, @@ -1157,7 +1238,7 @@ func (r *NnfStorageReconciler) releaseLustreMgt(ctx context.Context, storage *nn // - NnfStorages from multiple namespaces create NnfNodeStorages in the same namespace // - Different allocations in an NnfStorage could be targeting the same Rabbit node (e.g., MGS and MDS on the same Rabbit) // - The same Rabbit node could be listed more than once within the same allocation. -func nnfNodeStorageName(storage *nnfv1alpha3.NnfStorage, allocationSetIndex int, i int) string { +func nnfNodeStorageName(storage *nnfv1alpha4.NnfStorage, allocationSetIndex int, i int) string { nodeName := storage.Spec.AllocationSets[allocationSetIndex].Nodes[i].Name // If the same Rabbit is listed more than once, the index on the end of the name needs to show @@ -1176,22 +1257,86 @@ func nnfNodeStorageName(storage *nnfv1alpha3.NnfStorage, allocationSetIndex int, return storage.Namespace + "-" + storage.Name + "-" + storage.Spec.AllocationSets[allocationSetIndex].Name + "-" + strconv.Itoa(duplicateRabbitIndex) } +// Get the NnfNodeStorage for Lustre OST0 for a given NnfStorage +func (r *NnfStorageReconciler) getLustreOST0(ctx context.Context, storage *nnfv1alpha4.NnfStorage) (*nnfv1alpha4.NnfNodeStorage, error) { + if storage.Spec.FileSystemType != "lustre" { + return nil, nil + } + + // Get al the NnfNodeStorages for the OSTs + nnfNodeStorageList := &nnfv1alpha4.NnfNodeStorageList{} + matchLabels := dwsv1alpha2.MatchingOwner(storage) + matchLabels[nnfv1alpha4.AllocationSetLabel] = "ost" + + listOptions := []client.ListOption{ + matchLabels, + } + + if err := r.List(ctx, nnfNodeStorageList, listOptions...); err != nil { + return nil, dwsv1alpha2.NewResourceError("could not list NnfNodeStorages").WithError(err) + } + + for _, nnfNodeStorage := range nnfNodeStorageList.Items { + if nnfNodeStorage.Spec.LustreStorage.StartIndex == 0 { + return &nnfNodeStorage, nil + } + } + + return nil, nil +} + +// Go through the Storage's allocation sets to determine the number of Lustre components and rabbit +// nodes. Returns a map with keys for each lustre component type and also the nnf nodes involved. +// The list of nnf nodes is kept unique, but mdts, osts, etc can include a node multiple times. +func getLustreMappingFromStorage(storage *nnfv1alpha4.NnfStorage) map[string][]string { + nnfNodeKey := "nnfNode" + componentMap := map[string][]string{ + "mdt": {}, + "mgt": {}, + "mgtmdt": {}, + "ost": {}, + nnfNodeKey: {}, + } + rabbitMap := make(map[string]bool) // use a map to keep the list unique + + // Gather the info from the allocation set + for _, allocationSet := range storage.Spec.AllocationSets { + name := allocationSet.Name + for _, storage := range allocationSet.Nodes { + node := storage.Name + + // add to the list for that lustre component for each Count + for i := 0; i < storage.Count; i++ { + componentMap[name] = append(componentMap[name], node) + } + + // add to the unique list of rabbits + if _, found := rabbitMap[node]; !found { + rabbitMap[node] = true + componentMap[nnfNodeKey] = append(componentMap[nnfNodeKey], node) + } + } + } + + return componentMap +} + // SetupWithManager sets up the controller with the Manager. func (r *NnfStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { r.ChildObjects = []dwsv1alpha2.ObjectList{ &dwsv1alpha2.ClientMountList{}, - &nnfv1alpha3.NnfNodeStorageList{}, - &nnfv1alpha3.NnfNodeBlockStorageList{}, - &nnfv1alpha3.NnfLustreMGTList{}, - &nnfv1alpha3.NnfStorageProfileList{}, + &nnfv1alpha4.NnfNodeStorageList{}, + &nnfv1alpha4.NnfNodeBlockStorageList{}, + &nnfv1alpha4.NnfLustreMGTList{}, + &nnfv1alpha4.NnfStorageProfileList{}, } maxReconciles := runtime.GOMAXPROCS(0) return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). - For(&nnfv1alpha3.NnfStorage{}). - Watches(&nnfv1alpha3.NnfNodeStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). - Watches(&nnfv1alpha3.NnfNodeBlockStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). + For(&nnfv1alpha4.NnfStorage{}). + Watches(&nnfv1alpha4.NnfNodeStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). + Watches(&nnfv1alpha4.NnfNodeBlockStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). Watches(&dwsv1alpha2.ClientMount{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). Complete(r) } diff --git a/internal/controller/nnf_storage_controller_test.go b/internal/controller/nnf_storage_controller_test.go new file mode 100644 index 000000000..c31bc80b2 --- /dev/null +++ b/internal/controller/nnf_storage_controller_test.go @@ -0,0 +1,77 @@ +/* + * Copyright 2024 Hewlett Packard Enterprise Development LP + * Other additional copyright holders may be indicated within. + * + * The entirety of this work is licensed under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package controller + +import ( + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" +) + +var _ = Describe("NNFStorage Controller Test", func() { + + It("It should correctly create a human-readable lustre mapping for NnfStorage", func() { + s := nnfv1alpha4.NnfStorage{ + Spec: nnfv1alpha4.NnfStorageSpec{ + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{ + {Name: "ost", Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ + {Name: "rabbit-node-1", Count: 2}, + {Name: "rabbit-node-2", Count: 1}}, + }, + // throw another OST on rabbit-node-2 + {Name: "ost", Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ + {Name: "rabbit-node-2", Count: 1}}, + }, + {Name: "mdt", Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ + {Name: "rabbit-node-3", Count: 1}, + {Name: "rabbit-node-4", Count: 1}, + {Name: "rabbit-node-8", Count: 1}}, + }, + {Name: "mgt", Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ + {Name: "rabbit-node-3", Count: 1}}, + }, + {Name: "mgtmdt", Nodes: []nnfv1alpha4.NnfStorageAllocationNodes{ + {Name: "rabbit-node-4", Count: 1}}, + }, + }, + }, + } + + Expect(s.Spec.AllocationSets).To(HaveLen(5)) + m := getLustreMappingFromStorage(&s) + Expect(m).To(HaveLen(5)) // should have keys for 4 lustre components (i.e. ost, mdt, mgt, mgtmdt) + rabbits + + Expect(m["ost"]).To(HaveLen(4)) + Expect(m["ost"]).Should(ContainElements("rabbit-node-1", "rabbit-node-1", "rabbit-node-2", "rabbit-node-2")) + + Expect(m["mdt"]).To(HaveLen(3)) + Expect(m["mdt"]).Should(ContainElements("rabbit-node-3", "rabbit-node-4", "rabbit-node-8")) + + Expect(m["mgt"]).To(HaveLen(1)) + Expect(m["mgt"]).Should(ContainElements("rabbit-node-3")) + + Expect(m["mgtmdt"]).To(HaveLen(1)) + Expect(m["mgtmdt"]).Should(ContainElements("rabbit-node-4")) + + Expect(m["nnfNode"]).To(HaveLen(5)) + Expect(m["nnfNode"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8")) + }) +}) diff --git a/internal/controller/nnf_systemconfiguration_controller.go b/internal/controller/nnf_systemconfiguration_controller.go index 566307ee8..6adde0267 100644 --- a/internal/controller/nnf_systemconfiguration_controller.go +++ b/internal/controller/nnf_systemconfiguration_controller.go @@ -38,7 +38,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -220,12 +220,12 @@ func (r *NnfSystemConfigurationReconciler) labelsAndTaints(ctx context.Context, } taint := &corev1.Taint{ - Key: nnfv1alpha3.RabbitNodeTaintKey, + Key: nnfv1alpha4.RabbitNodeTaintKey, Value: "true", } staleLabel := false - _, hasCompletedLabel := labels[nnfv1alpha3.TaintsAndLabelsCompletedLabel] + _, hasCompletedLabel := labels[nnfv1alpha4.TaintsAndLabelsCompletedLabel] if effect == corev1.TaintEffectNoSchedule && hasCompletedLabel { // We're in pass 1. // The presence of the label means that the taint state has been @@ -251,7 +251,7 @@ func (r *NnfSystemConfigurationReconciler) labelsAndTaints(ctx context.Context, continue } // Clear the label and continue working on this node. - delete(labels, nnfv1alpha3.TaintsAndLabelsCompletedLabel) + delete(labels, nnfv1alpha4.TaintsAndLabelsCompletedLabel) node.SetLabels(labels) } else if hasCompletedLabel { // All other passes honor the label. @@ -267,7 +267,7 @@ func (r *NnfSystemConfigurationReconciler) labelsAndTaints(ctx context.Context, return false, err } // All passes completed on this node. - labels[nnfv1alpha3.TaintsAndLabelsCompletedLabel] = "true" + labels[nnfv1alpha4.TaintsAndLabelsCompletedLabel] = "true" doUpdate = true node.SetLabels(labels) } else { @@ -281,8 +281,8 @@ func (r *NnfSystemConfigurationReconciler) labelsAndTaints(ctx context.Context, } // Add the label. - if _, present := labels[nnfv1alpha3.RabbitNodeSelectorLabel]; !present { - labels[nnfv1alpha3.RabbitNodeSelectorLabel] = "true" + if _, present := labels[nnfv1alpha4.RabbitNodeSelectorLabel]; !present { + labels[nnfv1alpha4.RabbitNodeSelectorLabel] = "true" doUpdate = true node.SetLabels(labels) } diff --git a/internal/controller/nnf_systemconfiguration_controller_test.go b/internal/controller/nnf_systemconfiguration_controller_test.go index a9d2e8868..618280073 100644 --- a/internal/controller/nnf_systemconfiguration_controller_test.go +++ b/internal/controller/nnf_systemconfiguration_controller_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("NnfSystemconfigurationController", func() { @@ -80,12 +80,12 @@ var _ = Describe("Adding taints and labels to nodes", func() { var sysCfg *dwsv1alpha2.SystemConfiguration taintNoSchedule := &corev1.Taint{ - Key: nnfv1alpha3.RabbitNodeTaintKey, + Key: nnfv1alpha4.RabbitNodeTaintKey, Value: "true", Effect: corev1.TaintEffectNoSchedule, } taintNoExecute := &corev1.Taint{ - Key: nnfv1alpha3.RabbitNodeTaintKey, + Key: nnfv1alpha4.RabbitNodeTaintKey, Value: "true", Effect: corev1.TaintEffectNoExecute, } @@ -147,8 +147,8 @@ var _ = Describe("Adding taints and labels to nodes", func() { Eventually(func(g Gomega) { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(node), tnode)) labels := tnode.GetLabels() - g.Expect(labels).To(HaveKeyWithValue(nnfv1alpha3.RabbitNodeSelectorLabel, "true")) - g.Expect(labels).To(HaveKeyWithValue(nnfv1alpha3.TaintsAndLabelsCompletedLabel, "true")) + g.Expect(labels).To(HaveKeyWithValue(nnfv1alpha4.RabbitNodeSelectorLabel, "true")) + g.Expect(labels).To(HaveKeyWithValue(nnfv1alpha4.TaintsAndLabelsCompletedLabel, "true")) g.Expect(taints.TaintExists(tnode.Spec.Taints, taintNoSchedule)).To(BeTrue()) g.Expect(taints.TaintExists(tnode.Spec.Taints, taintNoExecute)).To(BeFalse()) }).Should(Succeed(), "verify failed for node %s", node.Name) @@ -167,7 +167,7 @@ var _ = Describe("Adding taints and labels to nodes", func() { // Remove the "cleared" label from node1. Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(node1), node1)) labels := node1.GetLabels() - delete(labels, nnfv1alpha3.TaintsAndLabelsCompletedLabel) + delete(labels, nnfv1alpha4.TaintsAndLabelsCompletedLabel) node1.SetLabels(labels) Expect(k8sClient.Update(context.TODO(), node1)).To(Succeed()) By("verifying node1 is repaired") @@ -227,8 +227,8 @@ var _ = Describe("Adding taints and labels to nodes", func() { tnode := &corev1.Node{} g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(node4), tnode)) labels := tnode.GetLabels() - g.Expect(labels).ToNot(HaveKey(nnfv1alpha3.RabbitNodeSelectorLabel)) - g.Expect(labels).ToNot(HaveKey(nnfv1alpha3.TaintsAndLabelsCompletedLabel)) + g.Expect(labels).ToNot(HaveKey(nnfv1alpha4.RabbitNodeSelectorLabel)) + g.Expect(labels).ToNot(HaveKey(nnfv1alpha4.TaintsAndLabelsCompletedLabel)) g.Expect(taints.TaintExists(tnode.Spec.Taints, taintNoSchedule)).To(BeFalse()) g.Expect(taints.TaintExists(tnode.Spec.Taints, taintNoExecute)).To(BeFalse()) }).Should(Succeed(), "verify failed for node %s", node4.Name) diff --git a/internal/controller/nnf_workflow_controller.go b/internal/controller/nnf_workflow_controller.go index f2da5c31d..a1e31a9f9 100644 --- a/internal/controller/nnf_workflow_controller.go +++ b/internal/controller/nnf_workflow_controller.go @@ -47,7 +47,7 @@ import ( "github.com/DataWorkflowServices/dws/utils/dwdparse" "github.com/DataWorkflowServices/dws/utils/updater" lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -451,7 +451,7 @@ func (r *NnfWorkflowReconciler) finishSetupState(ctx context.Context, workflow * name, namespace := getStorageReferenceNameFromWorkflowActual(workflow, index) // Check whether the NnfStorage has finished creating the storage. - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -501,7 +501,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo // Prepare the provided staging parameter for data-movement. Param is the source/destination value from the #DW copy_in/copy_out directive; based // on the param prefix we determine the storage instance and access requirements for data movement. - prepareStagingArgumentFn := func(param string) (*corev1.ObjectReference, *nnfv1alpha3.NnfAccess, *result, error) { + prepareStagingArgumentFn := func(param string) (*corev1.ObjectReference, *nnfv1alpha4.NnfAccess, *result, error) { var storageReference *corev1.ObjectReference name, _ := splitStagingArgumentIntoNameAndPath(param) @@ -532,7 +532,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo nnfStorageName = indexedResourceName(workflow, parentDwIndex) } - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfStorageName, Namespace: workflow.Namespace, @@ -544,7 +544,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo } storageReference = &corev1.ObjectReference{ - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), Name: storage.Name, Namespace: storage.Namespace, } @@ -609,7 +609,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo } // Wait for accesses to go ready - for _, access := range []*nnfv1alpha3.NnfAccess{sourceAccess, destAccess} { + for _, access := range []*nnfv1alpha4.NnfAccess{sourceAccess, destAccess} { if access != nil { if err := r.Get(ctx, client.ObjectKeyFromObject(access), access); err != nil { return nil, dwsv1alpha2.NewResourceError("could not get NnfAccess %v", client.ObjectKeyFromObject(access)).WithError(err).WithUserMessage("could not create data movement mount points") @@ -635,9 +635,9 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo } // Verify data movement is ready - dmm := &nnfv1alpha3.NnfDataMovementManager{ObjectMeta: metav1.ObjectMeta{ - Name: nnfv1alpha3.DataMovementManagerName, - Namespace: nnfv1alpha3.DataMovementNamespace, + dmm := &nnfv1alpha4.NnfDataMovementManager{ObjectMeta: metav1.ObjectMeta{ + Name: nnfv1alpha4.DataMovementManagerName, + Namespace: nnfv1alpha4.DataMovementNamespace, }} if err := r.Get(ctx, client.ObjectKeyFromObject(dmm), dmm); err != nil { return nil, dwsv1alpha2.NewResourceError("could not get NnfDataMovementManager %v", client.ObjectKeyFromObject(dmm)).WithError(err).WithUserMessage("could not determine data movement readiness") @@ -657,7 +657,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo targetStorageRef = sourceStorage } - targetStorage := &nnfv1alpha3.NnfStorage{ + targetStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: targetStorageRef.Name, Namespace: targetStorageRef.Namespace, @@ -678,7 +678,7 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo return nil, dwsv1alpha2.NewResourceError("could not get NnfDataMovementProfile %s", indexedResourceName(workflow, index)).WithError(err).WithUserMessage("could not find data movement profile") } dmProfileRef := corev1.ObjectReference{ - Kind: reflect.TypeOf(nnfv1alpha3.NnfDataMovementProfile{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfDataMovementProfile{}).Name(), Name: dmProfile.Name, Namespace: dmProfile.Namespace, } @@ -697,17 +697,17 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo for _, node := range nodes { for i := 0; i < node.Count; i++ { - dm := &nnfv1alpha3.NnfDataMovement{ + dm := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d", indexedResourceName(workflow, index), i), Namespace: node.Name, }, - Spec: nnfv1alpha3.NnfDataMovementSpec{ - Source: &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + Spec: nnfv1alpha4.NnfDataMovementSpec{ + Source: &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: getRabbitRelativePath(fsType, sourceStorage, sourceAccess, source, node.Name, i), StorageReference: *sourceStorage, }, - Destination: &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + Destination: &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: getRabbitRelativePath(fsType, destStorage, destAccess, dest, node.Name, i), StorageReference: *destStorage, }, @@ -719,8 +719,8 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo dwsv1alpha2.AddWorkflowLabels(dm, workflow) dwsv1alpha2.AddOwnerLabels(dm, workflow) - nnfv1alpha3.AddDataMovementTeardownStateLabel(dm, workflow.Status.State) - nnfv1alpha3.AddDataMovementInitiatorLabel(dm, dwArgs["command"]) + nnfv1alpha4.AddDataMovementTeardownStateLabel(dm, workflow.Status.State) + nnfv1alpha4.AddDataMovementInitiatorLabel(dm, dwArgs["command"]) addDirectiveIndexLabel(dm, index) log.Info("Creating NNF Data Movement", "name", client.ObjectKeyFromObject(dm).String()) @@ -735,17 +735,17 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo case "lustre": - dm := &nnfv1alpha3.NnfDataMovement{ + dm := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index), - Namespace: nnfv1alpha3.DataMovementNamespace, + Namespace: nnfv1alpha4.DataMovementNamespace, }, - Spec: nnfv1alpha3.NnfDataMovementSpec{ - Source: &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + Spec: nnfv1alpha4.NnfDataMovementSpec{ + Source: &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: getRabbitRelativePath(fsType, sourceStorage, sourceAccess, source, "", 0), StorageReference: *sourceStorage, }, - Destination: &nnfv1alpha3.NnfDataMovementSpecSourceDestination{ + Destination: &nnfv1alpha4.NnfDataMovementSpecSourceDestination{ Path: getRabbitRelativePath(fsType, destStorage, destAccess, dest, "", 0), StorageReference: *destStorage, }, @@ -757,8 +757,8 @@ func (r *NnfWorkflowReconciler) startDataInOutState(ctx context.Context, workflo dwsv1alpha2.AddWorkflowLabels(dm, workflow) dwsv1alpha2.AddOwnerLabels(dm, workflow) - nnfv1alpha3.AddDataMovementTeardownStateLabel(dm, workflow.Status.State) - nnfv1alpha3.AddDataMovementInitiatorLabel(dm, dwArgs["command"]) + nnfv1alpha4.AddDataMovementTeardownStateLabel(dm, workflow.Status.State) + nnfv1alpha4.AddDataMovementInitiatorLabel(dm, dwArgs["command"]) addDirectiveIndexLabel(dm, index) log.Info("Creating NNF Data Movement", "name", client.ObjectKeyFromObject(dm).String()) @@ -778,10 +778,10 @@ func (r *NnfWorkflowReconciler) finishDataInOutState(ctx context.Context, workfl // Wait for data movement resources to complete matchingLabels := dwsv1alpha2.MatchingOwner(workflow) - matchingLabels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(index) - matchingLabels[nnfv1alpha3.DataMovementTeardownStateLabel] = string(workflow.Status.State) + matchingLabels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(index) + matchingLabels[nnfv1alpha4.DataMovementTeardownStateLabel] = string(workflow.Status.State) - dataMovementList := &nnfv1alpha3.NnfDataMovementList{} + dataMovementList := &nnfv1alpha4.NnfDataMovementList{} if err := r.List(ctx, dataMovementList, matchingLabels); err != nil { return nil, dwsv1alpha2.NewResourceError("could not list NnfDataMovements with labels: %v", matchingLabels).WithError(err).WithUserMessage("could not find data movement information") } @@ -793,7 +793,7 @@ func (r *NnfWorkflowReconciler) finishDataInOutState(ctx context.Context, workfl } for _, dm := range dataMovementList.Items { - if dm.Status.State != nnfv1alpha3.DataMovementConditionTypeFinished { + if dm.Status.State != nnfv1alpha4.DataMovementConditionTypeFinished { return Requeue("pending data movement").withObject(&dm), nil } } @@ -801,7 +801,7 @@ func (r *NnfWorkflowReconciler) finishDataInOutState(ctx context.Context, workfl // Check results of data movement operations // TODO: Detailed Fail Message? for _, dm := range dataMovementList.Items { - if dm.Status.Status != nnfv1alpha3.DataMovementConditionReasonSuccess { + if dm.Status.Status != nnfv1alpha4.DataMovementConditionReasonSuccess { handleWorkflowErrorByIndex(dwsv1alpha2.NewResourceError("").WithUserMessage( fmt.Sprintf("data movement operation failed during '%s', message: %s", workflow.Status.State, dm.Status.Message)). WithFatal(), workflow, index) @@ -848,7 +848,7 @@ func (r *NnfWorkflowReconciler) startPreRunState(ctx context.Context, workflow * return nil, dwsv1alpha2.NewResourceError("could not find pinned NnfStorageProfile: %v", types.NamespacedName{Name: pinnedName, Namespace: pinnedNamespace}).WithError(err).WithFatal() } - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index) + "-computes", Namespace: workflow.Namespace, @@ -884,7 +884,7 @@ func (r *NnfWorkflowReconciler) startPreRunState(ctx context.Context, workflow * // which shares the same name with the NNFStorage. Name: name, Namespace: namespace, - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), } return ctrl.SetControllerReference(workflow, access, r.Scheme) @@ -914,7 +914,7 @@ func (r *NnfWorkflowReconciler) startPreRunState(ctx context.Context, workflow * if fsType == "gfs2" || fsType == "lustre" { name, namespace := getStorageReferenceNameFromWorkflowActual(workflow, index) - storage := &nnfv1alpha3.NnfStorage{ + storage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -993,15 +993,15 @@ func (r *NnfWorkflowReconciler) startPostRunState(ctx context.Context, workflow // Wait for data movement resources to complete matchingLabels := dwsv1alpha2.MatchingOwner(workflow) - matchingLabels[nnfv1alpha3.DataMovementTeardownStateLabel] = string(dwsv1alpha2.StatePostRun) + matchingLabels[nnfv1alpha4.DataMovementTeardownStateLabel] = string(dwsv1alpha2.StatePostRun) - dataMovementList := &nnfv1alpha3.NnfDataMovementList{} + dataMovementList := &nnfv1alpha4.NnfDataMovementList{} if err := r.List(ctx, dataMovementList, matchingLabels); err != nil { return nil, dwsv1alpha2.NewResourceError("could not list NnfDataMovements with labels: %v", matchingLabels).WithError(err).WithUserMessage("could not find data movement information") } for _, dm := range dataMovementList.Items { - if dm.Status.State != nnfv1alpha3.DataMovementConditionTypeFinished { + if dm.Status.State != nnfv1alpha4.DataMovementConditionTypeFinished { return Requeue("pending data movement").withObject(&dm), nil } } @@ -1038,19 +1038,19 @@ func (r *NnfWorkflowReconciler) finishPostRunState(ctx context.Context, workflow // Any user created copy-offload data movement requests created during run must report any errors to the workflow. // TODO: Customer asked if this could be optional matchingLabels := dwsv1alpha2.MatchingOwner(workflow) - matchingLabels[nnfv1alpha3.DataMovementTeardownStateLabel] = string(dwsv1alpha2.StatePostRun) + matchingLabels[nnfv1alpha4.DataMovementTeardownStateLabel] = string(dwsv1alpha2.StatePostRun) - dataMovementList := &nnfv1alpha3.NnfDataMovementList{} + dataMovementList := &nnfv1alpha4.NnfDataMovementList{} if err := r.List(ctx, dataMovementList, matchingLabels); err != nil { return nil, dwsv1alpha2.NewResourceError("could not list NnfDataMovements with labels: %v", matchingLabels).WithError(err).WithUserMessage("could not find data movement information") } for _, dm := range dataMovementList.Items { - if dm.Status.State != nnfv1alpha3.DataMovementConditionTypeFinished { + if dm.Status.State != nnfv1alpha4.DataMovementConditionTypeFinished { return Requeue("pending data movement").withObject(&dm), nil } - if dm.Status.Status == nnfv1alpha3.DataMovementConditionReasonFailed { + if dm.Status.Status == nnfv1alpha4.DataMovementConditionReasonFailed { handleWorkflowErrorByIndex(dwsv1alpha2.NewResourceError("data movement %v failed", client.ObjectKeyFromObject(&dm)).WithUserMessage("data movement failed").WithFatal(), workflow, index) return Requeue("error").withObject(&dm), nil } @@ -1073,11 +1073,11 @@ func (r *NnfWorkflowReconciler) startTeardownState(ctx context.Context, workflow // copy_in/out directives can reference NnfStorage from a different directive, so all the NnfAccesses // need to be removed first. childObjects := []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfDataMovementList{}, - &nnfv1alpha3.NnfAccessList{}, + &nnfv1alpha4.NnfDataMovementList{}, + &nnfv1alpha4.NnfAccessList{}, } - deleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, workflow, client.MatchingLabels{nnfv1alpha3.DirectiveIndexLabel: strconv.Itoa(index)}) + deleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, workflow, client.MatchingLabels{nnfv1alpha4.DirectiveIndexLabel: strconv.Itoa(index)}) if err != nil { return nil, dwsv1alpha2.NewResourceError("could not delete NnfDataMovement and NnfAccess children").WithError(err).WithUserMessage("could not stop data movement and unmount file systems") } @@ -1114,7 +1114,7 @@ func (r *NnfWorkflowReconciler) finishTeardownState(ctx context.Context, workflo persistentStorage.SetOwnerReferences([]metav1.OwnerReference{}) dwsv1alpha2.RemoveOwnerLabels(persistentStorage) labels := persistentStorage.GetLabels() - delete(labels, nnfv1alpha3.DirectiveIndexLabel) + delete(labels, nnfv1alpha4.DirectiveIndexLabel) persistentStorage.SetLabels(labels) err = r.Update(ctx, persistentStorage) @@ -1200,11 +1200,11 @@ func (r *NnfWorkflowReconciler) finishTeardownState(ctx context.Context, workflo } childObjects := []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfStorageList{}, + &nnfv1alpha4.NnfStorageList{}, &dwsv1alpha2.PersistentStorageInstanceList{}, } - deleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, workflow, client.MatchingLabels{nnfv1alpha3.DirectiveIndexLabel: strconv.Itoa(index)}) + deleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, workflow, client.MatchingLabels{nnfv1alpha4.DirectiveIndexLabel: strconv.Itoa(index)}) if err != nil { return nil, dwsv1alpha2.NewResourceError("could not delete NnfStorage and PersistentStorageInstance children").WithError(err).WithUserMessage("could not delete storage allocations") } @@ -1219,9 +1219,9 @@ func (r *NnfWorkflowReconciler) finishTeardownState(ctx context.Context, workflo // SetupWithManager sets up the controller with the Manager. func (r *NnfWorkflowReconciler) SetupWithManager(mgr ctrl.Manager) error { r.ChildObjects = []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfDataMovementList{}, - &nnfv1alpha3.NnfAccessList{}, - &nnfv1alpha3.NnfStorageList{}, + &nnfv1alpha4.NnfDataMovementList{}, + &nnfv1alpha4.NnfAccessList{}, + &nnfv1alpha4.NnfStorageList{}, &dwsv1alpha2.PersistentStorageInstanceList{}, &dwsv1alpha2.DirectiveBreakdownList{}, } @@ -1230,10 +1230,10 @@ func (r *NnfWorkflowReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). WithOptions(controller.Options{MaxConcurrentReconciles: maxReconciles}). For(&dwsv1alpha2.Workflow{}). - Owns(&nnfv1alpha3.NnfAccess{}). + Owns(&nnfv1alpha4.NnfAccess{}). Owns(&dwsv1alpha2.DirectiveBreakdown{}). Owns(&dwsv1alpha2.PersistentStorageInstance{}). - Watches(&nnfv1alpha3.NnfDataMovement{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). - Watches(&nnfv1alpha3.NnfStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). + Watches(&nnfv1alpha4.NnfDataMovement{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). + Watches(&nnfv1alpha4.NnfStorage{}, handler.EnqueueRequestsFromMapFunc(dwsv1alpha2.OwnerLabelMapFunc)). Complete(r) } diff --git a/internal/controller/nnf_workflow_controller_container_helpers.go b/internal/controller/nnf_workflow_controller_container_helpers.go index ec63d961d..c89772280 100644 --- a/internal/controller/nnf_workflow_controller_container_helpers.go +++ b/internal/controller/nnf_workflow_controller_container_helpers.go @@ -22,11 +22,12 @@ package controller import ( "context" "fmt" + "os" "strconv" "strings" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/go-logr/logr" mpicommonv1 "github.com/kubeflow/common/pkg/apis/common/v1" mpiv2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" @@ -42,7 +43,7 @@ import ( type nnfUserContainer struct { workflow *dwsv1alpha2.Workflow - profile *nnfv1alpha3.NnfContainerProfile + profile *nnfv1alpha4.NnfContainerProfile nnfNodes []string volumes []nnfContainerVolume username string @@ -77,7 +78,7 @@ func (c *nnfUserContainer) createMPIJob() error { } c.profile.Data.MPISpec.DeepCopyInto(&mpiJob.Spec) - c.username = nnfv1alpha3.ContainerMPIUser + c.username = nnfv1alpha4.ContainerMPIUser if err := c.applyLabels(&mpiJob.ObjectMeta); err != nil { return err @@ -250,10 +251,10 @@ func (c *nnfUserContainer) applyLabels(job metav1.Object) error { dwsv1alpha2.AddWorkflowLabels(job, c.workflow) labels := job.GetLabels() - labels[nnfv1alpha3.ContainerLabel] = c.workflow.Name - labels[nnfv1alpha3.PinnedContainerProfileLabelName] = c.profile.GetName() - labels[nnfv1alpha3.PinnedContainerProfileLabelNameSpace] = c.profile.GetNamespace() - labels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(c.index) + labels[nnfv1alpha4.ContainerLabel] = c.workflow.Name + labels[nnfv1alpha4.PinnedContainerProfileLabelName] = c.profile.GetName() + labels[nnfv1alpha4.PinnedContainerProfileLabelNameSpace] = c.profile.GetNamespace() + labels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(c.index) job.SetLabels(labels) if err := ctrl.SetControllerReference(c.workflow, job, c.scheme); err != nil { @@ -266,7 +267,7 @@ func (c *nnfUserContainer) applyLabels(job metav1.Object) error { func (c *nnfUserContainer) applyTolerations(spec *corev1.PodSpec) { spec.Tolerations = append(spec.Tolerations, corev1.Toleration{ Effect: corev1.TaintEffectNoSchedule, - Key: nnfv1alpha3.RabbitNodeTaintKey, + Key: nnfv1alpha4.RabbitNodeTaintKey, Operator: corev1.TolerationOpEqual, Value: "true", }) @@ -440,7 +441,7 @@ func (c *nnfUserContainer) getHostPorts() ([]uint16, error) { // Get the ports from the port manager for this workflow for _, alloc := range pm.Status.Allocations { - if alloc.Requester != nil && alloc.Requester.UID == c.workflow.UID && alloc.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInUse { + if alloc.Requester != nil && alloc.Requester.UID == c.workflow.UID && alloc.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInUse { ports = append(ports, alloc.Ports...) } } @@ -538,10 +539,12 @@ func (c *nnfUserContainer) addNnfVolumes(spec *corev1.PodSpec) { MountPath: vol.mountPath, }) - container.Env = append(container.Env, corev1.EnvVar{ - Name: vol.envVarName, - Value: vol.mountPath, - }) + if vol.envVarName != "" { + container.Env = append(container.Env, corev1.EnvVar{ + Name: vol.envVarName, + Value: vol.mountPath, + }) + } } } } @@ -564,7 +567,7 @@ func (c *nnfUserContainer) addEnvVars(spec *corev1.PodSpec, mpi bool) { subdomain = worker hosts = append(hosts, launcher) - for i, _ := range c.nnfNodes { + for i := range c.nnfNodes { hosts = append(hosts, fmt.Sprintf("%s-%d", worker, i)) } } else { @@ -575,6 +578,16 @@ func (c *nnfUserContainer) addEnvVars(spec *corev1.PodSpec, mpi bool) { container.Env = append(container.Env, corev1.EnvVar{Name: "NNF_CONTAINER_SUBDOMAIN", Value: subdomain}, corev1.EnvVar{Name: "NNF_CONTAINER_DOMAIN", Value: domain}, - corev1.EnvVar{Name: "NNF_CONTAINER_HOSTNAMES", Value: strings.Join(hosts, " ")}) + corev1.EnvVar{Name: "NNF_CONTAINER_HOSTNAMES", Value: strings.Join(hosts, " ")}, + corev1.EnvVar{Name: "ENVIRONMENT", Value: os.Getenv("ENVIRONMENT")}, + corev1.EnvVar{ + Name: "NNF_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + APIVersion: "v1", + FieldPath: "spec.nodeName", + }, + }, + }) } } diff --git a/internal/controller/nnf_workflow_controller_helpers.go b/internal/controller/nnf_workflow_controller_helpers.go index cbaa96d2b..1ec5eb040 100644 --- a/internal/controller/nnf_workflow_controller_helpers.go +++ b/internal/controller/nnf_workflow_controller_helpers.go @@ -34,7 +34,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/dwdparse" lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/go-logr/logr" mpiv2beta1 "github.com/kubeflow/mpi-operator/pkg/apis/kubeflow/v2beta1" @@ -554,8 +554,8 @@ func (r *NnfWorkflowReconciler) validateServerAllocations(ctx context.Context, d } -func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow *dwsv1alpha2.Workflow, s *dwsv1alpha2.Servers, index int, log logr.Logger) (*nnfv1alpha3.NnfStorage, error) { - nnfStorage := &nnfv1alpha3.NnfStorage{ +func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow *dwsv1alpha2.Workflow, s *dwsv1alpha2.Servers, index int, log logr.Logger) (*nnfv1alpha4.NnfStorage, error) { + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: s.Name, Namespace: s.Namespace, @@ -644,11 +644,11 @@ func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow * } // Need to remove all of the AllocationSets in the NnfStorage object before we begin - nnfStorage.Spec.AllocationSets = []nnfv1alpha3.NnfStorageAllocationSetSpec{} + nnfStorage.Spec.AllocationSets = []nnfv1alpha4.NnfStorageAllocationSetSpec{} // Iterate the Servers data elements to pull out the allocation sets for the server for i := range s.Spec.AllocationSets { - nnfAllocSet := nnfv1alpha3.NnfStorageAllocationSetSpec{} + nnfAllocSet := nnfv1alpha4.NnfStorageAllocationSetSpec{} nnfAllocSet.Name = s.Spec.AllocationSets[i].Label nnfAllocSet.Capacity = s.Spec.AllocationSets[i].AllocationSize @@ -668,12 +668,12 @@ func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow * // If there are multiple allocations on the first MGTMDT node, split it out into two seperate // node entries. The first is a single allocation that will be used for the MGTMDT. The remaining // allocations on the node will be MDTs only. - node := nnfv1alpha3.NnfStorageAllocationNodes{Name: storage.Name, Count: 1} + node := nnfv1alpha4.NnfStorageAllocationNodes{Name: storage.Name, Count: 1} nnfAllocSet.Nodes = append(nnfAllocSet.Nodes, node) - node = nnfv1alpha3.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount - 1} + node = nnfv1alpha4.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount - 1} nnfAllocSet.Nodes = append(nnfAllocSet.Nodes, node) } else { - node := nnfv1alpha3.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount} + node := nnfv1alpha4.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount} nnfAllocSet.Nodes = append(nnfAllocSet.Nodes, node) } } @@ -703,7 +703,7 @@ func (r *NnfWorkflowReconciler) createNnfStorage(ctx context.Context, workflow * func (r *NnfWorkflowReconciler) getLustreMgsFromPool(ctx context.Context, pool string) (corev1.ObjectReference, string, error) { persistentStorageList := &dwsv1alpha2.PersistentStorageInstanceList{} - if err := r.List(ctx, persistentStorageList, client.MatchingLabels(map[string]string{nnfv1alpha3.StandaloneMGTLabel: pool})); err != nil { + if err := r.List(ctx, persistentStorageList, client.MatchingLabels(map[string]string{nnfv1alpha4.StandaloneMGTLabel: pool})); err != nil { return corev1.ObjectReference{}, "", err } @@ -715,7 +715,7 @@ func (r *NnfWorkflowReconciler) getLustreMgsFromPool(ctx context.Context, pool s healthyMgts := make(map[string]corev1.ObjectReference) for _, persistentStorage := range persistentStorageList.Items { // Find the NnfStorage for the PersistentStorage so we can check its status and get the MGT LNid - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: persistentStorage.Name, Namespace: persistentStorage.Namespace, @@ -810,14 +810,14 @@ func (r *NnfWorkflowReconciler) findLustreFileSystemForPath(ctx context.Context, return nil } -func (r *NnfWorkflowReconciler) setupNnfAccessForServers(ctx context.Context, storage *nnfv1alpha3.NnfStorage, workflow *dwsv1alpha2.Workflow, index int, parentDwIndex int, teardownState dwsv1alpha2.WorkflowState, log logr.Logger) (*nnfv1alpha3.NnfAccess, error) { +func (r *NnfWorkflowReconciler) setupNnfAccessForServers(ctx context.Context, storage *nnfv1alpha4.NnfStorage, workflow *dwsv1alpha2.Workflow, index int, parentDwIndex int, teardownState dwsv1alpha2.WorkflowState, log logr.Logger) (*nnfv1alpha4.NnfAccess, error) { pinnedName, pinnedNamespace := getStorageReferenceNameFromWorkflowActual(workflow, parentDwIndex) nnfStorageProfile, err := findPinnedProfile(ctx, r.Client, pinnedNamespace, pinnedName) if err != nil { return nil, dwsv1alpha2.NewResourceError("could not find pinned NnfStorageProfile: %v", types.NamespacedName{Name: pinnedName, Namespace: pinnedNamespace}).WithError(err).WithFatal() } - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, parentDwIndex) + "-servers", Namespace: workflow.Namespace, @@ -830,9 +830,9 @@ func (r *NnfWorkflowReconciler) setupNnfAccessForServers(ctx context.Context, st dwsv1alpha2.AddOwnerLabels(access, workflow) addPinnedStorageProfileLabel(access, nnfStorageProfile) addDirectiveIndexLabel(access, index) - nnfv1alpha3.AddDataMovementTeardownStateLabel(access, teardownState) + nnfv1alpha4.AddDataMovementTeardownStateLabel(access, teardownState) - access.Spec = nnfv1alpha3.NnfAccessSpec{ + access.Spec = nnfv1alpha4.NnfAccessSpec{ DesiredState: "mounted", TeardownState: teardownState, Target: "all", @@ -844,7 +844,7 @@ func (r *NnfWorkflowReconciler) setupNnfAccessForServers(ctx context.Context, st // NNF Storage is Namespaced Name to the servers object StorageReference: corev1.ObjectReference{ - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), Name: storage.Name, Namespace: storage.Namespace, }, @@ -873,7 +873,7 @@ func (r *NnfWorkflowReconciler) getDirectiveFileSystemType(ctx context.Context, return dwArgs["type"], nil case "persistentdw": name, namespace := getStorageReferenceNameFromWorkflowActual(workflow, index) - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -1046,10 +1046,10 @@ func splitStagingArgumentIntoNameAndPath(arg string) (string, string) { return name, path } -func getRabbitRelativePath(fsType string, storageRef *corev1.ObjectReference, access *nnfv1alpha3.NnfAccess, path, namespace string, index int) string { +func getRabbitRelativePath(fsType string, storageRef *corev1.ObjectReference, access *nnfv1alpha4.NnfAccess, path, namespace string, index int) string { relPath := path - if storageRef.Kind == reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name() { + if storageRef.Kind == reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name() { switch fsType { case "xfs", "gfs2": idxMount := getIndexMountDir(namespace, index) @@ -1115,7 +1115,7 @@ func addDirectiveIndexLabel(object metav1.Object, index int) { labels = make(map[string]string) } - labels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(index) + labels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(index) object.SetLabels(labels) } @@ -1125,7 +1125,7 @@ func getDirectiveIndexLabel(object metav1.Object) string { return "" } - return labels[nnfv1alpha3.DirectiveIndexLabel] + return labels[nnfv1alpha4.DirectiveIndexLabel] } func setTargetOwnerUIDLabel(object metav1.Object, value string) { @@ -1134,7 +1134,7 @@ func setTargetOwnerUIDLabel(object metav1.Object, value string) { labels = make(map[string]string) } - labels[nnfv1alpha3.TargetOwnerUidLabel] = value + labels[nnfv1alpha4.TargetOwnerUidLabel] = value object.SetLabels(labels) } @@ -1144,7 +1144,7 @@ func getTargetOwnerUIDLabel(object metav1.Object) string { return "" } - return labels[nnfv1alpha3.TargetOwnerUidLabel] + return labels[nnfv1alpha4.TargetOwnerUidLabel] } func setTargetDirectiveIndexLabel(object metav1.Object, value string) { @@ -1153,7 +1153,7 @@ func setTargetDirectiveIndexLabel(object metav1.Object, value string) { labels = make(map[string]string) } - labels[nnfv1alpha3.TargetDirectiveIndexLabel] = value + labels[nnfv1alpha4.TargetDirectiveIndexLabel] = value object.SetLabels(labels) } @@ -1163,7 +1163,7 @@ func getTargetDirectiveIndexLabel(object metav1.Object) string { return "" } - return labels[nnfv1alpha3.TargetDirectiveIndexLabel] + return labels[nnfv1alpha4.TargetDirectiveIndexLabel] } func (r *NnfWorkflowReconciler) unmountNnfAccessIfNecessary(ctx context.Context, workflow *dwsv1alpha2.Workflow, index int, accessSuffix string) (*result, error) { @@ -1171,7 +1171,7 @@ func (r *NnfWorkflowReconciler) unmountNnfAccessIfNecessary(ctx context.Context, panic(fmt.Sprint("unhandled NnfAccess suffix", accessSuffix)) } - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index) + "-" + accessSuffix, Namespace: workflow.Namespace, @@ -1185,7 +1185,7 @@ func (r *NnfWorkflowReconciler) unmountNnfAccessIfNecessary(ctx context.Context, return nil, client.IgnoreNotFound(err) } - teardownState, found := access.Labels[nnfv1alpha3.DataMovementTeardownStateLabel] + teardownState, found := access.Labels[nnfv1alpha4.DataMovementTeardownStateLabel] if !found || dwsv1alpha2.WorkflowState(teardownState) == workflow.Status.State { if access.Spec.DesiredState != "unmounted" { access.Spec.DesiredState = "unmounted" @@ -1224,7 +1224,7 @@ func (r *NnfWorkflowReconciler) waitForNnfAccessStateAndReady(ctx context.Contex for _, suffix := range accessSuffixes { - access := &nnfv1alpha3.NnfAccess{ + access := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index) + suffix, Namespace: workflow.Namespace, @@ -1249,7 +1249,7 @@ func (r *NnfWorkflowReconciler) waitForNnfAccessStateAndReady(ctx context.Contex } else { // When unmounting, we are conditionally dependent on the workflow state matching the // state of the teardown label, if found. - teardownState, found := access.Labels[nnfv1alpha3.DataMovementTeardownStateLabel] + teardownState, found := access.Labels[nnfv1alpha4.DataMovementTeardownStateLabel] if !found || dwsv1alpha2.WorkflowState(teardownState) == workflow.Status.State { if access.Status.State != "unmounted" || !access.Status.Ready { return Requeue("pending unmount").withObject(access), nil @@ -1363,7 +1363,7 @@ func (r *NnfWorkflowReconciler) userContainerHandler(ctx context.Context, workfl profile: profile, nnfNodes: nnfNodes, volumes: volumes, - username: nnfv1alpha3.ContainerUser, + username: nnfv1alpha4.ContainerUser, uid: int64(workflow.Spec.UserID), gid: int64(workflow.Spec.GroupID), index: index, @@ -1400,7 +1400,7 @@ func (r *NnfWorkflowReconciler) createContainerService(ctx context.Context, work } service.Spec.Selector = map[string]string{ - nnfv1alpha3.ContainerLabel: workflow.Name, + nnfv1alpha4.ContainerLabel: workflow.Name, } service.Spec.ClusterIP = corev1.ClusterIPNone @@ -1611,7 +1611,7 @@ func (r *NnfWorkflowReconciler) deleteContainers(ctx context.Context, workflow * // Add workflow matchLabels + directive index (if desired) matchLabels := dwsv1alpha2.MatchingWorkflow(workflow) if index >= 0 { - matchLabels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(index) + matchLabels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(index) } // Delete MPIJobs @@ -1879,7 +1879,7 @@ func (r *NnfWorkflowReconciler) getMPIJobs(ctx context.Context, workflow *dwsv1a // Get the MPIJobs for this workflow and directive index matchLabels := dwsv1alpha2.MatchingWorkflow(workflow) if index >= 0 { - matchLabels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(index) + matchLabels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(index) } jobList := &mpiv2beta1.MPIJobList{} @@ -1894,7 +1894,7 @@ func (r *NnfWorkflowReconciler) getContainerJobs(ctx context.Context, workflow * // Get the jobs for this workflow and directive index matchLabels := dwsv1alpha2.MatchingWorkflow(workflow) if index >= 0 { - matchLabels[nnfv1alpha3.DirectiveIndexLabel] = strconv.Itoa(index) + matchLabels[nnfv1alpha4.DirectiveIndexLabel] = strconv.Itoa(index) } jobList := &batchv1.JobList{} @@ -1905,8 +1905,19 @@ func (r *NnfWorkflowReconciler) getContainerJobs(ctx context.Context, workflow * return jobList, nil } +func (r *NnfWorkflowReconciler) getNnfNodeStorages(ctx context.Context, workflow *dwsv1alpha2.Workflow) (*nnfv1alpha4.NnfNodeStorageList, error) { + matchLabels := dwsv1alpha2.MatchingWorkflow(workflow) + + nodeStorages := &nnfv1alpha4.NnfNodeStorageList{} + if err := r.List(ctx, nodeStorages, matchLabels); err != nil { + return nil, dwsv1alpha2.NewResourceError("could not retrieve NnfNodeStorages").WithError(err).WithMajor() + } + + return nodeStorages, nil +} + // Create a list of volumes to be mounted inside of the containers based on the DW_JOB/DW_PERSISTENT arguments -func (r *NnfWorkflowReconciler) getContainerVolumes(ctx context.Context, workflow *dwsv1alpha2.Workflow, dwArgs map[string]string, profile *nnfv1alpha3.NnfContainerProfile) ([]nnfContainerVolume, *result, error) { +func (r *NnfWorkflowReconciler) getContainerVolumes(ctx context.Context, workflow *dwsv1alpha2.Workflow, dwArgs map[string]string, profile *nnfv1alpha4.NnfContainerProfile) ([]nnfContainerVolume, *result, error) { volumes := []nnfContainerVolume{} for arg, val := range dwArgs { @@ -1972,7 +1983,7 @@ func (r *NnfWorkflowReconciler) getContainerVolumes(ctx context.Context, workflo return nil, nil, dwsv1alpha2.NewResourceError("could not retrieve the directive breakdown for '%s'", vol.directiveName).WithMajor() } - nnfAccess := &nnfv1alpha3.NnfAccess{ + nnfAccess := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: workflow.Name + "-" + strconv.Itoa(vol.directiveIndex) + "-servers", Namespace: workflow.Namespace, @@ -1991,9 +2002,45 @@ func (r *NnfWorkflowReconciler) getContainerVolumes(ctx context.Context, workflo volumes = append(volumes, vol) } + if os.Getenv("ENVIRONMENT") == "kind" { + devVolumes, err := r.findMockDevicesForKind(ctx, workflow) + if err != nil { + return nil, nil, err + } + volumes = append(volumes, devVolumes...) + } return volumes, nil, nil } +// If we're using the KIND mock storage then we also have to create a volume +// mount for the path that represents the device beneath the filesystem. +func (r *NnfWorkflowReconciler) findMockDevicesForKind(ctx context.Context, workflow *dwsv1alpha2.Workflow) ([]nnfContainerVolume, error) { + volumes := []nnfContainerVolume{} + + nodeStoragesList, err := r.getNnfNodeStorages(ctx, workflow) + if err != nil { + return nil, dwsv1alpha2.NewResourceError("could not find devices for KIND environment").WithError(err) + } + // On GFS2, the same device is visible on multiple rabbits. Track dupes + // and add a mount for only one of them. + devNames := make(map[string]struct{}) + devCount := 0 + for _, nodeStorage := range nodeStoragesList.Items { + if _, found := devNames[nodeStorage.GetName()]; !found { + for idx := 0; idx < nodeStorage.Spec.Count; idx++ { + vol := nnfContainerVolume{ + name: fmt.Sprintf("kind-device-%d", devCount), + mountPath: fmt.Sprintf("/mnt/nnf/%s-%d", nodeStorage.GetName(), idx), + } + volumes = append(volumes, vol) + devCount += 1 + } + devNames[nodeStorage.GetName()] = struct{}{} + } + } + return volumes, nil +} + // Use the container profile to determine how many ports are needed and request them from the default NnfPortManager func (r *NnfWorkflowReconciler) getContainerPorts(ctx context.Context, workflow *dwsv1alpha2.Workflow, index int) (*result, error) { profile, err := getContainerProfile(ctx, r.Client, workflow, index) @@ -2017,7 +2064,7 @@ func (r *NnfWorkflowReconciler) getContainerPorts(ctx context.Context, workflow // Add a port allocation request to the manager for the number of ports specified by the // container profile - pm.Spec.Allocations = append(pm.Spec.Allocations, nnfv1alpha3.NnfPortManagerAllocationSpec{ + pm.Spec.Allocations = append(pm.Spec.Allocations, nnfv1alpha4.NnfPortManagerAllocationSpec{ Requester: corev1.ObjectReference{ Name: workflow.Name, Namespace: workflow.Namespace, @@ -2058,14 +2105,14 @@ func (r *NnfWorkflowReconciler) checkContainerPorts(ctx context.Context, workflo for _, alloc := range pm.Status.Allocations { if alloc.Requester != nil && alloc.Requester.UID == workflow.UID { - if alloc.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInUse && len(alloc.Ports) == int(profile.Data.NumPorts) { + if alloc.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInUse && len(alloc.Ports) == int(profile.Data.NumPorts) { // Add workflow env var for the ports name, val := getContainerPortsEnvVar(alloc.Ports) workflow.Status.Env[name] = val return nil, nil // done - } else if alloc.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInvalidConfiguration { + } else if alloc.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInvalidConfiguration { return nil, dwsv1alpha2.NewResourceError("").WithUserMessage("could not request ports for container workflow: Invalid NnfPortManager configuration").WithFatal().WithUser() - } else if alloc.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInsufficientResources { + } else if alloc.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInsufficientResources { return nil, dwsv1alpha2.NewResourceError("").WithUserMessage("could not request ports for container workflow: InsufficientResources").WithFatal() } } @@ -2079,11 +2126,11 @@ func (r *NnfWorkflowReconciler) checkContainerPorts(ctx context.Context, workflo // Retrieve the default NnfPortManager for user containers. Allow a client to be passed in as this // is meant to be used by reconcilers or container helpers. -func getContainerPortManager(ctx context.Context, cl client.Client) (*nnfv1alpha3.NnfPortManager, error) { +func getContainerPortManager(ctx context.Context, cl client.Client) (*nnfv1alpha4.NnfPortManager, error) { portManagerName := os.Getenv("NNF_PORT_MANAGER_NAME") portManagerNamespace := os.Getenv("NNF_PORT_MANAGER_NAMESPACE") - pm := &nnfv1alpha3.NnfPortManager{ + pm := &nnfv1alpha4.NnfPortManager{ ObjectMeta: metav1.ObjectMeta{ Name: portManagerName, Namespace: portManagerNamespace, @@ -2112,7 +2159,7 @@ func (r *NnfWorkflowReconciler) releaseContainerPorts(ctx context.Context, workf // Find the allocation in the Status for _, alloc := range pm.Status.Allocations { - if alloc.Requester.UID == workflow.UID && alloc.Status == nnfv1alpha3.NnfPortManagerAllocationStatusInUse { + if alloc.Requester.UID == workflow.UID && alloc.Status == nnfv1alpha4.NnfPortManagerAllocationStatusInUse { found = true break } diff --git a/internal/controller/nnf_workflow_controller_helpers_test.go b/internal/controller/nnf_workflow_controller_helpers_test.go index 27ec17059..6e1ba0332 100644 --- a/internal/controller/nnf_workflow_controller_helpers_test.go +++ b/internal/controller/nnf_workflow_controller_helpers_test.go @@ -4,7 +4,7 @@ import ( "reflect" lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" @@ -50,13 +50,13 @@ var _ = Describe("NnfWorkflowControllerHelpers", func() { DescribeTable("Test NNF filesystems (NnfAccess)", func(fsType, path, output string) { // We can hardwire these fields and assume the same mountpath/mountpathprefix, index, namespace, etc - objRef := corev1.ObjectReference{Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name()} + objRef := corev1.ObjectReference{Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name()} mntPath := "/mnt/nnf/123456-0/" idx := 0 ns := "slushy44" - access := nnfv1alpha3.NnfAccess{ - Spec: nnfv1alpha3.NnfAccessSpec{ + access := nnfv1alpha4.NnfAccess{ + Spec: nnfv1alpha4.NnfAccessSpec{ MountPath: mntPath, MountPathPrefix: mntPath, }, diff --git a/internal/controller/nnf_workflow_controller_test.go b/internal/controller/nnf_workflow_controller_test.go index 5cc53ff94..9db26945c 100644 --- a/internal/controller/nnf_workflow_controller_test.go +++ b/internal/controller/nnf_workflow_controller_test.go @@ -41,7 +41,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var ( @@ -58,9 +58,9 @@ var _ = Describe("NNF Workflow Unit Tests", func() { key types.NamespacedName workflow *dwsv1alpha2.Workflow setup sync.Once - storageProfile *nnfv1alpha3.NnfStorageProfile - dmProfile *nnfv1alpha3.NnfDataMovementProfile - nnfNode *nnfv1alpha3.NnfNode + storageProfile *nnfv1alpha4.NnfStorageProfile + dmProfile *nnfv1alpha4.NnfDataMovementProfile + nnfNode *nnfv1alpha4.NnfNode namespace *corev1.Namespace persistentStorageName string ) @@ -73,14 +73,14 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Expect(k8sClient.Create(context.TODO(), namespace)).To(Succeed()) - nnfNode = &nnfv1alpha3.NnfNode{ + nnfNode = &nnfv1alpha4.NnfNode{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: "rabbit-node", }, - Spec: nnfv1alpha3.NnfNodeSpec{ - State: nnfv1alpha3.ResourceEnable, + Spec: nnfv1alpha4.NnfNodeSpec{ + State: nnfv1alpha4.ResourceEnable, }, } Expect(k8sClient.Create(context.TODO(), nnfNode)).To(Succeed()) @@ -145,13 +145,13 @@ var _ = Describe("NNF Workflow Unit Tests", func() { }).ShouldNot(Succeed()) Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) Expect(k8sClient.Delete(context.TODO(), dmProfile)).To(Succeed()) - dmProfExpected := &nnfv1alpha3.NnfDataMovementProfile{} + dmProfExpected := &nnfv1alpha4.NnfDataMovementProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dmProfile), dmProfExpected) }).ShouldNot(Succeed()) @@ -192,15 +192,15 @@ var _ = Describe("NNF Workflow Unit Tests", func() { // operate. // An alternative is to create a workflow with 'create_persistent' // as its directive and actually create the full-blown persistent instance.. (painful) - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: workflow.Namespace, }, - Spec: nnfv1alpha3.NnfStorageSpec{ + Spec: nnfv1alpha4.NnfStorageSpec{ FileSystemType: fsType, - AllocationSets: []nnfv1alpha3.NnfStorageAllocationSetSpec{}, + AllocationSets: []nnfv1alpha4.NnfStorageAllocationSetSpec{}, }, } Expect(k8sClient.Create(context.TODO(), nnfStorage)).To(Succeed()) @@ -214,7 +214,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(psi), psi)).To(Succeed()) Expect(k8sClient.Delete(context.TODO(), psi)).Should(Succeed()) - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: workflow.Namespace}, } @@ -263,7 +263,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { When("More than one default profile", func() { - var storageProfile2 *nnfv1alpha3.NnfStorageProfile + var storageProfile2 *nnfv1alpha4.NnfStorageProfile BeforeEach(func() { // The second profile will get a different name via the call to uuid. @@ -273,7 +273,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), storageProfile2)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile2), profExpected) }).ShouldNot(Succeed()) @@ -301,7 +301,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { When("Positive tests for storage profiles", func() { - profiles := []*nnfv1alpha3.NnfStorageProfile{} + profiles := []*nnfv1alpha4.NnfStorageProfile{} profNames := []string{} BeforeEach(func() { @@ -436,7 +436,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { When("More than one default profile", func() { - var dmProfile2 *nnfv1alpha3.NnfDataMovementProfile + var dmProfile2 *nnfv1alpha4.NnfDataMovementProfile BeforeEach(func() { // The second profile will get a different name via the call to uuid. @@ -446,7 +446,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), dmProfile2)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfDataMovementProfile{} + profExpected := &nnfv1alpha4.NnfDataMovementProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dmProfile2), profExpected) }).ShouldNot(Succeed()) @@ -474,7 +474,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { When("Positive tests for data movement profiles", func() { - profiles := []*nnfv1alpha3.NnfDataMovementProfile{} + profiles := []*nnfv1alpha4.NnfDataMovementProfile{} profNames := []string{} var lustre *lusv1beta1.LustreFileSystem @@ -665,7 +665,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { When("Using copy_in directives", func() { var ( - dmm *nnfv1alpha3.NnfDataMovementManager + dmm *nnfv1alpha4.NnfDataMovementManager ) JustBeforeEach(func() { @@ -693,18 +693,18 @@ var _ = Describe("NNF Workflow Unit Tests", func() { BeforeEach(func() { ns := &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: nnfv1alpha3.DataMovementNamespace, + Name: nnfv1alpha4.DataMovementNamespace, }, } k8sClient.Create(context.TODO(), ns) // Ignore errors as namespace may be created from other tests - dmm = &nnfv1alpha3.NnfDataMovementManager{ + dmm = &nnfv1alpha4.NnfDataMovementManager{ ObjectMeta: metav1.ObjectMeta{ - Name: nnfv1alpha3.DataMovementManagerName, - Namespace: nnfv1alpha3.DataMovementNamespace, + Name: nnfv1alpha4.DataMovementManagerName, + Namespace: nnfv1alpha4.DataMovementNamespace, }, - Spec: nnfv1alpha3.NnfDataMovementManagerSpec{ + Spec: nnfv1alpha4.NnfDataMovementManagerSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{{ @@ -714,7 +714,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { }, }, }, - Status: nnfv1alpha3.NnfDataMovementManagerStatus{ + Status: nnfv1alpha4.NnfDataMovementManagerStatus{ Ready: true, }, } @@ -766,10 +766,10 @@ var _ = Describe("NNF Workflow Unit Tests", func() { }).Should(Succeed(), "update to DataIn") By("creates the data movement resource") - dm := &nnfv1alpha3.NnfDataMovement{ + dm := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d", workflow.Name, 1), - Namespace: nnfv1alpha3.DataMovementNamespace, + Namespace: nnfv1alpha4.DataMovementNamespace, }, } @@ -790,19 +790,19 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Expect(dm.Spec.Destination.StorageReference).ToNot(BeNil()) Expect(dm.Spec.Destination.StorageReference).To(MatchFields(IgnoreExtras, Fields{ - "Kind": Equal(reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name()), + "Kind": Equal(reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name()), "Name": Equal(fmt.Sprintf("%s-%d", workflow.Name, 0)), "Namespace": Equal(workflow.Namespace), })) Expect(dm.Spec.ProfileReference).To(MatchFields(IgnoreExtras, Fields{ - "Kind": Equal(reflect.TypeOf(nnfv1alpha3.NnfDataMovementProfile{}).Name()), + "Kind": Equal(reflect.TypeOf(nnfv1alpha4.NnfDataMovementProfile{}).Name()), "Name": Equal(indexedResourceName(workflow, 1)), "Namespace": Equal(corev1.NamespaceDefault), }, )) - Expect(dm.GetLabels()[nnfv1alpha3.DataMovementInitiatorLabel]).To(Equal("copy_in")) + Expect(dm.GetLabels()[nnfv1alpha4.DataMovementInitiatorLabel]).To(Equal("copy_in")) }) }) @@ -846,10 +846,10 @@ var _ = Describe("NNF Workflow Unit Tests", func() { return k8sClient.Update(context.TODO(), workflow) }).Should(Succeed(), "transition desired state to DataIn") - dm := &nnfv1alpha3.NnfDataMovement{ + dm := &nnfv1alpha4.NnfDataMovement{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, 1), - Namespace: nnfv1alpha3.DataMovementNamespace, + Namespace: nnfv1alpha4.DataMovementNamespace, }, } @@ -870,18 +870,18 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Expect(dm.Spec.Destination.StorageReference).ToNot(BeNil()) Expect(dm.Spec.Destination.StorageReference).To(MatchFields(IgnoreExtras, Fields{ - "Kind": Equal(reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name()), + "Kind": Equal(reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name()), "Name": Equal(persistentStorageName), "Namespace": Equal(workflow.Namespace), })) Expect(dm.Spec.ProfileReference).To(MatchFields(IgnoreExtras, Fields{ - "Kind": Equal(reflect.TypeOf(nnfv1alpha3.NnfDataMovementProfile{}).Name()), + "Kind": Equal(reflect.TypeOf(nnfv1alpha4.NnfDataMovementProfile{}).Name()), "Name": Equal(indexedResourceName(workflow, 1)), "Namespace": Equal(corev1.NamespaceDefault), }, )) - Expect(dm.GetLabels()[nnfv1alpha3.DataMovementInitiatorLabel]).To(Equal("copy_in")) + Expect(dm.GetLabels()[nnfv1alpha4.DataMovementInitiatorLabel]).To(Equal("copy_in")) }) }) @@ -1283,7 +1283,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { return workflow.Status.Ready && workflow.Status.State == dwsv1alpha2.StateSetup }).Should(BeTrue(), "waiting for ready after setup") - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: servers.Name, Namespace: servers.Namespace, @@ -1365,8 +1365,8 @@ var _ = Describe("NNF Workflow Unit Tests", func() { createGlobalLustre bool globalLustre *lusv1beta1.LustreFileSystem - containerProfile *nnfv1alpha3.NnfContainerProfile - containerProfileStorages []nnfv1alpha3.NnfContainerProfileStorage + containerProfile *nnfv1alpha4.NnfContainerProfile + containerProfileStorages []nnfv1alpha4.NnfContainerProfileStorage createContainerProfile bool ) @@ -1503,7 +1503,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Context("when an optional storage in the container profile is not present in the container arguments", func() { BeforeEach(func() { - containerProfileStorages = []nnfv1alpha3.NnfContainerProfileStorage{ + containerProfileStorages = []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_JOB_foo_local_storage", Optional: false}, {Name: "DW_PERSISTENT_foo_persistent_storage", Optional: true}, {Name: "DW_GLOBAL_foo_global_lustre", Optional: true}, @@ -1548,7 +1548,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { Context("when a required storage in the container profile is not present in the arguments", func() { BeforeEach(func() { - containerProfileStorages = []nnfv1alpha3.NnfContainerProfileStorage{ + containerProfileStorages = []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_JOB_foo_local_storage", Optional: false}, {Name: "DW_PERSISTENT_foo_persistent_storage", Optional: true}, } @@ -1592,7 +1592,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { } }) - buildContainerProfile := func(storages []nnfv1alpha3.NnfContainerProfileStorage) { + buildContainerProfile := func(storages []nnfv1alpha4.NnfContainerProfileStorage) { By("Creating a profile with specific storages") tempProfile := basicNnfContainerProfile("restricted-"+uuid.NewString()[:8], storages) containerProfile = createNnfContainerProfile(tempProfile, true) @@ -1609,7 +1609,7 @@ var _ = Describe("NNF Workflow Unit Tests", func() { } DescribeTable("should not go to Proposal Ready", - func(argIdx int, storages []nnfv1alpha3.NnfContainerProfileStorage) { + func(argIdx int, storages []nnfv1alpha4.NnfContainerProfileStorage) { buildContainerProfile(storages) buildContainerWorkflowWithArgs(storageArgsList[argIdx]) Eventually(func(g Gomega) bool { @@ -1620,19 +1620,19 @@ var _ = Describe("NNF Workflow Unit Tests", func() { }, Entry("when DW_JOB_ not present in the container profile", 0, - []nnfv1alpha3.NnfContainerProfileStorage{ + []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_PERSISTENT_foo_persistent_storage", Optional: true}, {Name: "DW_GLOBAL_foo_global_lustre", Optional: true}, }, ), Entry("when DW_PERSISTENT_ not present in the container profile", 1, - []nnfv1alpha3.NnfContainerProfileStorage{ + []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_JOB_foo_local_storage", Optional: true}, {Name: "DW_GLOBAL_foo_global_lustre", Optional: true}, }, ), Entry("when DW_GLOBAL_ not present in the container profile", 2, - []nnfv1alpha3.NnfContainerProfileStorage{ + []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_JOB_foo_local_storage", Optional: true}, {Name: "DW_PERSISTENT_foo_persistent_storage", Optional: true}, }, @@ -1738,7 +1738,7 @@ var _ = Describe("NnfStorageProfile Webhook test", func() { }) }) -func WaitForDMMReady(dmm *nnfv1alpha3.NnfDataMovementManager) { +func WaitForDMMReady(dmm *nnfv1alpha4.NnfDataMovementManager) { Eventually(func(g Gomega) bool { g.Expect(k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(dmm), dmm)).To(Succeed()) if !dmm.Status.Ready { diff --git a/internal/controller/nnfcontainerprofile_helpers.go b/internal/controller/nnfcontainerprofile_helpers.go index 352b5efed..57e90de77 100644 --- a/internal/controller/nnfcontainerprofile_helpers.go +++ b/internal/controller/nnfcontainerprofile_helpers.go @@ -32,11 +32,11 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/dwdparse" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/go-logr/logr" ) -func getContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha3.NnfContainerProfile, error) { +func getContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha4.NnfContainerProfile, error) { profile, err := findPinnedContainerProfile(ctx, clnt, workflow, index) if err != nil { return nil, err @@ -49,8 +49,8 @@ func getContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv return profile, nil } -func findPinnedContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha3.NnfContainerProfile, error) { - profile := &nnfv1alpha3.NnfContainerProfile{ +func findPinnedContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha4.NnfContainerProfile, error) { + profile := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index), Namespace: workflow.Namespace, @@ -68,7 +68,7 @@ func findPinnedContainerProfile(ctx context.Context, clnt client.Client, workflo return profile, nil } -func findContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha3.NnfContainerProfile, error) { +func findContainerProfile(ctx context.Context, clnt client.Client, workflow *dwsv1alpha2.Workflow, index int) (*nnfv1alpha4.NnfContainerProfile, error) { args, err := dwdparse.BuildArgsMap(workflow.Spec.DWDirectives[index]) if err != nil { return nil, err @@ -79,7 +79,7 @@ func findContainerProfile(ctx context.Context, clnt client.Client, workflow *dws return nil, fmt.Errorf("container directive '%s' has no profile key", workflow.Spec.DWDirectives[index]) } - profile := &nnfv1alpha3.NnfContainerProfile{ + profile := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: os.Getenv("NNF_CONTAINER_PROFILE_NAMESPACE"), @@ -121,7 +121,7 @@ func createPinnedContainerProfileIfNecessary(ctx context.Context, clnt client.Cl return err } - pinnedProfile := &nnfv1alpha3.NnfContainerProfile{ + pinnedProfile := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: indexedResourceName(workflow, index), Namespace: workflow.Namespace, diff --git a/internal/controller/nnfcontainerprofile_test.go b/internal/controller/nnfcontainerprofile_test.go index 4b2536be3..655ac04d2 100644 --- a/internal/controller/nnfcontainerprofile_test.go +++ b/internal/controller/nnfcontainerprofile_test.go @@ -31,17 +31,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // createNnfContainerProfile creates the given profile in the "default" namespace. // When expectSuccess=false, we expect to find that it was failed by the webhook. -func createNnfContainerProfile(containerProfile *nnfv1alpha3.NnfContainerProfile, expectSuccess bool) *nnfv1alpha3.NnfContainerProfile { +func createNnfContainerProfile(containerProfile *nnfv1alpha4.NnfContainerProfile, expectSuccess bool) *nnfv1alpha4.NnfContainerProfile { // Place NnfContainerProfiles in "default" for the test environment. containerProfile.ObjectMeta.Namespace = corev1.NamespaceDefault profKey := client.ObjectKeyFromObject(containerProfile) - profExpected := &nnfv1alpha3.NnfContainerProfile{} + profExpected := &nnfv1alpha4.NnfContainerProfile{} err := k8sClient.Get(context.TODO(), profKey, profExpected) Expect(err).ToNot(BeNil()) Expect(apierrors.IsNotFound(err)).To(BeTrue()) @@ -62,22 +62,22 @@ func createNnfContainerProfile(containerProfile *nnfv1alpha3.NnfContainerProfile } // basicNnfContainerProfile creates a simple NnfContainerProfile struct. -func basicNnfContainerProfile(name string, storages []nnfv1alpha3.NnfContainerProfileStorage) *nnfv1alpha3.NnfContainerProfile { +func basicNnfContainerProfile(name string, storages []nnfv1alpha4.NnfContainerProfileStorage) *nnfv1alpha4.NnfContainerProfile { // default storages if not supplied, optional by default if len(storages) == 0 { - storages = []nnfv1alpha3.NnfContainerProfileStorage{ + storages = []nnfv1alpha4.NnfContainerProfileStorage{ {Name: "DW_JOB_foo_local_storage", Optional: true}, {Name: "DW_PERSISTENT_foo_persistent_storage", Optional: true}, {Name: "DW_GLOBAL_foo_global_lustre", Optional: true}, } } - containerProfile := &nnfv1alpha3.NnfContainerProfile{ + containerProfile := &nnfv1alpha4.NnfContainerProfile{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Data: nnfv1alpha3.NnfContainerProfileData{ + Data: nnfv1alpha4.NnfContainerProfileData{ Pinned: false, Storages: storages, Spec: &corev1.PodSpec{ @@ -92,7 +92,7 @@ func basicNnfContainerProfile(name string, storages []nnfv1alpha3.NnfContainerPr } // createBasicNnfContainerProfile creates a simple default container profile. -func createBasicNnfContainerProfile(storages []nnfv1alpha3.NnfContainerProfileStorage) *nnfv1alpha3.NnfContainerProfile { +func createBasicNnfContainerProfile(storages []nnfv1alpha4.NnfContainerProfileStorage) *nnfv1alpha4.NnfContainerProfile { containerProfile := basicNnfContainerProfile("sample-"+uuid.NewString()[:8], storages) return createNnfContainerProfile(containerProfile, true) } diff --git a/internal/controller/nnfdatamovementprofile_helpers.go b/internal/controller/nnfdatamovementprofile_helpers.go index a10b65ff6..180b911cd 100644 --- a/internal/controller/nnfdatamovementprofile_helpers.go +++ b/internal/controller/nnfdatamovementprofile_helpers.go @@ -32,14 +32,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // findProfileToUse verifies a NnfDataMovementProfile named in the directive or verifies that a default can be found. -func findDMProfileToUse(ctx context.Context, clnt client.Client, args map[string]string) (*nnfv1alpha3.NnfDataMovementProfile, error) { +func findDMProfileToUse(ctx context.Context, clnt client.Client, args map[string]string) (*nnfv1alpha4.NnfDataMovementProfile, error) { var profileName string - NnfDataMovementProfile := &nnfv1alpha3.NnfDataMovementProfile{} + NnfDataMovementProfile := &nnfv1alpha4.NnfDataMovementProfile{} profileNamespace := os.Getenv("NNF_DM_PROFILE_NAMESPACE") @@ -47,7 +47,7 @@ func findDMProfileToUse(ctx context.Context, clnt client.Client, args map[string // that a default profile can be found. profileName, present := args["profile"] if present == false { - NnfDataMovementProfiles := &nnfv1alpha3.NnfDataMovementProfileList{} + NnfDataMovementProfiles := &nnfv1alpha4.NnfDataMovementProfileList{} if err := clnt.List(ctx, NnfDataMovementProfiles, &client.ListOptions{Namespace: profileNamespace}); err != nil { return nil, err } @@ -78,9 +78,9 @@ func findDMProfileToUse(ctx context.Context, clnt client.Client, args map[string } // findPinnedProfile finds the specified pinned profile. -func findPinnedDMProfile(ctx context.Context, clnt client.Client, namespace string, pinnedName string) (*nnfv1alpha3.NnfDataMovementProfile, error) { +func findPinnedDMProfile(ctx context.Context, clnt client.Client, namespace string, pinnedName string) (*nnfv1alpha4.NnfDataMovementProfile, error) { - NnfDataMovementProfile := &nnfv1alpha3.NnfDataMovementProfile{} + NnfDataMovementProfile := &nnfv1alpha4.NnfDataMovementProfile{} err := clnt.Get(ctx, types.NamespacedName{Namespace: namespace, Name: pinnedName}, NnfDataMovementProfile) if err != nil { return nil, err @@ -92,7 +92,7 @@ func findPinnedDMProfile(ctx context.Context, clnt client.Client, namespace stri } // createPinnedProfile finds the specified profile and makes a pinned copy of it. -func createPinnedDMProfile(ctx context.Context, clnt client.Client, clntScheme *runtime.Scheme, args map[string]string, owner metav1.Object, pinnedName string) (*nnfv1alpha3.NnfDataMovementProfile, error) { +func createPinnedDMProfile(ctx context.Context, clnt client.Client, clntScheme *runtime.Scheme, args map[string]string, owner metav1.Object, pinnedName string) (*nnfv1alpha4.NnfDataMovementProfile, error) { // If we've already pinned a profile, then we're done and // we no longer have a use for the original profile. diff --git a/internal/controller/nnfdatamovementprofile_test.go b/internal/controller/nnfdatamovementprofile_test.go index 0c93e6d86..5aef830d5 100644 --- a/internal/controller/nnfdatamovementprofile_test.go +++ b/internal/controller/nnfdatamovementprofile_test.go @@ -30,17 +30,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // createNnfDataMovementProfile creates the given profile in the "default" namespace. // When expectSuccess=false, we expect to find that it was failed by the webhook. -func createNnfDataMovementProfile(DataMovementProfile *nnfv1alpha3.NnfDataMovementProfile, expectSuccess bool) *nnfv1alpha3.NnfDataMovementProfile { +func createNnfDataMovementProfile(DataMovementProfile *nnfv1alpha4.NnfDataMovementProfile, expectSuccess bool) *nnfv1alpha4.NnfDataMovementProfile { // Place NnfDataMovementProfiles in "default" for the test environment. DataMovementProfile.ObjectMeta.Namespace = corev1.NamespaceDefault profKey := client.ObjectKeyFromObject(DataMovementProfile) - profExpected := &nnfv1alpha3.NnfDataMovementProfile{} + profExpected := &nnfv1alpha4.NnfDataMovementProfile{} err := k8sClient.Get(context.TODO(), profKey, profExpected) Expect(err).ToNot(BeNil()) Expect(apierrors.IsNotFound(err)).To(BeTrue()) @@ -61,8 +61,8 @@ func createNnfDataMovementProfile(DataMovementProfile *nnfv1alpha3.NnfDataMoveme } // basicNnfDataMovementProfile creates a simple NnfDataMovementProfile struct. -func basicNnfDataMovementProfile(name string) *nnfv1alpha3.NnfDataMovementProfile { - DataMovementProfile := &nnfv1alpha3.NnfDataMovementProfile{ +func basicNnfDataMovementProfile(name string) *nnfv1alpha4.NnfDataMovementProfile { + DataMovementProfile := &nnfv1alpha4.NnfDataMovementProfile{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, @@ -71,14 +71,14 @@ func basicNnfDataMovementProfile(name string) *nnfv1alpha3.NnfDataMovementProfil } // createBasicDefaultNnfDataMovementProfile creates a simple default storage profile. -func createBasicDefaultNnfDataMovementProfile() *nnfv1alpha3.NnfDataMovementProfile { +func createBasicDefaultNnfDataMovementProfile() *nnfv1alpha4.NnfDataMovementProfile { DataMovementProfile := basicNnfDataMovementProfile("durable-" + uuid.NewString()[:8]) DataMovementProfile.Data.Default = true return createNnfDataMovementProfile(DataMovementProfile, true) } // createBasicDefaultNnfDataMovementProfile creates a simple default storage profile. -func createBasicPinnedNnfDataMovementProfile() *nnfv1alpha3.NnfDataMovementProfile { +func createBasicPinnedNnfDataMovementProfile() *nnfv1alpha4.NnfDataMovementProfile { DataMovementProfile := basicNnfDataMovementProfile("durable-" + uuid.NewString()[:8]) DataMovementProfile.Data.Pinned = true return createNnfDataMovementProfile(DataMovementProfile, true) diff --git a/internal/controller/nnfstorageprofile_helpers.go b/internal/controller/nnfstorageprofile_helpers.go index 70ed33e12..a407f86d9 100644 --- a/internal/controller/nnfstorageprofile_helpers.go +++ b/internal/controller/nnfstorageprofile_helpers.go @@ -32,14 +32,14 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // findProfileToUse verifies a NnfStorageProfile named in the directive or verifies that a default can be found. -func findProfileToUse(ctx context.Context, clnt client.Client, args map[string]string) (*nnfv1alpha3.NnfStorageProfile, error) { +func findProfileToUse(ctx context.Context, clnt client.Client, args map[string]string) (*nnfv1alpha4.NnfStorageProfile, error) { var profileName string - nnfStorageProfile := &nnfv1alpha3.NnfStorageProfile{} + nnfStorageProfile := &nnfv1alpha4.NnfStorageProfile{} profileNamespace := os.Getenv("NNF_STORAGE_PROFILE_NAMESPACE") @@ -47,7 +47,7 @@ func findProfileToUse(ctx context.Context, clnt client.Client, args map[string]s // that a default profile can be found. profileName, present := args["profile"] if present == false { - nnfStorageProfiles := &nnfv1alpha3.NnfStorageProfileList{} + nnfStorageProfiles := &nnfv1alpha4.NnfStorageProfileList{} if err := clnt.List(ctx, nnfStorageProfiles, &client.ListOptions{Namespace: profileNamespace}); err != nil { return nil, err } @@ -78,9 +78,9 @@ func findProfileToUse(ctx context.Context, clnt client.Client, args map[string]s } // findPinnedProfile finds the specified pinned profile. -func findPinnedProfile(ctx context.Context, clnt client.Client, namespace string, pinnedName string) (*nnfv1alpha3.NnfStorageProfile, error) { +func findPinnedProfile(ctx context.Context, clnt client.Client, namespace string, pinnedName string) (*nnfv1alpha4.NnfStorageProfile, error) { - nnfStorageProfile := &nnfv1alpha3.NnfStorageProfile{} + nnfStorageProfile := &nnfv1alpha4.NnfStorageProfile{} err := clnt.Get(ctx, types.NamespacedName{Namespace: namespace, Name: pinnedName}, nnfStorageProfile) if err != nil { return nil, err @@ -92,7 +92,7 @@ func findPinnedProfile(ctx context.Context, clnt client.Client, namespace string } // createPinnedProfile finds the specified profile and makes a pinned copy of it. -func createPinnedProfile(ctx context.Context, clnt client.Client, clntScheme *runtime.Scheme, args map[string]string, owner metav1.Object, pinnedName string) (*nnfv1alpha3.NnfStorageProfile, error) { +func createPinnedProfile(ctx context.Context, clnt client.Client, clntScheme *runtime.Scheme, args map[string]string, owner metav1.Object, pinnedName string) (*nnfv1alpha4.NnfStorageProfile, error) { // If we've already pinned a profile, then we're done and // we no longer have a use for the original profile. @@ -134,32 +134,32 @@ func createPinnedProfile(ctx context.Context, clnt client.Client, clntScheme *ru // addPinnedStorageProfileLabel adds name/namespace labels to a resource to indicate // which pinned storage profile is being used with that resource. -func addPinnedStorageProfileLabel(object metav1.Object, nnfStorageProfile *nnfv1alpha3.NnfStorageProfile) { +func addPinnedStorageProfileLabel(object metav1.Object, nnfStorageProfile *nnfv1alpha4.NnfStorageProfile) { labels := object.GetLabels() if labels == nil { labels = make(map[string]string) } - labels[nnfv1alpha3.PinnedStorageProfileLabelName] = nnfStorageProfile.GetName() - labels[nnfv1alpha3.PinnedStorageProfileLabelNameSpace] = nnfStorageProfile.GetNamespace() + labels[nnfv1alpha4.PinnedStorageProfileLabelName] = nnfStorageProfile.GetName() + labels[nnfv1alpha4.PinnedStorageProfileLabelNameSpace] = nnfStorageProfile.GetNamespace() object.SetLabels(labels) } // getPinnedStorageProfileFromLabel finds the pinned storage profile via the labels on the // specified resource. -func getPinnedStorageProfileFromLabel(ctx context.Context, clnt client.Client, object metav1.Object) (*nnfv1alpha3.NnfStorageProfile, error) { +func getPinnedStorageProfileFromLabel(ctx context.Context, clnt client.Client, object metav1.Object) (*nnfv1alpha4.NnfStorageProfile, error) { labels := object.GetLabels() if labels == nil { return nil, dwsv1alpha2.NewResourceError("unable to find labels").WithFatal() } - pinnedName, okName := labels[nnfv1alpha3.PinnedStorageProfileLabelName] + pinnedName, okName := labels[nnfv1alpha4.PinnedStorageProfileLabelName] if !okName { - return nil, dwsv1alpha2.NewResourceError("unable to find %s label", nnfv1alpha3.PinnedStorageProfileLabelName).WithFatal() + return nil, dwsv1alpha2.NewResourceError("unable to find %s label", nnfv1alpha4.PinnedStorageProfileLabelName).WithFatal() } - pinnedNamespace, okNamespace := labels[nnfv1alpha3.PinnedStorageProfileLabelNameSpace] + pinnedNamespace, okNamespace := labels[nnfv1alpha4.PinnedStorageProfileLabelNameSpace] if !okNamespace { - return nil, dwsv1alpha2.NewResourceError("unable to find %s label", nnfv1alpha3.PinnedStorageProfileLabelNameSpace).WithFatal() + return nil, dwsv1alpha2.NewResourceError("unable to find %s label", nnfv1alpha4.PinnedStorageProfileLabelNameSpace).WithFatal() } return findPinnedProfile(ctx, clnt, pinnedNamespace, pinnedName) diff --git a/internal/controller/nnfstorageprofile_test.go b/internal/controller/nnfstorageprofile_test.go index acf44ff1e..a6a780223 100644 --- a/internal/controller/nnfstorageprofile_test.go +++ b/internal/controller/nnfstorageprofile_test.go @@ -30,17 +30,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) // createNnfStorageProfile creates the given profile in the "default" namespace. // When expectSuccess=false, we expect to find that it was failed by the webhook. -func createNnfStorageProfile(storageProfile *nnfv1alpha3.NnfStorageProfile, expectSuccess bool) *nnfv1alpha3.NnfStorageProfile { +func createNnfStorageProfile(storageProfile *nnfv1alpha4.NnfStorageProfile, expectSuccess bool) *nnfv1alpha4.NnfStorageProfile { // Place NnfStorageProfiles in "default" for the test environment. storageProfile.ObjectMeta.Namespace = corev1.NamespaceDefault profKey := client.ObjectKeyFromObject(storageProfile) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} err := k8sClient.Get(context.TODO(), profKey, profExpected) Expect(err).ToNot(BeNil()) Expect(apierrors.IsNotFound(err)).To(BeTrue()) @@ -61,8 +61,8 @@ func createNnfStorageProfile(storageProfile *nnfv1alpha3.NnfStorageProfile, expe } // basicNnfStorageProfile creates a simple NnfStorageProfile struct. -func basicNnfStorageProfile(name string) *nnfv1alpha3.NnfStorageProfile { - storageProfile := &nnfv1alpha3.NnfStorageProfile{ +func basicNnfStorageProfile(name string) *nnfv1alpha4.NnfStorageProfile { + storageProfile := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, @@ -71,14 +71,14 @@ func basicNnfStorageProfile(name string) *nnfv1alpha3.NnfStorageProfile { } // createBasicDefaultNnfStorageProfile creates a simple default storage profile. -func createBasicDefaultNnfStorageProfile() *nnfv1alpha3.NnfStorageProfile { +func createBasicDefaultNnfStorageProfile() *nnfv1alpha4.NnfStorageProfile { storageProfile := basicNnfStorageProfile("durable-" + uuid.NewString()[:8]) storageProfile.Data.Default = true return createNnfStorageProfile(storageProfile, true) } // createBasicDefaultNnfStorageProfile creates a simple default storage profile. -func createBasicPinnedNnfStorageProfile() *nnfv1alpha3.NnfStorageProfile { +func createBasicPinnedNnfStorageProfile() *nnfv1alpha4.NnfStorageProfile { storageProfile := basicNnfStorageProfile("durable-" + uuid.NewString()[:8]) storageProfile.Data.Pinned = true return createNnfStorageProfile(storageProfile, true) diff --git a/internal/controller/nnfsystemstorage_controller.go b/internal/controller/nnfsystemstorage_controller.go index a95517dba..72b66a23a 100644 --- a/internal/controller/nnfsystemstorage_controller.go +++ b/internal/controller/nnfsystemstorage_controller.go @@ -39,7 +39,7 @@ import ( dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" "github.com/DataWorkflowServices/dws/utils/updater" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" "github.com/NearNodeFlash/nnf-sos/internal/controller/metrics" ) @@ -71,7 +71,7 @@ func (r *NnfSystemStorageReconciler) Reconcile(ctx context.Context, req ctrl.Req metrics.NnfSystemStorageReconcilesTotal.Inc() - nnfSystemStorage := &nnfv1alpha3.NnfSystemStorage{} + nnfSystemStorage := &nnfv1alpha4.NnfSystemStorage{} if err := r.Get(ctx, req.NamespacedName, nnfSystemStorage); err != nil { // ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them @@ -79,7 +79,7 @@ func (r *NnfSystemStorageReconciler) Reconcile(ctx context.Context, req ctrl.Req return ctrl.Result{}, client.IgnoreNotFound(err) } - statusUpdater := updater.NewStatusUpdater[*nnfv1alpha3.NnfSystemStorageStatus](nnfSystemStorage) + statusUpdater := updater.NewStatusUpdater[*nnfv1alpha4.NnfSystemStorageStatus](nnfSystemStorage) defer func() { err = statusUpdater.CloseWithStatusUpdate(ctx, r.Client.Status(), err) }() defer func() { nnfSystemStorage.Status.SetResourceErrorAndLog(err, log) }() @@ -164,7 +164,7 @@ func (r *NnfSystemStorageReconciler) Reconcile(ctx context.Context, req ctrl.Req // Get the SystemConfiguration. If a SystemConfiguration is specified in the NnfSystemStorage, use that. // Otherwise, use the default/default SystemConfiguration. -func (r *NnfSystemStorageReconciler) getSystemConfiguration(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) (*dwsv1alpha2.SystemConfiguration, error) { +func (r *NnfSystemStorageReconciler) getSystemConfiguration(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) (*dwsv1alpha2.SystemConfiguration, error) { systemConfiguration := &dwsv1alpha2.SystemConfiguration{} if nnfSystemStorage.Spec.SystemConfiguration != (corev1.ObjectReference{}) { @@ -192,16 +192,16 @@ func (r *NnfSystemStorageReconciler) getSystemConfiguration(ctx context.Context, // Get the StorageProfile specified in the spec. We don't look for the default profile, a profile must be // specified in the NnfSystemStorage spec, and it must be marked as pinned. -func (r *NnfSystemStorageReconciler) getStorageProfile(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) (*nnfv1alpha3.NnfStorageProfile, error) { +func (r *NnfSystemStorageReconciler) getStorageProfile(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) (*nnfv1alpha4.NnfStorageProfile, error) { if nnfSystemStorage.Spec.StorageProfile == (corev1.ObjectReference{}) { return nil, dwsv1alpha2.NewResourceError("StorageProfile must be specified").WithFatal() } - if nnfSystemStorage.Spec.StorageProfile.Kind != reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name() { - return nil, dwsv1alpha2.NewResourceError("StorageProfile is not of kind '%s'", reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name()).WithFatal() + if nnfSystemStorage.Spec.StorageProfile.Kind != reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name() { + return nil, dwsv1alpha2.NewResourceError("StorageProfile is not of kind '%s'", reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name()).WithFatal() } - storageProfile := &nnfv1alpha3.NnfStorageProfile{ + storageProfile := &nnfv1alpha4.NnfStorageProfile{ ObjectMeta: metav1.ObjectMeta{ Name: nnfSystemStorage.Spec.StorageProfile.Name, Namespace: nnfSystemStorage.Spec.StorageProfile.Namespace, @@ -218,7 +218,7 @@ func (r *NnfSystemStorageReconciler) getStorageProfile(ctx context.Context, nnfS // Create a Servers resource with one allocation on each Rabbit. If the IncludeRabbits array is not // empty, only use those Rabbits. Otherwise, use all the Rabbits in the SystemConfiguration resource except // those specified in the ExcludeRabbits array. -func (r *NnfSystemStorageReconciler) createServers(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) error { +func (r *NnfSystemStorageReconciler) createServers(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) error { log := r.Log.WithValues("NnfSystemStorage", client.ObjectKeyFromObject(nnfSystemStorage)) // Create a list of Rabbits to use @@ -291,6 +291,19 @@ func (r *NnfSystemStorageReconciler) createServers(ctx context.Context, nnfSyste rabbitList = tempRabbitList } + allocationCount := 1 + if nnfSystemStorage.Spec.Shared == false { + switch nnfSystemStorage.Spec.ComputesTarget { + case nnfv1alpha4.ComputesTargetAll: + allocationCount = 16 + case nnfv1alpha4.ComputesTargetEven, nnfv1alpha4.ComputesTargetOdd: + allocationCount = 8 + case nnfv1alpha4.ComputesTargetPattern: + allocationCount = len(nnfSystemStorage.Spec.ComputesPattern) + default: + return dwsv1alpha2.NewResourceError("unexpected ComputesTarget type '%s'", nnfSystemStorage.Spec.ComputesTarget).WithFatal() + } + } // Use the Rabbit list to fill in the servers resource with one allocation per Rabbit servers := &dwsv1alpha2.Servers{ ObjectMeta: metav1.ObjectMeta{ @@ -312,7 +325,7 @@ func (r *NnfSystemStorageReconciler) createServers(ctx context.Context, nnfSyste servers.Spec.AllocationSets[0].Storage = []dwsv1alpha2.ServersSpecStorage{} for _, rabbitName := range rabbitList { - servers.Spec.AllocationSets[0].Storage = append(servers.Spec.AllocationSets[0].Storage, dwsv1alpha2.ServersSpecStorage{Name: rabbitName, AllocationCount: 1}) + servers.Spec.AllocationSets[0].Storage = append(servers.Spec.AllocationSets[0].Storage, dwsv1alpha2.ServersSpecStorage{Name: rabbitName, AllocationCount: allocationCount}) } return ctrl.SetControllerReference(nnfSystemStorage, servers, r.Scheme) @@ -338,7 +351,7 @@ func (r *NnfSystemStorageReconciler) createServers(ctx context.Context, nnfSyste // in the servers resource and exclude any computes listed in ExcludeComputes. Additionally, the ComputesTarget field determines // which of the Rabbits computes to include: all, even, odd, or a custom list. This is done using the index of the compute node // in the SystemConfiguration. -func (r *NnfSystemStorageReconciler) createComputes(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) error { +func (r *NnfSystemStorageReconciler) createComputes(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) error { log := r.Log.WithValues("NnfSystemStorage", client.ObjectKeyFromObject(nnfSystemStorage)) // Get a list of compute nodes to use @@ -375,16 +388,16 @@ func (r *NnfSystemStorageReconciler) createComputes(ctx context.Context, nnfSyst // Make a list of compute node index values based on the ComputesTarget field var indexList []int switch nnfSystemStorage.Spec.ComputesTarget { - case nnfv1alpha3.ComputesTargetAll: + case nnfv1alpha4.ComputesTargetAll: indexList = []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} - case nnfv1alpha3.ComputesTargetEven: + case nnfv1alpha4.ComputesTargetEven: indexList = []int{0, 2, 4, 6, 8, 10, 12, 14} - case nnfv1alpha3.ComputesTargetOdd: + case nnfv1alpha4.ComputesTargetOdd: indexList = []int{1, 3, 5, 7, 9, 11, 13, 15} - case nnfv1alpha3.ComputesTargetPattern: + case nnfv1alpha4.ComputesTargetPattern: indexList = append([]int(nil), nnfSystemStorage.Spec.ComputesPattern...) default: - return dwsv1alpha2.NewResourceError("undexpected ComputesTarget type '%s'", nnfSystemStorage.Spec.ComputesTarget).WithFatal() + return dwsv1alpha2.NewResourceError("unexpected ComputesTarget type '%s'", nnfSystemStorage.Spec.ComputesTarget).WithFatal() } indexMap := map[int]bool{} @@ -460,7 +473,7 @@ func (r *NnfSystemStorageReconciler) createComputes(ctx context.Context, nnfSyst } // Create a NnfStorage resource using the list of Rabbits in the Servers resource -func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) error { +func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) error { log := r.Log.WithValues("NnfSystemStorage", client.ObjectKeyFromObject(nnfSystemStorage)) storageProfile, err := r.getStorageProfile(ctx, nnfSystemStorage) @@ -479,7 +492,7 @@ func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSy return dwsv1alpha2.NewResourceError("could not get Servers: %v", client.ObjectKeyFromObject(servers)).WithError(err) } - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfSystemStorage.GetName(), Namespace: nnfSystemStorage.GetNamespace(), @@ -497,11 +510,11 @@ func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSy nnfStorage.Spec.GroupID = 0 // Need to remove all of the AllocationSets in the NnfStorage object before we begin - nnfStorage.Spec.AllocationSets = []nnfv1alpha3.NnfStorageAllocationSetSpec{} + nnfStorage.Spec.AllocationSets = []nnfv1alpha4.NnfStorageAllocationSetSpec{} // Iterate the Servers data elements to pull out the allocation sets for the server for i := range servers.Spec.AllocationSets { - nnfAllocationSet := nnfv1alpha3.NnfStorageAllocationSetSpec{} + nnfAllocationSet := nnfv1alpha4.NnfStorageAllocationSetSpec{} nnfAllocationSet.Name = servers.Spec.AllocationSets[i].Label nnfAllocationSet.Capacity = servers.Spec.AllocationSets[i].AllocationSize @@ -509,7 +522,7 @@ func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSy // Create Nodes for this allocation set. for _, storage := range servers.Spec.AllocationSets[i].Storage { - node := nnfv1alpha3.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount} + node := nnfv1alpha4.NnfStorageAllocationNodes{Name: storage.Name, Count: storage.AllocationCount} nnfAllocationSet.Nodes = append(nnfAllocationSet.Nodes, node) } @@ -535,9 +548,9 @@ func (r *NnfSystemStorageReconciler) createNnfStorage(ctx context.Context, nnfSy } // Wait until the NnfStorage has completed. Any errors will bubble up to the NnfSystemStorage -func (r *NnfSystemStorageReconciler) waitForNnfStorage(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) (bool, error) { +func (r *NnfSystemStorageReconciler) waitForNnfStorage(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) (bool, error) { // Check whether the NnfStorage has finished - nnfStorage := &nnfv1alpha3.NnfStorage{ + nnfStorage := &nnfv1alpha4.NnfStorage{ ObjectMeta: metav1.ObjectMeta{ Name: nnfSystemStorage.GetName(), Namespace: nnfSystemStorage.GetNamespace(), @@ -566,7 +579,7 @@ func (r *NnfSystemStorageReconciler) waitForNnfStorage(ctx context.Context, nnfS // Create an NnfAccess using the Computes resource we created earlier. This NnfAccess may or may not create any ClientMount // resources depending on if MakeClientMounts was specified in the NnfSystemStorage spec. The NnfAccess target is "shared", // meaning that multiple compute nodes will access the same storage. -func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) error { +func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) error { log := r.Log.WithValues("NnfSystemStorage", client.ObjectKeyFromObject(nnfSystemStorage)) storageProfile, err := r.getStorageProfile(ctx, nnfSystemStorage) @@ -574,7 +587,7 @@ func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSys return err } - nnfAccess := &nnfv1alpha3.NnfAccess{ + nnfAccess := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: nnfSystemStorage.GetName(), Namespace: nnfSystemStorage.GetNamespace(), @@ -592,7 +605,12 @@ func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSys nnfAccess.Spec.DesiredState = "mounted" nnfAccess.Spec.UserID = 0 nnfAccess.Spec.GroupID = 0 - nnfAccess.Spec.Target = "shared" + if nnfSystemStorage.Spec.Shared { + nnfAccess.Spec.Target = "shared" + } else { + nnfAccess.Spec.Target = "single" + } + nnfAccess.Spec.IgnoreOfflineComputes = nnfSystemStorage.Spec.IgnoreOfflineComputes nnfAccess.Spec.MakeClientMounts = nnfSystemStorage.Spec.MakeClientMounts nnfAccess.Spec.MountPath = nnfSystemStorage.Spec.ClientMountPath nnfAccess.Spec.ClientReference = corev1.ObjectReference{ @@ -604,7 +622,7 @@ func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSys nnfAccess.Spec.StorageReference = corev1.ObjectReference{ Name: nnfSystemStorage.GetName(), Namespace: nnfSystemStorage.GetNamespace(), - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorage{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorage{}).Name(), } return ctrl.SetControllerReference(nnfSystemStorage, nnfAccess, r.Scheme) @@ -625,8 +643,8 @@ func (r *NnfSystemStorageReconciler) createNnfAccess(ctx context.Context, nnfSys } // Wait for the NnfAccess to be ready. Any errors are bubbled up to the NnfSystemStorage -func (r *NnfSystemStorageReconciler) waitForNnfAccess(ctx context.Context, nnfSystemStorage *nnfv1alpha3.NnfSystemStorage) (bool, error) { - nnfAccess := &nnfv1alpha3.NnfAccess{ +func (r *NnfSystemStorageReconciler) waitForNnfAccess(ctx context.Context, nnfSystemStorage *nnfv1alpha4.NnfSystemStorage) (bool, error) { + nnfAccess := &nnfv1alpha4.NnfAccess{ ObjectMeta: metav1.ObjectMeta{ Name: nnfSystemStorage.GetName(), Namespace: nnfSystemStorage.GetNamespace(), @@ -659,7 +677,7 @@ func (r *NnfSystemStorageReconciler) NnfSystemStorageEnqueueAll(ctx context.Cont requests := []reconcile.Request{} // Find all the NnfSystemStorage resources and add them to the Request list - nnfSystemStorageList := &nnfv1alpha3.NnfSystemStorageList{} + nnfSystemStorageList := &nnfv1alpha4.NnfSystemStorageList{} if err := r.List(context.TODO(), nnfSystemStorageList, []client.ListOption{}...); err != nil { log.Info("Could not list NnfSystemStorage", "error", err) return requests @@ -675,18 +693,18 @@ func (r *NnfSystemStorageReconciler) NnfSystemStorageEnqueueAll(ctx context.Cont // SetupWithManager sets up the controller with the Manager. func (r *NnfSystemStorageReconciler) SetupWithManager(mgr ctrl.Manager) error { r.ChildObjects = []dwsv1alpha2.ObjectList{ - &nnfv1alpha3.NnfAccessList{}, - &nnfv1alpha3.NnfStorageList{}, + &nnfv1alpha4.NnfAccessList{}, + &nnfv1alpha4.NnfStorageList{}, &dwsv1alpha2.ComputesList{}, &dwsv1alpha2.ServersList{}, } return ctrl.NewControllerManagedBy(mgr). - For(&nnfv1alpha3.NnfSystemStorage{}). + For(&nnfv1alpha4.NnfSystemStorage{}). Owns(&dwsv1alpha2.Computes{}). Owns(&dwsv1alpha2.Servers{}). - Owns(&nnfv1alpha3.NnfStorage{}). - Owns(&nnfv1alpha3.NnfAccess{}). + Owns(&nnfv1alpha4.NnfStorage{}). + Owns(&nnfv1alpha4.NnfAccess{}). Watches(&dwsv1alpha2.Storage{}, handler.EnqueueRequestsFromMapFunc(r.NnfSystemStorageEnqueueAll)). Complete(r) } diff --git a/internal/controller/nnfsystemstorage_controller_test.go b/internal/controller/nnfsystemstorage_controller_test.go index df370eb5b..4f145c9c9 100644 --- a/internal/controller/nnfsystemstorage_controller_test.go +++ b/internal/controller/nnfsystemstorage_controller_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" ) var _ = Describe("NnfSystemStorage Controller Test", func() { @@ -42,11 +42,11 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { "rabbit-systemstorage-node-1", "rabbit-systemstorage-node-2"} - nnfNodes := [2]*nnfv1alpha3.NnfNode{} + nnfNodes := [2]*nnfv1alpha4.NnfNode{} nodes := [2]*corev1.Node{} var systemConfiguration *dwsv1alpha2.SystemConfiguration - var storageProfile *nnfv1alpha3.NnfStorageProfile + var storageProfile *nnfv1alpha4.NnfStorageProfile var setup sync.Once BeforeEach(func() { @@ -216,7 +216,7 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { ObjectMeta: metav1.ObjectMeta{ Name: nodeName, Labels: map[string]string{ - nnfv1alpha3.RabbitNodeSelectorLabel: "true", + nnfv1alpha4.RabbitNodeSelectorLabel: "true", }, }, Status: corev1.NodeStatus{ @@ -231,14 +231,14 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { Expect(k8sClient.Create(context.TODO(), nodes[i])).To(Succeed()) - nnfNodes[i] = &nnfv1alpha3.NnfNode{ + nnfNodes[i] = &nnfv1alpha4.NnfNode{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "nnf-nlc", Namespace: nodeName, }, - Spec: nnfv1alpha3.NnfNodeSpec{ - State: nnfv1alpha3.ResourceEnable, + Spec: nnfv1alpha4.NnfNodeSpec{ + State: nnfv1alpha4.ResourceEnable, }, } Expect(k8sClient.Create(context.TODO(), nnfNodes[i])).To(Succeed()) @@ -267,14 +267,14 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { AfterEach(func() { Expect(k8sClient.Delete(context.TODO(), storageProfile)).To(Succeed()) - profExpected := &nnfv1alpha3.NnfStorageProfile{} + profExpected := &nnfv1alpha4.NnfStorageProfile{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(storageProfile), profExpected) }).ShouldNot(Succeed()) for i := range nodeNames { Expect(k8sClient.Delete(context.TODO(), nnfNodes[i])).To(Succeed()) - tempNnfNode := &nnfv1alpha3.NnfNode{} + tempNnfNode := &nnfv1alpha4.NnfNode{} Eventually(func() error { // Delete can still return the cached object. Wait until the object is no longer present return k8sClient.Get(context.TODO(), client.ObjectKeyFromObject(nnfNodes[i]), tempNnfNode) }).ShouldNot(Succeed()) @@ -295,20 +295,21 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { Describe("Create NnfSystemStorage", func() { It("Creates basic system storage", func() { - nnfSystemStorage := &nnfv1alpha3.NnfSystemStorage{ + nnfSystemStorage := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-system-storage", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{ + Spec: nnfv1alpha4.NnfSystemStorageSpec{ Type: "raw", - ComputesTarget: nnfv1alpha3.ComputesTargetAll, + ComputesTarget: nnfv1alpha4.ComputesTargetAll, MakeClientMounts: false, + Shared: true, Capacity: 1073741824, StorageProfile: corev1.ObjectReference{ Name: storageProfile.GetName(), Namespace: storageProfile.GetNamespace(), - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name(), }, }, } @@ -354,20 +355,21 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { }) It("Creates even system storage", func() { - nnfSystemStorage := &nnfv1alpha3.NnfSystemStorage{ + nnfSystemStorage := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-system-storage", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{ + Spec: nnfv1alpha4.NnfSystemStorageSpec{ Type: "raw", - ComputesTarget: nnfv1alpha3.ComputesTargetEven, + ComputesTarget: nnfv1alpha4.ComputesTargetEven, MakeClientMounts: false, + Shared: true, Capacity: 1073741824, StorageProfile: corev1.ObjectReference{ Name: storageProfile.GetName(), Namespace: storageProfile.GetNamespace(), - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name(), }, }, } @@ -413,21 +415,22 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { }) It("Creates system storage with index map", func() { - nnfSystemStorage := &nnfv1alpha3.NnfSystemStorage{ + nnfSystemStorage := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-system-storage", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{ + Spec: nnfv1alpha4.NnfSystemStorageSpec{ Type: "raw", - ComputesTarget: nnfv1alpha3.ComputesTargetPattern, + ComputesTarget: nnfv1alpha4.ComputesTargetPattern, ComputesPattern: []int{0, 1, 2, 3, 4}, MakeClientMounts: false, + Shared: true, Capacity: 1073741824, StorageProfile: corev1.ObjectReference{ Name: storageProfile.GetName(), Namespace: storageProfile.GetNamespace(), - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name(), }, }, } @@ -473,22 +476,23 @@ var _ = Describe("NnfSystemStorage Controller Test", func() { }) It("Creates system storage with excluded Rabbits and computes", func() { - nnfSystemStorage := &nnfv1alpha3.NnfSystemStorage{ + nnfSystemStorage := &nnfv1alpha4.NnfSystemStorage{ ObjectMeta: metav1.ObjectMeta{ Name: "nnf-system-storage", Namespace: corev1.NamespaceDefault, }, - Spec: nnfv1alpha3.NnfSystemStorageSpec{ + Spec: nnfv1alpha4.NnfSystemStorageSpec{ Type: "raw", - ComputesTarget: nnfv1alpha3.ComputesTargetAll, + ComputesTarget: nnfv1alpha4.ComputesTargetAll, ExcludeRabbits: []string{nodeNames[0]}, ExcludeComputes: []string{"1-4", "1-5", "1-6"}, MakeClientMounts: false, + Shared: true, Capacity: 1073741824, StorageProfile: corev1.ObjectReference{ Name: storageProfile.GetName(), Namespace: storageProfile.GetNamespace(), - Kind: reflect.TypeOf(nnfv1alpha3.NnfStorageProfile{}).Name(), + Kind: reflect.TypeOf(nnfv1alpha4.NnfStorageProfile{}).Name(), }, }, } diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 3fd884ab1..874cb09e6 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -50,9 +50,9 @@ import ( lusv1beta1 "github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1" nnf "github.com/NearNodeFlash/nnf-ec/pkg" - nnfv1alpha1 "github.com/NearNodeFlash/nnf-sos/api/v1alpha1" nnfv1alpha2 "github.com/NearNodeFlash/nnf-sos/api/v1alpha2" nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" _ "github.com/DataWorkflowServices/dws/config/crd/bases" _ "github.com/DataWorkflowServices/dws/config/webhook" @@ -142,15 +142,15 @@ var _ = BeforeSuite(func() { err = lusv1beta1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) - err = nnfv1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - err = nnfv1alpha2.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) err = nnfv1alpha3.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) + err = nnfv1alpha4.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + //+kubebuilder:scaffold:scheme webhookPaths := []string{} @@ -215,46 +215,46 @@ var _ = BeforeSuite(func() { err = (&lusv1beta1.LustreFileSystem{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfStorageProfile{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfStorageProfile{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfContainerProfile{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfContainerProfile{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfDataMovementProfile{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfDataMovementProfile{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfAccess{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfAccess{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfDataMovement{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfDataMovement{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfDataMovementManager{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfDataMovementManager{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfLustreMGT{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfLustreMGT{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfNode{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfNode{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfNodeBlockStorage{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfNodeBlockStorage{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfNodeECData{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfNodeECData{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfNodeStorage{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfNodeStorage{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfPortManager{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfPortManager{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfStorage{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfStorage{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) - err = (&nnfv1alpha3.NnfSystemStorage{}).SetupWebhookWithManager(k8sManager) + err = (&nnfv1alpha4.NnfSystemStorage{}).SetupWebhookWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) // +crdbumper:scaffold:builder diff --git a/mount-daemon/main.go b/mount-daemon/main.go index 9d383b2f1..3ea05df28 100644 --- a/mount-daemon/main.go +++ b/mount-daemon/main.go @@ -46,7 +46,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" dwsv1alpha2 "github.com/DataWorkflowServices/dws/api/v1alpha2" - nnfv1alpha3 "github.com/NearNodeFlash/nnf-sos/api/v1alpha3" + nnfv1alpha4 "github.com/NearNodeFlash/nnf-sos/api/v1alpha4" controllers "github.com/NearNodeFlash/nnf-sos/internal/controller" "github.com/NearNodeFlash/nnf-sos/mount-daemon/version" //+kubebuilder:scaffold:imports @@ -69,7 +69,7 @@ type Service struct { func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(dwsv1alpha2.AddToScheme(scheme)) - utilruntime.Must(nnfv1alpha3.AddToScheme(scheme)) + utilruntime.Must(nnfv1alpha4.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } diff --git a/pkg/blockdevice/lvm.go b/pkg/blockdevice/lvm.go index f02f48e8b..52a2e9d52 100644 --- a/pkg/blockdevice/lvm.go +++ b/pkg/blockdevice/lvm.go @@ -140,12 +140,18 @@ func (l *Lvm) Destroy(ctx context.Context) (bool, error) { destroyed, err := l.LogicalVolume.Remove(ctx, l.CommandArgs.LvArgs.Remove) if err != nil { return false, err - } if destroyed { objectDestroyed = true } + // Check to ensure the VG has no LVs before removing + if count, err := l.VolumeGroup.NumLVs(ctx); err != nil { + return false, err + } else if count != 0 { + return objectDestroyed, nil + } + destroyed, err = l.VolumeGroup.Remove(ctx, l.CommandArgs.VgArgs.Remove) if err != nil { return false, err diff --git a/pkg/blockdevice/lvm/volume_groups.go b/pkg/blockdevice/lvm/volume_groups.go index acff13d2c..334d4fd8a 100644 --- a/pkg/blockdevice/lvm/volume_groups.go +++ b/pkg/blockdevice/lvm/volume_groups.go @@ -174,7 +174,7 @@ func (vg *VolumeGroup) LockStop(ctx context.Context, rawArgs string) (bool, erro return false, err } - if exists == false { + if !exists { return false, nil } @@ -211,3 +211,19 @@ func (vg *VolumeGroup) Remove(ctx context.Context, rawArgs string) (bool, error) return false, nil } + +func (vg *VolumeGroup) NumLVs(ctx context.Context) (int, error) { + count := 0 + + lvs, err := lvsListVolumes(ctx, vg.Log) + if err != nil { + return count, err + } + for _, lv := range lvs { + if lv.VGName == vg.Name { + count += 1 + } + } + + return count, nil +} diff --git a/pkg/filesystem/filesystem.go b/pkg/filesystem/filesystem.go index a2b2d9f1c..193dee940 100644 --- a/pkg/filesystem/filesystem.go +++ b/pkg/filesystem/filesystem.go @@ -45,4 +45,10 @@ type FileSystem interface { // Run any commands against the activated file system before it is deactivated PreDeactivate(ctx context.Context) (bool, error) + + // Run any commands against the file system after it has been mounted + PostMount(ctx context.Context, complete bool) (bool, error) + + // Run any commands against the file system before it is unmounted + PreUnmount(ctx context.Context) (bool, error) } diff --git a/pkg/filesystem/kind.go b/pkg/filesystem/kind.go index 6905926ee..aa799fb4e 100644 --- a/pkg/filesystem/kind.go +++ b/pkg/filesystem/kind.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -23,6 +23,7 @@ import ( "context" "fmt" "os" + "path/filepath" "github.com/NearNodeFlash/nnf-sos/pkg/blockdevice" "github.com/go-logr/logr" @@ -39,7 +40,7 @@ type KindFileSystem struct { var _ FileSystem = &KindFileSystem{} func (m *KindFileSystem) Create(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -47,7 +48,7 @@ func (m *KindFileSystem) Create(ctx context.Context, complete bool) (bool, error return false, fmt.Errorf("could not create mount directory %s: %w", m.Path, err) } - m.Log.Info("Created mock file system", "path", m.Path) + m.Log.Info("Created mock file system in kind", "path", m.Path) return true, nil } @@ -55,34 +56,39 @@ func (m *KindFileSystem) Destroy(ctx context.Context) (bool, error) { // Remove the directory. If it fails don't worry about it. _ = os.RemoveAll(m.Path) - m.Log.Info("Destroyed mock file system") + m.Log.Info("Destroyed mock file system in kind") return true, nil } func (m *KindFileSystem) Activate(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } - m.Log.Info("Activated mock file system") + m.Log.Info("Activated mock file system in kind") return true, nil } func (m *KindFileSystem) Deactivate(ctx context.Context) (bool, error) { - m.Log.Info("Deactivated mock file system") + m.Log.Info("Deactivated mock file system in kind") return true, nil } func (m *KindFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } + bn := filepath.Dir(path) + if err := os.MkdirAll(bn, 0755); err != nil { + return false, fmt.Errorf("could not create directory for symlink %s: %w", bn, err) + } + if err := os.Symlink(m.Path, path); err != nil { return false, fmt.Errorf("could not create symlink mount %s: %w", path, err) } - m.Log.Info("Mounted mock file system", "filesystem", m.Path, "mount", path) + m.Log.Info("Mounted mock file system in kind", "filesystem", m.Path, "mount", path) return true, nil } @@ -90,22 +96,38 @@ func (m *KindFileSystem) Unmount(ctx context.Context, path string) (bool, error) // Remove the directory. If it fails don't worry about it. _ = os.Remove(path) - m.Log.Info("Unmounted mock file system") + m.Log.Info("Unmounted mock file system in kind") return true, nil } func (m *KindFileSystem) PostActivate(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } - m.Log.Info("Ran PostActivate") + m.Log.Info("Ran PostActivate in kind") return true, nil } func (m *KindFileSystem) PreDeactivate(ctx context.Context) (bool, error) { - m.Log.Info("Ran PreDeactivate") + m.Log.Info("Ran PreDeactivate in kind") + + return true, nil +} + +func (m *KindFileSystem) PostMount(ctx context.Context, complete bool) (bool, error) { + if complete { + return false, nil + } + + m.Log.Info("Ran PostMount") + + return true, nil +} + +func (m *KindFileSystem) PreUnmount(ctx context.Context) (bool, error) { + m.Log.Info("Ran PreUnmount") return true, nil } diff --git a/pkg/filesystem/lustre.go b/pkg/filesystem/lustre.go index 6e5459892..d705c351c 100644 --- a/pkg/filesystem/lustre.go +++ b/pkg/filesystem/lustre.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -40,6 +40,8 @@ type LustreFileSystemCommandArgs struct { Mount string PostActivate []string PreDeactivate []string + PostMount []string + PreUnmount []string Vars map[string]string } @@ -54,6 +56,7 @@ type LustreFileSystem struct { MgsAddress string Index int BackFs string + TempDir string BlockDevice blockdevice.BlockDevice } @@ -82,7 +85,7 @@ func (l *LustreFileSystem) parseArgs(args string) string { } func (l *LustreFileSystem) Create(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -212,8 +215,9 @@ func (l *LustreFileSystem) Mount(ctx context.Context, path string, complete bool } // Found an existing mount at this path. Check if it's the mount we expect - if m.Type != "lustre" { - return false, fmt.Errorf("unexpected mount at path %s. Device %s type %s", path, m.Device, m.Type) + devStr := fmt.Sprintf("%s:/%s", l.MgsAddress, l.Name) + if m.Device != devStr || m.Type != "lustre" { + return false, fmt.Errorf("unexpected mount at path %s. Expected device %s of type lustre, found device %s type %s", path, devStr, m.Device, m.Type) } // The file system is already mounted. Nothing left to do @@ -254,8 +258,9 @@ func (l *LustreFileSystem) Unmount(ctx context.Context, path string) (bool, erro } // Found an existing mount at this path. Check if it's the mount we expect - if m.Device != fmt.Sprintf("%s:/%s", l.MgsAddress, l.Name) || m.Type != "lustre" { - return false, fmt.Errorf("unexpected mount at path %s. Device %s type %s", path, m.Device, m.Type) + devStr := fmt.Sprintf("%s:/%s", l.MgsAddress, l.Name) + if m.Device != devStr || m.Type != "lustre" { + return false, fmt.Errorf("unexpected mount at path %s. Expected device %s of type lustre, found device %s type %s", path, devStr, m.Device, m.Type) } if _, err := command.Run(fmt.Sprintf("umount %s", path), l.Log); err != nil { @@ -311,5 +316,84 @@ func (l *LustreFileSystem) PreDeactivate(ctx context.Context) (bool, error) { } } - return false, nil + return true, nil +} + +func (l *LustreFileSystem) PostMount(ctx context.Context, complete bool) (bool, error) { + if len(l.CommandArgs.PostMount) == 0 { + return false, nil + } + + if complete { + return false, nil + } + + if l.TargetType == "none" { + return false, nil + } + + if _, err := l.Mount(ctx, l.TempDir, false); err != nil { + return false, fmt.Errorf("could not mount temp dir '%s' for post mount: %w", l.TempDir, err) + } + + // Build the commands from the args provided + if l.CommandArgs.Vars == nil { + l.CommandArgs.Vars = make(map[string]string) + } + l.CommandArgs.Vars["$MOUNT_PATH"] = filepath.Clean(l.TempDir) + + for _, rawCommand := range l.CommandArgs.PostMount { + formattedCommand := l.parseArgs(rawCommand) + l.Log.Info("PostMount", "command", formattedCommand) + + if _, err := command.Run(formattedCommand, l.Log); err != nil { + if _, unmountErr := l.Unmount(ctx, l.TempDir); unmountErr != nil { + return false, fmt.Errorf("could not unmount after post mount command failed: %s: %w", formattedCommand, unmountErr) + } + return false, fmt.Errorf("could not run post mount command: %s: %w", formattedCommand, err) + } + } + + if _, err := l.Unmount(ctx, l.TempDir); err != nil { + return false, fmt.Errorf("could not unmount after post mount '%s': %w", l.TempDir, err) + } + + return true, nil +} + +func (l *LustreFileSystem) PreUnmount(ctx context.Context) (bool, error) { + if len(l.CommandArgs.PreUnmount) == 0 { + return false, nil + } + + if l.TargetType == "none" { + return false, nil + } + + if _, err := l.Mount(ctx, l.TempDir, false); err != nil { + return false, fmt.Errorf("could not mount temp dir '%s' for pre unmount: %w", l.TempDir, err) + } + // Build the commands from the args provided + if l.CommandArgs.Vars == nil { + l.CommandArgs.Vars = make(map[string]string) + } + l.CommandArgs.Vars["$MOUNT_PATH"] = filepath.Clean(l.TempDir) + + for _, rawCommand := range l.CommandArgs.PreUnmount { + formattedCommand := l.parseArgs(rawCommand) + l.Log.Info("PreUnmount", "command", formattedCommand) + + if _, err := command.Run(formattedCommand, l.Log); err != nil { + if _, unmountErr := l.Unmount(ctx, l.TempDir); unmountErr != nil { + return false, fmt.Errorf("could not unmount after pre unmount command failed: %s: %w", formattedCommand, unmountErr) + } + return false, fmt.Errorf("could not run pre unmount command: %s: %w", formattedCommand, err) + } + } + + if _, err := l.Unmount(ctx, l.TempDir); err != nil { + return false, fmt.Errorf("could not unmount after pre unmount '%s': %w", l.TempDir, err) + } + + return true, nil } diff --git a/pkg/filesystem/mock.go b/pkg/filesystem/mock.go index ed10a88f7..6ec1df71e 100644 --- a/pkg/filesystem/mock.go +++ b/pkg/filesystem/mock.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -37,7 +37,7 @@ type MockFileSystem struct { var _ FileSystem = &MockFileSystem{} func (m *MockFileSystem) Create(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -52,7 +52,7 @@ func (m *MockFileSystem) Destroy(ctx context.Context) (bool, error) { } func (m *MockFileSystem) Activate(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -67,7 +67,7 @@ func (m *MockFileSystem) Deactivate(ctx context.Context) (bool, error) { } func (m *MockFileSystem) Mount(ctx context.Context, path string, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -82,7 +82,7 @@ func (m *MockFileSystem) Unmount(ctx context.Context, path string) (bool, error) } func (m *MockFileSystem) PostActivate(ctx context.Context, complete bool) (bool, error) { - if complete == true { + if complete { return false, nil } @@ -96,3 +96,19 @@ func (m *MockFileSystem) PreDeactivate(ctx context.Context) (bool, error) { return true, nil } + +func (m *MockFileSystem) PostMount(ctx context.Context, complete bool) (bool, error) { + if complete { + return false, nil + } + + m.Log.Info("Ran PostMount") + + return true, nil +} + +func (m *MockFileSystem) PreUnmount(ctx context.Context) (bool, error) { + m.Log.Info("Ran PreUnmount") + + return true, nil +} diff --git a/pkg/filesystem/simple.go b/pkg/filesystem/simple.go index 1133daa48..2e98de285 100644 --- a/pkg/filesystem/simple.go +++ b/pkg/filesystem/simple.go @@ -1,5 +1,5 @@ /* - * Copyright 2023 Hewlett Packard Enterprise Development LP + * Copyright 2023-2024 Hewlett Packard Enterprise Development LP * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, @@ -34,10 +34,10 @@ import ( ) type SimpleFileSystemCommandArgs struct { - Mkfs string - Mount string - PostActivate []string - PreDeactivate []string + Mkfs string + Mount string + PostMount []string + PreUnmount []string Vars map[string]string } @@ -198,8 +198,8 @@ func (f *SimpleFileSystem) Unmount(ctx context.Context, path string) (bool, erro return false, nil } -func (f *SimpleFileSystem) PostActivate(ctx context.Context, complete bool) (bool, error) { - if len(f.CommandArgs.PostActivate) == 0 { +func (f *SimpleFileSystem) PostMount(ctx context.Context, complete bool) (bool, error) { + if len(f.CommandArgs.PostMount) == 0 { return false, nil } @@ -212,7 +212,7 @@ func (f *SimpleFileSystem) PostActivate(ctx context.Context, complete bool) (boo } if _, err := f.Mount(ctx, f.TempDir, false); err != nil { - return false, fmt.Errorf("could not mount temp dir '%s': %w", f.TempDir, err) + return false, fmt.Errorf("could not mount temp dir '%s' for post mount: %w", f.TempDir, err) } // Build the commands from the args provided @@ -221,9 +221,9 @@ func (f *SimpleFileSystem) PostActivate(ctx context.Context, complete bool) (boo } f.CommandArgs.Vars["$MOUNT_PATH"] = f.TempDir - for _, rawCommand := range f.CommandArgs.PostActivate { + for _, rawCommand := range f.CommandArgs.PostMount { formattedCommand := f.parseArgs(rawCommand) - f.Log.Info("PostActivate", "command", formattedCommand) + f.Log.Info("PostMount", "command", formattedCommand) if _, err := command.Run(formattedCommand, f.Log); err != nil { if _, unmountErr := f.Unmount(ctx, f.TempDir); unmountErr != nil { @@ -237,11 +237,11 @@ func (f *SimpleFileSystem) PostActivate(ctx context.Context, complete bool) (boo return false, fmt.Errorf("could not unmount after post activate '%s': %w", f.TempDir, err) } - return false, nil + return true, nil } -func (f *SimpleFileSystem) PreDeactivate(ctx context.Context) (bool, error) { - if len(f.CommandArgs.PreDeactivate) == 0 { +func (f *SimpleFileSystem) PreUnmount(ctx context.Context) (bool, error) { + if len(f.CommandArgs.PreUnmount) == 0 { return false, nil } @@ -250,7 +250,7 @@ func (f *SimpleFileSystem) PreDeactivate(ctx context.Context) (bool, error) { } if _, err := f.Mount(ctx, f.TempDir, false); err != nil { - return false, fmt.Errorf("could not mount temp dir '%s': %w", f.TempDir, err) + return false, fmt.Errorf("could not mount temp dir '%s' for pre unmount: %w", f.TempDir, err) } // Build the commands from the args provided @@ -259,21 +259,31 @@ func (f *SimpleFileSystem) PreDeactivate(ctx context.Context) (bool, error) { } f.CommandArgs.Vars["$MOUNT_PATH"] = f.TempDir - for _, rawCommand := range f.CommandArgs.PreDeactivate { + for _, rawCommand := range f.CommandArgs.PreUnmount { formattedCommand := f.parseArgs(rawCommand) - f.Log.Info("PreDeactivate", "command", formattedCommand) + f.Log.Info("PreUnmount", "command", formattedCommand) if _, err := command.Run(formattedCommand, f.Log); err != nil { if _, unmountErr := f.Unmount(ctx, f.TempDir); unmountErr != nil { - return false, fmt.Errorf("could not unmount after pre-deactivate command failed: %s: %w", formattedCommand, unmountErr) + return false, fmt.Errorf("could not unmount after pre-unmount command failed: %s: %w", formattedCommand, unmountErr) } - return false, fmt.Errorf("could not run pre-deactivate command: %s: %w", formattedCommand, err) + return false, fmt.Errorf("could not run pre-unmount command: %s: %w", formattedCommand, err) } } if _, err := f.Unmount(ctx, f.TempDir); err != nil { - return false, fmt.Errorf("could not unmount after pre-deactivate '%s': %w", f.TempDir, err) + return false, fmt.Errorf("could not unmount after pre-unmount'%s': %w", f.TempDir, err) } + return true, nil +} + +// PostActivate is not supported for simple filesystems +func (f *SimpleFileSystem) PostActivate(ctx context.Context, complete bool) (bool, error) { + return false, nil +} + +// PreDeactivate is not supported for simple filesystems +func (f *SimpleFileSystem) PreDeactivate(ctx context.Context) (bool, error) { return false, nil } diff --git a/vendor/modules.txt b/vendor/modules.txt index d14d11a7a..e514b18bd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,12 +11,12 @@ github.com/DataWorkflowServices/dws/utils/updater # github.com/HewlettPackard/structex v1.0.4 ## explicit; go 1.14 github.com/HewlettPackard/structex -# github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240925185149-26d9d6071a1c +# github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20241209183639-2d8fdbd63dec ## explicit; go 1.21 github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1 github.com/NearNodeFlash/lustre-fs-operator/config/crd/bases github.com/NearNodeFlash/lustre-fs-operator/config/webhook -# github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241017152925-afc4d0cf1a4b +# github.com/NearNodeFlash/nnf-ec v0.0.1-0.20241205165035-51a536434b0d ## explicit; go 1.19 github.com/NearNodeFlash/nnf-ec/internal/switchtec/pkg/nvme github.com/NearNodeFlash/nnf-ec/internal/switchtec/pkg/switchtec