v1alpha1

package
v0.0.4-0...-de66a47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ipam v1alpha1 API group +kubebuilder:object:generate=true +groupName=vlan.resource.nephio.org

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "vlan.resource.nephio.org", Version: "v1alpha1"}

	// 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
)
View Source
var (
	VLANKind             = reflect.TypeOf(VLAN{}).Name()
	VLANGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: VLANKind}.String()
	VLANKindAPIVersion   = VLANKind + "." + GroupVersion.String()
	VLANGroupVersionKind = GroupVersion.WithKind(VLANKind)
	VLANKindGVKString    = meta.GVKToString(schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: GroupVersion.Version,
		Kind:    VLANKind,
	})
)
View Source
var (
	VLANClaimKind             = reflect.TypeOf(VLANClaim{}).Name()
	VLANClaimGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: VLANClaimKind}.String()
	VLANClaimKindAPIVersion   = VLANClaimKind + "." + GroupVersion.String()
	VLANClaimGroupVersionKind = GroupVersion.WithKind(VLANClaimKind)
	VLANClaimKindGVKString    = meta.GVKToString(schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: GroupVersion.Version,
		Kind:    VLANClaimKind,
	})
)
View Source
var (
	VLANIndexKind             = reflect.TypeOf(VLANIndex{}).Name()
	VLANIndexGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: VLANIndexKind}.String()
	VLANIndexKindAPIVersion   = VLANIndexKind + "." + GroupVersion.String()
	VLANIndexGroupVersionKind = GroupVersion.WithKind(VLANIndexKind)
	VLANIndexKindGVKString    = meta.GVKToString(schema.GroupVersionKind{
		Group:   GroupVersion.Group,
		Version: GroupVersion.Version,
		Kind:    VLANIndexKind,
	})
)

Functions

This section is empty.

Types

type VLAN

type VLAN struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   VLANSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status VLANStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNC",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="VLAN-REQ",type="string",JSONPath=".spec.vlanID" +kubebuilder:printcolumn:name="VLAN-ALLOC",type="string",JSONPath=".status.vlanID" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:categories={nephio,resource} VLAN is the Schema for the vlan API

func (*VLAN) DeepCopy

func (in *VLAN) DeepCopy() *VLAN

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLAN.

func (*VLAN) DeepCopyInto

func (in *VLAN) DeepCopyInto(out *VLAN)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLAN) DeepCopyObject

func (in *VLAN) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VLAN) GetCacheID

func (r *VLAN) GetCacheID() corev1.ObjectReference

GetCacheID return the cache id validating the namespace

func (*VLAN) GetCondition

GetCondition returns the condition based on the condition kind

func (*VLAN) GetGenericNamespacedName

func (r *VLAN) GetGenericNamespacedName() string

GetGenericNamespacedName return a namespace and name as string, compliant to the k8s api naming convention

func (*VLAN) GetUserDefinedLabels

func (r *VLAN) GetUserDefinedLabels() map[string]string

GetUserDefinedLabels returns the user defined labels in the spec

func (*VLAN) SetConditions

func (r *VLAN) SetConditions(c ...resourcev1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

type VLANClaim

type VLANClaim struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   VLANClaimSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status VLANClaimStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNC",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="VLAN-REQ",type="string",JSONPath=".spec.vlanID" +kubebuilder:printcolumn:name="VLAN-ALLOC",type="string",JSONPath=".status.vlanID" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:categories={nephio,resource} VLANClaim is the Schema for the vlan claim API

func BuildVLANClaim

func BuildVLANClaim(meta metav1.ObjectMeta, spec VLANClaimSpec, status VLANClaimStatus) *VLANClaim

BuildVLANClaim returns a VLANClaim from a client Object a crName and an VLANClaim Spec/Status

func (*VLANClaim) AddOwnerLabelsToCR

func (r *VLANClaim) AddOwnerLabelsToCR()

AddOwnerLabelsToCR returns a VLAN Claim by augmenting the owner GVK/NSN in the user defined labels

func (*VLANClaim) DeepCopy

func (in *VLANClaim) DeepCopy() *VLANClaim

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANClaim.

func (*VLANClaim) DeepCopyInto

func (in *VLANClaim) DeepCopyInto(out *VLANClaim)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLANClaim) DeepCopyObject

func (in *VLANClaim) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VLANClaim) GetCacheID

func (r *VLANClaim) GetCacheID() corev1.ObjectReference

GetCacheID return the cache id validating the namespace

func (*VLANClaim) GetCondition

GetCondition returns the condition based on the condition kind

func (*VLANClaim) GetFullLabels

func (r *VLANClaim) GetFullLabels() map[string]string

GetFullLabels returns a map with a copy of the user defined labels and the selector labels

func (*VLANClaim) GetGenericNamespacedName

func (r *VLANClaim) GetGenericNamespacedName() string

GetGenericNamespacedName return a namespace and name as string, compliant to the k8s api naming convention

func (*VLANClaim) GetLabelSelector

func (r *VLANClaim) GetLabelSelector() (labels.Selector, error)

GetLabelSelector returns a labels selector based on the label selector

func (*VLANClaim) GetOwnerSelector

func (r *VLANClaim) GetOwnerSelector() (labels.Selector, error)

GetOwnerSelector returns a label selector to select the owner of the claim in the backend

func (*VLANClaim) GetSelectorLabels

func (r *VLANClaim) GetSelectorLabels() map[string]string

GetSelectorLabels returns a map with a copy of the selector labels

func (*VLANClaim) GetUserDefinedLabels

func (r *VLANClaim) GetUserDefinedLabels() map[string]string

GetUserDefinedLabels returns a map with a copy of the user defined labels

func (*VLANClaim) GetVLANClaimCtx

func (r *VLANClaim) GetVLANClaimCtx() (*VLANClaimCtx, error)

func (*VLANClaim) SetConditions

func (r *VLANClaim) SetConditions(c ...resourcev1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

type VLANClaimCtx

type VLANClaimCtx struct {
	Kind  VLANClaimType
	Start uint16
	Size  uint16
}

func (*VLANClaimCtx) DeepCopy

func (in *VLANClaimCtx) DeepCopy() *VLANClaimCtx

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANClaimCtx.

func (*VLANClaimCtx) DeepCopyInto

func (in *VLANClaimCtx) DeepCopyInto(out *VLANClaimCtx)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANClaimList

type VLANClaimList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []VLANClaim `json:"items" yaml:"items"`
}

VLANClaimList contains a list of VLANClaims

func (*VLANClaimList) DeepCopy

func (in *VLANClaimList) DeepCopy() *VLANClaimList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANClaimList.

func (*VLANClaimList) DeepCopyInto

func (in *VLANClaimList) DeepCopyInto(out *VLANClaimList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLANClaimList) DeepCopyObject

func (in *VLANClaimList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VLANClaimSpec

type VLANClaimSpec struct {
	// VLANIndex defines the vlan index for the VLAN Claim
	VLANIndex corev1.ObjectReference `json:"vlanIndex" yaml:"vlanIndex"`
	// VLANID defines the vlan for the VLAN claim
	VLANID *uint16 `json:"vlanID,omitempty" yaml:"vlanID,omitempty"`
	// VLANRange defines the vlan range for the VLAN claim
	VLANRange *string `json:"range,omitempty" yaml:"range,omitempty"`
	// ClaimLabels define the user defined labels and selector labels used
	// in resource claim
	resourcev1alpha1.ClaimLabels `json:",inline" yaml:",inline"`
}

VLANClaimSpec defines the desired state of VLANClaim

func (*VLANClaimSpec) DeepCopy

func (in *VLANClaimSpec) DeepCopy() *VLANClaimSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANClaimSpec.

func (*VLANClaimSpec) DeepCopyInto

func (in *VLANClaimSpec) DeepCopyInto(out *VLANClaimSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANClaimStatus

type VLANClaimStatus struct {
	// ConditionedStatus provides the status of the VLAN clain using conditions
	// 2 conditions are used:
	// - a condition for the reconcilation status
	// - a condition for the ready status
	// if both are true the other attributes in the status are meaningful
	resourcev1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
	// VLANID defines the vlan ID, claimed through the VLAN backend
	VLANID *uint16 `json:"vlanID,omitempty" yaml:"vlanID,omitempty"`
	// VLANRange defines the vlan range, claimed through the VLAN backend
	VLANRange *string `json:"vlanRange,omitempty" yaml:"vlanRange,omitempty"`
	// ExpiryTime indicated when the claim expires
	// +kubebuilder:validation:Optional
	ExpiryTime string `json:"expiryTime,omitempty" yaml:"expiryTime,omitempty"`
}

VLANClaimStatus defines the observed state of VLANClaim

func (*VLANClaimStatus) DeepCopy

func (in *VLANClaimStatus) DeepCopy() *VLANClaimStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANClaimStatus.

func (*VLANClaimStatus) DeepCopyInto

func (in *VLANClaimStatus) DeepCopyInto(out *VLANClaimStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANClaimType

type VLANClaimType string
const (
	VLANClaimTypeDynamic VLANClaimType = "dynamic"
	VLANClaimTypeStatic  VLANClaimType = "static"
	VLANClaimTypeSize    VLANClaimType = "size"
	VLANClaimTypeRange   VLANClaimType = "range"
)

type VLANIndex

type VLANIndex struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   VLANIndexSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status VLANIndexStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="SYNC",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:categories={nephio,resource} VLANIndex is the Schema for the vlan database API

func BuildVLANIndex

func BuildVLANIndex(meta metav1.ObjectMeta, spec VLANIndexSpec, status VLANIndexStatus) *VLANIndex

BuildVLANIndex returns a VLANIndex from a client Object a crName and an VLANIndex Spec/Status

func (*VLANIndex) DeepCopy

func (in *VLANIndex) DeepCopy() *VLANIndex

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANIndex.

func (*VLANIndex) DeepCopyInto

func (in *VLANIndex) DeepCopyInto(out *VLANIndex)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLANIndex) DeepCopyObject

func (in *VLANIndex) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VLANIndex) GetCacheID

func (r *VLANIndex) GetCacheID() corev1.ObjectReference

GetCacheID returns a CacheID as an objectReference

func (*VLANIndex) GetCondition

GetCondition returns the condition based on the condition type

func (*VLANIndex) GetGenericNamespacedName

func (r *VLANIndex) GetGenericNamespacedName() string

GetGenericNamespacedName return a namespace and name as string, compliant to the k8s api naming convention

func (*VLANIndex) GetNamespacedName

func (r *VLANIndex) GetNamespacedName() types.NamespacedName

GetNamespacedName returns the namespace and name

func (*VLANIndex) GetUserDefinedLabels

func (r *VLANIndex) GetUserDefinedLabels() map[string]string

GetUserDefinedLabels returns the user defined labels in the spec

func (*VLANIndex) SetConditions

func (r *VLANIndex) SetConditions(c ...resourcev1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

type VLANIndexList

type VLANIndexList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []VLANIndex `json:"items" yaml:"items"`
}

VLANIndexList contains a list of VLANIndices

func (*VLANIndexList) DeepCopy

func (in *VLANIndexList) DeepCopy() *VLANIndexList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANIndexList.

func (*VLANIndexList) DeepCopyInto

func (in *VLANIndexList) DeepCopyInto(out *VLANIndexList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLANIndexList) DeepCopyObject

func (in *VLANIndexList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VLANIndexSpec

type VLANIndexSpec struct {
	// UserDefinedLabels define metadata to the resource.
	// defined in the spec to distingiush metadata labels from user defined labels
	resourcev1alpha1.UserDefinedLabels `json:",inline" yaml:",inline"`
}

VLANIndexSpec defines the desired state of VLANIndex

func (*VLANIndexSpec) DeepCopy

func (in *VLANIndexSpec) DeepCopy() *VLANIndexSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANIndexSpec.

func (*VLANIndexSpec) DeepCopyInto

func (in *VLANIndexSpec) DeepCopyInto(out *VLANIndexSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANIndexStatus

type VLANIndexStatus struct {
	// ConditionedStatus provides the status of the VLAN Index using conditions
	// 2 conditions are used:
	// - a condition for the reconcilation status
	// - a condition for the ready status
	// if both are true the other attributes in the status are meaningful
	resourcev1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
}

VLANIndexStatus defines the observed state of VLANIndex

func (*VLANIndexStatus) DeepCopy

func (in *VLANIndexStatus) DeepCopy() *VLANIndexStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANIndexStatus.

func (*VLANIndexStatus) DeepCopyInto

func (in *VLANIndexStatus) DeepCopyInto(out *VLANIndexStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANList

type VLANList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []VLAN `json:"items" yaml:"items"`
}

VLANList contains a list of VLAN

func (*VLANList) DeepCopy

func (in *VLANList) DeepCopy() *VLANList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANList.

func (*VLANList) DeepCopyInto

func (in *VLANList) DeepCopyInto(out *VLANList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*VLANList) DeepCopyObject

func (in *VLANList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VLANSpec

type VLANSpec struct {
	// VLANIndex defines the vlan index for the VLAN claim
	VLANIndex corev1.ObjectReference `json:"vlanIndex" yaml:"vlanIndex"`
	// VLANID defines the VLAN ID
	VLANID *uint16 `json:"vlanID,omitempty" yaml:"vlanID,omitempty"`
	// VLANRange defines a range of vlans
	VLANRange *string `json:"range,omitempty" yaml:"range,omitempty"`
	// UserDefinedLabels define metadata to the resource.
	// defined in the spec to distingiush metadata labels from user defined labels
	resourcev1alpha1.UserDefinedLabels `json:",inline" yaml:",inline"`
}

VLANSpec defines the desired state of VLAN

func (*VLANSpec) DeepCopy

func (in *VLANSpec) DeepCopy() *VLANSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANSpec.

func (*VLANSpec) DeepCopyInto

func (in *VLANSpec) DeepCopyInto(out *VLANSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VLANStatus

type VLANStatus struct {
	// ConditionedStatus provides the status of the VLAN claim using conditions
	// 2 conditions are used:
	// - a condition for the reconcilation status
	// - a condition for the ready status
	// if both are true the other attributes in the status are meaningful
	resourcev1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
	// VLANID defines the vlan ID, claimed through the VLAN backend
	VLANID *uint16 `json:"vlanID,omitempty" yaml:"vlanID,omitempty"`
	// VLANRange defines the vlan range, claimed through the VLAN backend
	VLANRange *string `json:"vlanRange,omitempty" yaml:"vlanRange,omitempty"`
}

VLANStatus defines the observed state of VLAN

func (*VLANStatus) DeepCopy

func (in *VLANStatus) DeepCopy() *VLANStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VLANStatus.

func (*VLANStatus) DeepCopyInto

func (in *VLANStatus) DeepCopyInto(out *VLANStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL