diff --git a/config/crd/bases/topology.nephio.org_nfclasses.yaml b/config/crd/bases/topology.nephio.org_nfclasses.yaml deleted file mode 100644 index ce5788668..000000000 --- a/config/crd/bases/topology.nephio.org_nfclasses.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: nfclasses.topology.nephio.org -spec: - group: topology.nephio.org - names: - kind: NFClass - listKind: NFClassList - plural: nfclasses - singular: nfclass - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: NFClass is the Schema for the nfclasses API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NFClassSpec defines the reusable class struct for NF in general - properties: - packageRef: - description: PackageRef is a reference to the upstream package used - for this NF deployment - properties: - namespace: - description: Namespace is the namespace for both the repository - and package revision - type: string - packageName: - description: PackageName is the name of the package for the revision - type: string - repository: - description: Repository is the name of the repository containing - the package - type: string - revision: - description: Revision is the specific version number of the revision - of the package - type: string - required: - - packageName - - repository - - revision - type: object - vendor: - description: Vendor is the name of the NF vendor - type: string - version: - description: Version of the software version for this NF vendor's - NFType - type: string - required: - - packageRef - type: object - status: - description: NFClassStatus defines the observed state of NFClass - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/topology.nephio.org_nftopologies.yaml b/config/crd/bases/topology.nephio.org_nftopologies.yaml index 3fe4073cb..b7a7ace0e 100644 --- a/config/crd/bases/topology.nephio.org_nftopologies.yaml +++ b/config/crd/bases/topology.nephio.org_nftopologies.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: nftopologies.topology.nephio.org spec: group: topology.nephio.org @@ -33,6 +32,7 @@ spec: metadata: type: object spec: + description: NFTopologySpec defines the specification of NFTopology properties: nfInstances: items: @@ -123,10 +123,6 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object - className: - description: ClassName --- for now, the NFClass this NF - template will derive from - type: string nfInterfaces: description: NFInterfaces items: @@ -146,12 +142,36 @@ spec: - networkInstanceName type: object type: array + nfPackageRef: + description: NFPackageRef specifies the upstream package + reference for this NFTemplate + properties: + namespace: + description: Namespace is the namespace for both the + repository and package revision + type: string + packageName: + description: PackageName is the name of the package + for the revision + type: string + repository: + description: Repository is the name of the repository + containing the package + type: string + revision: + description: Revision is the specific version number + of the revision of the package + type: string + required: + - packageName + - repository + type: object nfType: description: NFType specifies the type of NF this template is specifying type: string required: - - className + - nfPackageRef - nfType type: object required: @@ -165,6 +185,105 @@ spec: type: object status: description: NFTopologyStatus defines the observed state of NFTopology + properties: + conditions: + description: Current service state of the NFTopology. + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + nfInstances: + description: Detail on the deployed instances. + items: + description: NFDeployedInstance defines an NF instance that is deployed + properties: + connectivities: + description: list of connected NF instances to this NF instance + items: + properties: + neighborName: + description: peer NF's Id (see NFInstance struct below) + type: string + type: object + type: array + id: + description: unique ID for this NF instance + type: string + nfInstanceName: + description: corresponding NFInstance name + type: string + nfType: + description: 'type of NF, example: amf, smf, upf' + type: string + type: object + type: array + numNFDeployed: + description: Number of NFs deployed for this topology + format: int32 + type: integer type: object type: object served: true diff --git a/config/crd/bases/topology.nephio.org_nftopomonitors.yaml b/config/crd/bases/topology.nephio.org_nftopomonitors.yaml deleted file mode 100644 index 9250ed736..000000000 --- a/config/crd/bases/topology.nephio.org_nftopomonitors.yaml +++ /dev/null @@ -1,107 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: nftopomonitors.topology.nephio.org -spec: - group: topology.nephio.org - names: - kind: NFTopoMonitor - listKind: NFTopoMonitorList - plural: nftopomonitors - singular: nftopomonitor - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: NfTopoMonitor is the Schema for the tracking of the list of deployed - NFs - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NFTopoMonitorSpec defines list of deployed NF for Edge Status - Aggregator to monitor - properties: - nfInstances: - items: - description: NFTopoMonitorInstance defines an NF instance that is - deployed - properties: - clusterName: - description: name of workload cluster where the NF instance - is to be deployed - type: string - connectivities: - description: list of connected NF instances to this NF instance - items: {} - type: array - id: - description: unique ID for this NF instance - type: string - nfFlavor: - description: 'flavor of NF, example: small, medium, large' - type: string - nfType: - description: 'type of NF, example: amf, smf, upf' - type: string - nfVendor: - description: NF vendor name - type: string - nfVersion: - description: the software version of this NF vendor's NFType - type: string - type: object - type: array - type: object - status: - description: NFTopoMonitorStatus tracks the aggregated status of all the - deployed NFs for this one deployment - properties: - availableNFs: - description: Total number of NFs targeted by this deployment with - an Available Condition set. - format: int32 - type: integer - conditions: - description: Current service state of the UPF. - items: {} - type: array - observedGeneration: - description: The generation observed by the deployment controller. - format: int32 - type: integer - readyNFs: - description: Total number of NFs targeted by this deployment with - a Ready Condition set. - format: int32 - type: integer - stalledNFs: - description: Total number of NFs targeted by this deployment with - a Stalled Condition set. - format: int32 - type: integer - targetedNFs: - description: Total number of NFs targeted by this deployment - format: int32 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/topology.nephio.org_nftopotrackers.yaml b/config/crd/bases/topology.nephio.org_nftopotrackers.yaml deleted file mode 100644 index ed56c0dce..000000000 --- a/config/crd/bases/topology.nephio.org_nftopotrackers.yaml +++ /dev/null @@ -1,113 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: nftopotrackers.topology.nephio.org -spec: - group: topology.nephio.org - names: - kind: NFTopoTracker - listKind: NFTopoTrackerList - plural: nftopotrackers - singular: nftopotracker - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: NfTopoTracker is the Schema for the tracking of the list of deployed - NFs - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NFTopoTrackerSpec defines list of deployed NF for Edge Status - Aggregator to monitor - properties: - nfInstances: - items: - description: NFTopoTrackerInstance defines an NF instance that is - deployed - properties: - clusterName: - description: name of workload cluster where the NF instance - is to be deployed - type: string - connectivities: - description: list of connected NF instances to this NF instance - items: - properties: - neighborName: - description: peer NF's Id (see NFInstance struct below) - type: string - type: object - type: array - id: - description: unique ID for this NF instance - type: string - nfFlavor: - description: 'flavor of NF, example: small, medium, large' - type: string - nfType: - description: 'type of NF, example: amf, smf, upf' - type: string - nfVendor: - description: NF vendor name - type: string - nfVersion: - description: the software version of this NF vendor's NFType - type: string - type: object - type: array - type: object - status: - description: NFTopoTrackerStatus tracks the aggregated status of all the - deployed NFs for this one deployment - properties: - availableNFs: - description: Total number of NFs targeted by this deployment with - an Available Condition set. - format: int32 - type: integer - conditions: - description: Current service state of the UPF. - items: - type: string - type: array - observedGeneration: - description: The generation observed by the deployment controller. - format: int32 - type: integer - readyNFs: - description: Total number of NFs targeted by this deployment with - a Ready Condition set. - format: int32 - type: integer - stalledNFs: - description: Total number of NFs targeted by this deployment with - a Stalled Condition set. - format: int32 - type: integer - targetedNFs: - description: Total number of NFs targeted by this deployment - format: int32 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/nf_topology/v1alpha1/nf_class_types.go b/nf_topology/v1alpha1/nf_class_types.go deleted file mode 100644 index 27d63b1eb..000000000 --- a/nf_topology/v1alpha1/nf_class_types.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2023 The Nephio Authors. - -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 ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// PackageRevisionReference is a temporary replica of PackageRevisionReference used for the -// ONE Summit -type PackageRevisionReference struct { - // Namespace is the namespace for both the repository and package revision - // +optional - Namespace string `json:"namespace,omitempty"` - - // Repository is the name of the repository containing the package - RepositoryName string `json:"repository"` - - // PackageName is the name of the package for the revision - PackageName string `json:"packageName"` - - // Revision is the specific version number of the revision of the package - Revision string `json:"revision"` -} - -// NFClassSpec defines the reusable class struct for NF in general -type NFClassSpec struct { - // Vendor is the name of the NF vendor - Vendor string `json:"vendor,omitempty" yaml:"vendor,omitempty"` - - // Version of the software version for this NF vendor's NFType - Version string `json:"version,omitempty" yaml:"version,omitempty"` - - // PackageRef is a reference to the upstream package used for this NF deployment - PackageRef PackageRevisionReference `json:"packageRef" yaml:"packageRef"` -} - -// NFClassStatus defines the observed state of NFClass -type NFClassStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:path=nfclasses,scope=Cluster - -// NFClass is the Schema for the nfclasses API -type NFClass struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec NFClassSpec `json:"spec,omitempty"` - Status NFClassStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// NFClassList contains a list of NFClass -type NFClassList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []NFClass `json:"items"` -} diff --git a/nf_topology/v1alpha1/nf_deployed.go b/nf_topology/v1alpha1/nf_deployed.go new file mode 100644 index 000000000..6b84ed836 --- /dev/null +++ b/nf_topology/v1alpha1/nf_deployed.go @@ -0,0 +1,33 @@ +/* +Copyright 2023 The Nephio Authors. + +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 + +type NFConnectivity struct { + // peer NF's Id (see NFInstance struct below) + NeighborName string `json:"neighborName,omitempty" yaml:"neighborName,omitempty"` +} + +// NFDeployedInstance defines an NF instance that is deployed +type NFDeployedInstance struct { + // unique ID for this NF instance + ID string `json:"id,omitempty" yaml:"id,omitempty"` + // type of NF, example: amf, smf, upf + NFType string `json:"nfType,omitempty" yaml:"nfType,omitempty"` + // corresponding NFInstance name + NFInstaceName string `json:"nfInstanceName,omitempty" yaml:"nfInstanceName,omitempty"` + // list of connected NF instances to this NF instance + Connectivities []NFConnectivity `json:"connectivities,omitempty" yaml:"connectivities,omitempty"` +} diff --git a/nf_topology/v1alpha1/nf_topo_tracker.go b/nf_topology/v1alpha1/nf_topo_tracker.go deleted file mode 100644 index c49535996..000000000 --- a/nf_topology/v1alpha1/nf_topo_tracker.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2023 The Nephio Authors. - -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 ( - nephiodeployv1alpha1 "github.com/nephio-project/api/workload/v1alpha1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -type NFConnectivity struct { - // peer NF's Id (see NFInstance struct below) - NeighborName string `json:"neighborName,omitempty" yaml:"neighborName,omitempty"` -} - -// NFTopoTrackerInstance defines an NF instance that is deployed -type NFTopoTrackerInstance struct { - // unique ID for this NF instance - ID string `json:"id,omitempty" yaml:"id,omitempty"` - // name of workload cluster where the NF instance is to be deployed - ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` - // type of NF, example: amf, smf, upf - NFType string `json:"nfType,omitempty" yaml:"nfType,omitempty"` - // flavor of NF, example: small, medium, large - NFFlavor string `json:"nfFlavor,omitempty" yaml:"nfFlavor,omitempty"` - // NF vendor name - NFVendor string `json:"nfVendor,omitempty" yaml:"nfVendor,omitempty"` - // the software version of this NF vendor's NFType - NFVersion string `json:"nfVersion,omitempty" yaml:"nfVersion,omitempty"` - // list of connected NF instances to this NF instance - Connectivities []NFConnectivity `json:"connectivities,omitempty" yaml:"connectivities,omitempty"` -} - -// NFTopoTrackerSpec defines list of deployed NF for Edge Status Aggregator to monitor -type NFTopoTrackerSpec struct { - NFInstances []NFTopoTrackerInstance `json:"nfInstances,omitempty" yaml:"nfInstances,omitempty"` -} - -// NFTopoTrackerStatus tracks the aggregated status of all the deployed NFs for this one deployment -type NFTopoTrackerStatus struct { - // The generation observed by the deployment controller. - ObservedGeneration int32 `json:"observedGeneration,omitempty"` - - // Total number of NFs targeted by this deployment - TargetedNFs int32 `json:"targetedNFs,omitempty"` - - // Total number of NFs targeted by this deployment with a Ready Condition set. - ReadyNFs int32 `json:"readyNFs,omitempty"` - - // Total number of NFs targeted by this deployment with an Available Condition set. - AvailableNFs int32 `json:"availableNFs,omitempty"` - - // Total number of NFs targeted by this deployment with a Stalled Condition set. - StalledNFs int32 `json:"stalledNFs,omitempty"` - - // Current service state of the UPF. - Conditions []nephiodeployv1alpha1.NFDeploymentConditionType `json:"conditions,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// NfTopoTracker is the Schema for the tracking of the list of deployed NFs -type NFTopoTracker struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata"` - - Spec NFTopoTrackerSpec `json:"spec,omitempty"` - Status NFTopoTrackerStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// NFTopoTrackerList contains a list of NfTopoTracker -type NFTopoTrackerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []NFTopoTracker `json:"items"` -} diff --git a/nf_topology/v1alpha1/nf_topology_types.go b/nf_topology/v1alpha1/nf_topology_types.go index f3c5b0cff..f192d7ec6 100644 --- a/nf_topology/v1alpha1/nf_topology_types.go +++ b/nf_topology/v1alpha1/nf_topology_types.go @@ -21,16 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +kubebuilder:object:root=true -// NFType defines the type of network functions -type NFType string - -const ( - NFTypeUPF NFType = "upf" - NFTypeSMF NFType = "smf" - NFTypeAMF NFType = "amf" -) - // NFInterface defines the specification of network attachment points of a NF type NFInterface struct { // Name of the network attachment point @@ -41,13 +31,30 @@ type NFInterface struct { NetworkInstanceName string `json:"networkInstanceName" yaml:"networkInstanceName"` } +// PackageRevisionReference is a temporary replica of PackageRevisionReference used for the +// ONE Summit +type PackageRevisionReference struct { + // Namespace is the namespace for both the repository and package revision + // +optional + Namespace string `json:"namespace,omitempty"` + + // Repository is the name of the repository containing the package + RepositoryName string `json:"repository"` + + // PackageName is the name of the package for the revision + PackageName string `json:"packageName"` + + // Revision is the specific version number of the revision of the package + Revision string `json:"revision,omitempty"` +} + // NFTemplate defines the template for deployment of an instance of a NF type NFTemplate struct { // NFType specifies the type of NF this template is specifying - NFType NFType `json:"nfType" yaml:"nfType"` + NFType string `json:"nfType" yaml:"nfType"` - // ClassName --- for now, the NFClass this NF template will derive from - ClassName string `json:"className" yaml:"className"` + // NFPackageRef specifies the upstream package reference for this NFTemplate + NFPackageRef PackageRevisionReference `json:"nfPackageRef" yaml:"nfPackageRef"` // Capacity specifies the NF capacity profile for this NF instance Capacity nephioreqv1alpha1.CapacitySpec `json:"capacity,omitempty" yaml:"capacity,omitempty"` @@ -68,14 +75,21 @@ type NFInstance struct { NFTemplate NFTemplate `json:"nfTemplate" yaml:"nfTemplate"` } +// NFTopologySpec defines the specification of NFTopology type NFTopologySpec struct { NFInstances []NFInstance `json:"nfInstances" yaml:"nfInstances"` } // NFTopologyStatus defines the observed state of NFTopology type NFTopologyStatus struct { - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file + // Number of NFs deployed for this topology + NumNFDeployed int32 `json:"numNFDeployed,omitempty"` + + // Current service state of the NFTopology. + Conditions []metav1.Condition `json:"conditions,omitempty"` + + // Detail on the deployed instances. + NFInstances []NFDeployedInstance `json:"nfInstances,omitempty" yaml:"nfInstances,omitempty"` } //+kubebuilder:object:root=true diff --git a/nf_topology/v1alpha1/zz_generated.deepcopy.go b/nf_topology/v1alpha1/zz_generated.deepcopy.go index f83d41f37..13ed041d8 100644 --- a/nf_topology/v1alpha1/zz_generated.deepcopy.go +++ b/nf_topology/v1alpha1/zz_generated.deepcopy.go @@ -21,111 +21,41 @@ limitations under the License. package v1alpha1 import ( - workloadv1alpha1 "github.com/nephio-project/api/workload/v1alpha1" + "k8s.io/apimachinery/pkg/apis/meta/v1" 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 *NFClass) DeepCopyInto(out *NFClass) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFClass. -func (in *NFClass) DeepCopy() *NFClass { - if in == nil { - return nil - } - out := new(NFClass) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NFClass) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFClassList) DeepCopyInto(out *NFClassList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NFClass, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFClassList. -func (in *NFClassList) DeepCopy() *NFClassList { - if in == nil { - return nil - } - out := new(NFClassList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NFClassList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFClassSpec) DeepCopyInto(out *NFClassSpec) { +func (in *NFConnectivity) DeepCopyInto(out *NFConnectivity) { *out = *in - out.PackageRef = in.PackageRef } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFClassSpec. -func (in *NFClassSpec) DeepCopy() *NFClassSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFConnectivity. +func (in *NFConnectivity) DeepCopy() *NFConnectivity { if in == nil { return nil } - out := new(NFClassSpec) + out := new(NFConnectivity) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFClassStatus) DeepCopyInto(out *NFClassStatus) { +func (in *NFDeployedInstance) DeepCopyInto(out *NFDeployedInstance) { *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFClassStatus. -func (in *NFClassStatus) DeepCopy() *NFClassStatus { - if in == nil { - return nil + if in.Connectivities != nil { + in, out := &in.Connectivities, &out.Connectivities + *out = make([]NFConnectivity, len(*in)) + copy(*out, *in) } - out := new(NFClassStatus) - in.DeepCopyInto(out) - return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFConnectivity) DeepCopyInto(out *NFConnectivity) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFConnectivity. -func (in *NFConnectivity) DeepCopy() *NFConnectivity { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFDeployedInstance. +func (in *NFDeployedInstance) DeepCopy() *NFDeployedInstance { if in == nil { return nil } - out := new(NFConnectivity) + out := new(NFDeployedInstance) in.DeepCopyInto(out) return out } @@ -165,6 +95,7 @@ func (in *NFInterface) DeepCopy() *NFInterface { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NFTemplate) DeepCopyInto(out *NFTemplate) { *out = *in + out.NFPackageRef = in.NFPackageRef in.Capacity.DeepCopyInto(&out.Capacity) if in.NFInterfaces != nil { in, out := &in.NFInterfaces, &out.NFInterfaces @@ -183,134 +114,13 @@ func (in *NFTemplate) DeepCopy() *NFTemplate { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFTopoTracker) DeepCopyInto(out *NFTopoTracker) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopoTracker. -func (in *NFTopoTracker) DeepCopy() *NFTopoTracker { - if in == nil { - return nil - } - out := new(NFTopoTracker) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NFTopoTracker) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFTopoTrackerInstance) DeepCopyInto(out *NFTopoTrackerInstance) { - *out = *in - if in.Connectivities != nil { - in, out := &in.Connectivities, &out.Connectivities - *out = make([]NFConnectivity, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopoTrackerInstance. -func (in *NFTopoTrackerInstance) DeepCopy() *NFTopoTrackerInstance { - if in == nil { - return nil - } - out := new(NFTopoTrackerInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFTopoTrackerList) DeepCopyInto(out *NFTopoTrackerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NFTopoTracker, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopoTrackerList. -func (in *NFTopoTrackerList) DeepCopy() *NFTopoTrackerList { - if in == nil { - return nil - } - out := new(NFTopoTrackerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NFTopoTrackerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFTopoTrackerSpec) DeepCopyInto(out *NFTopoTrackerSpec) { - *out = *in - if in.NFInstances != nil { - in, out := &in.NFInstances, &out.NFInstances - *out = make([]NFTopoTrackerInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopoTrackerSpec. -func (in *NFTopoTrackerSpec) DeepCopy() *NFTopoTrackerSpec { - if in == nil { - return nil - } - out := new(NFTopoTrackerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NFTopoTrackerStatus) DeepCopyInto(out *NFTopoTrackerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]workloadv1alpha1.NFDeploymentConditionType, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopoTrackerStatus. -func (in *NFTopoTrackerStatus) DeepCopy() *NFTopoTrackerStatus { - if in == nil { - return nil - } - out := new(NFTopoTrackerStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NFTopology) DeepCopyInto(out *NFTopology) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopology. @@ -388,6 +198,20 @@ func (in *NFTopologySpec) DeepCopy() *NFTopologySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NFTopologyStatus) DeepCopyInto(out *NFTopologyStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.NFInstances != nil { + in, out := &in.NFInstances, &out.NFInstances + *out = make([]NFDeployedInstance, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NFTopologyStatus.