v1alpha1

package
v0.0.0-...-4287dc4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the automation v1alpha1 API group +kubebuilder:object:generate=true +groupName=infra2.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: "infra2.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 (
	NetworkKind             = reflect.TypeOf(Network{}).Name()
	NetworkGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: NetworkKind}.String()
	NetworkKindAPIVersion   = NetworkKind + "." + GroupVersion.String()
	NetworkGroupVersionKind = GroupVersion.WithKind(NetworkKind)
)

Network type metadata.

View Source
var (
	NetworkConfigKind             = reflect.TypeOf(NetworkConfig{}).Name()
	NetworkConfigGroupKind        = schema.GroupKind{Group: GroupVersion.Group, Kind: NetworkConfigKind}.String()
	NetworkConfigKindAPIVersion   = NetworkConfigKind + "." + GroupVersion.String()
	NetworkConfigGroupVersionKind = GroupVersion.WithKind(NetworkConfigKind)
)

NetworkConfig type metadata.

Functions

This section is empty.

Types

type BridgeDomain

type BridgeDomain struct {
	// Name defines the name of the bridge domain
	Name string `json:"name" yaml:"name"`
	// Interfaces defines the interfaces belonging to the bridge domain
	Interfaces []Interface `json:"interfaces,omitempty" yaml:"interfaces,omitempty"`
}

func (*BridgeDomain) DeepCopy

func (in *BridgeDomain) DeepCopy() *BridgeDomain

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

func (*BridgeDomain) DeepCopyInto

func (in *BridgeDomain) DeepCopyInto(out *BridgeDomain)

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

type Condition

type Condition struct {
	metav1.Condition `json:",inline" yaml:",inline"`
}

func Failed

func Failed(msg string) Condition

Failed returns a condition that indicates the resource failed to get reconciled.

func Ready

func Ready() Condition

Ready returns a condition that indicates the resource is ready for use.

func Unknown

func Unknown() Condition

Unknown returns a condition that indicates the resource is in an unknown status.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

func (Condition) WithMessage

func (c Condition) WithMessage(msg string) Condition

WithMessage returns a condition by adding the provided message to existing condition.

type ConditionReason

type ConditionReason string

A ConditionReason represents the reason a resource is in a condition.

const (
	ConditionReasonReady   ConditionReason = "Ready"
	ConditionReasonFailed  ConditionReason = "Failed"
	ConditionReasonUnknown ConditionReason = "Unknown"
)

Reasons a resource is ready or not

type ConditionType

type ConditionType string

A ConditionType represents a condition type for a given KRM resource

const (
	// ConditionTypeReady represents the resource ready condition
	ConditionTypeReady ConditionType = "Ready"
)

Condition Types.

type ConditionedStatus

type ConditionedStatus struct {
	// Conditions of the resource.
	// +optional
	Conditions []Condition `json:"conditions,omitempty"`
}

A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.

func NewConditionedStatus

func NewConditionedStatus(c ...Condition) *ConditionedStatus

NewConditionedStatus returns a stat with the supplied conditions set.

func (*ConditionedStatus) DeepCopy

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

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

func (*ConditionedStatus) DeepCopyInto

func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)

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

func (*ConditionedStatus) Equal

func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool

Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.

func (*ConditionedStatus) GetCondition

func (r *ConditionedStatus) GetCondition(t ConditionType) Condition

GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil

func (*ConditionedStatus) SetConditions

func (r *ConditionedStatus) SetConditions(c ...Condition)

SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.

type IPv4PrefixLengths

type IPv4PrefixLengths struct {
	// +kubebuilder:default:=31
	InterfaceInternal *uint8 `json:"interfaceInternal,omitempty" yaml:"interfaceInternal,omitempty"`
	// +kubebuilder:default:=24
	InterfaceExternal *uint8 `json:"interfaceExternal,omitempty" yaml:"interfaceExternal,omitempty"`
	// +kubebuilder:default:=16
	Pool *uint8 `json:"pool,omitempty" yaml:"pool,omitempty"`
}

func (*IPv4PrefixLengths) DeepCopy

func (in *IPv4PrefixLengths) DeepCopy() *IPv4PrefixLengths

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

func (*IPv4PrefixLengths) DeepCopyInto

func (in *IPv4PrefixLengths) DeepCopyInto(out *IPv4PrefixLengths)

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

type IPv6PrefixLengths

type IPv6PrefixLengths struct {
	// +kubebuilder:default:=127
	InterfaceInternal *uint8 `json:"interfaceInternal,omitempty" yaml:"interfaceInternal,omitempty"`
	// +kubebuilder:default:=64
	InterfaceExternal *uint8 `json:"interfaceExternal,omitempty" yaml:"interfaceExternal,omitempty"`
	// +kubebuilder:default:=48
	Pool *uint8 `json:"pool,omitempty" yaml:"pool,omitempty"`
}

func (*IPv6PrefixLengths) DeepCopy

func (in *IPv6PrefixLengths) DeepCopy() *IPv6PrefixLengths

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

func (*IPv6PrefixLengths) DeepCopyInto

func (in *IPv6PrefixLengths) DeepCopyInto(out *IPv6PrefixLengths)

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

type Interface

type Interface struct {
	// Kind defines the kind of interface. Attached to a routing table both interface and
	// bridgedomain interfaces are allowed. In a BridgeDomain only regular interfaces are allowed
	// +kubebuilder:validation:Enum=`interface`;`bridgedomain`
	// +kubebuilder:default=interface
	Kind InterfaceKind `json:"kind" yaml:"kind"`
	// BridgeDomainName defines the name of the bridgeDomain belonging to the interface
	BridgeDomainName *string `json:"bridgeDomainName,omitempty" yaml:"bridgeDomainName,omitempty"`
	// InterfaceName defines the name of the interface
	InterfaceName *string `json:"interfaceName,omitempty" yaml:"interfaceName,omitempty"`
	// NodeName defines the name of the node the interface belongs to interface
	NodeName *string `json:"nodeName,omitempty" yaml:"nodeName,omitempty"`
	// Selector defines the selector criterias for the interface selection
	Selector *metav1.LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
	// AttachmentType defines the interface attachement: vlan or none
	// +kubebuilder:validation:Enum=none;vlan
	AttachmentType reqv1alpha1.AttachmentType `json:"attachmentType,omitempty" yaml:"attachmentType,omitempty"`
}

func (*Interface) DeepCopy

func (in *Interface) DeepCopy() *Interface

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

func (*Interface) DeepCopyInto

func (in *Interface) DeepCopyInto(out *Interface)

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

func (*Interface) GetBridgeDomainName

func (r *Interface) GetBridgeDomainName(bdName, selectorName string) string

type InterfaceKind

type InterfaceKind string
const (
	InterfaceKindInterface    InterfaceKind = "interface"
	InterfaceKindBridgeDomain InterfaceKind = "bridgedomain"
)

type InterfaceUsageKind

type InterfaceUsageKind string
const (
	InterfaceUsageKindInternal InterfaceUsageKind = "internal"
	InterfaceUsageKindExternal InterfaceUsageKind = "external"
	InterfaceUsageKindPool     InterfaceUsageKind = "pool"
)

type Network

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

	Spec   NetworkSpec   `json:"spec,omitempty"`
	Status NetworkStatus `json:"status,omitempty"`
}

Network is the Schema for the Network API

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

func (*Network) DeepCopyObject

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

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

func (*Network) GetCondition

func (r *Network) GetCondition(t ConditionType) Condition

GetCondition returns the condition based on the condition kind

func (*Network) SetConditions

func (r *Network) SetConditions(c ...Condition)

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

type NetworkConfig

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

	Spec   NetworkConfigSpec `json:"spec,omitempty"`
	Status NetworkStatus     `json:"status,omitempty"`
}

NetworkConfig is the Schema for the Network API

func (*NetworkConfig) DeepCopy

func (in *NetworkConfig) DeepCopy() *NetworkConfig

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

func (*NetworkConfig) DeepCopyInto

func (in *NetworkConfig) DeepCopyInto(out *NetworkConfig)

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

func (*NetworkConfig) DeepCopyObject

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

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

func (*NetworkConfig) GetInterfacePrefixLength

func (r *NetworkConfig) GetInterfacePrefixLength(interfaceKind InterfaceUsageKind, isIpv6 bool) uint8

type NetworkConfigList

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

NetworkList contains a list of Repositories

func (*NetworkConfigList) DeepCopy

func (in *NetworkConfigList) DeepCopy() *NetworkConfigList

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

func (*NetworkConfigList) DeepCopyInto

func (in *NetworkConfigList) DeepCopyInto(out *NetworkConfigList)

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

func (*NetworkConfigList) DeepCopyObject

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

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

type NetworkConfigSpec

type NetworkConfigSpec struct {
	// PrefixLengths define the prefix lengths for ipv4 and ipv6 configuration elements
	PrefixLengths *PrefixLengths `json:"prefixLengths,omitempty" yaml:"prefixLengths,omitempty"`
}

NetworkConfigSpec defines the desired state of NetworkConfig

func (*NetworkConfigSpec) DeepCopy

func (in *NetworkConfigSpec) DeepCopy() *NetworkConfigSpec

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

func (*NetworkConfigSpec) DeepCopyInto

func (in *NetworkConfigSpec) DeepCopyInto(out *NetworkConfigSpec)

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

type NetworkList

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

NetworkList contains a list of Repositories

func (*NetworkList) DeepCopy

func (in *NetworkList) DeepCopy() *NetworkList

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

func (*NetworkList) DeepCopyInto

func (in *NetworkList) DeepCopyInto(out *NetworkList)

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

func (*NetworkList) DeepCopyObject

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

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

type NetworkSpec

type NetworkSpec struct {
	// Topology defines the topology to which this network applies
	Topology string `json:"topology" yaml:"topology"`
	// BridgeDomains define a set of logical ports that share the same
	// flooding or broadcast characteristics. Like a virtual LAN (VLAN),
	// a bridge domain spans one or more ports of multiple devices.
	BridgeDomains []BridgeDomain `json:"bridgeDomains,omitempty" yaml:"bridgeDomains,omitempty"`
	// RoutingTables defines a set of routes belonging to a given routing instance
	// Multiple routing tables are also called virtual routing instances. Each virtual
	// routing instance can hold overlapping IP information
	// A routing table supports both ipv4 and ipv6
	RoutingTables []RoutingTable `json:"routingTables,omitempty" yaml:"routingTables,omitempty"`
}

NetworkSpec defines the desired state of Network

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type NetworkStatus

type NetworkStatus struct {
	// ConditionedStatus provides the status of the Readiness using conditions
	// if the condition is true the other attributes in the status are meaningful
	ConditionedStatus `json:",inline" yaml:",inline"`
}

NetworkStatus defines the observed state of Network

func (*NetworkStatus) DeepCopy

func (in *NetworkStatus) DeepCopy() *NetworkStatus

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

func (*NetworkStatus) DeepCopyInto

func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)

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

type PrefixLengths

type PrefixLengths struct {
	// IPv4 defines the ipv4 prefixlengths
	// +optional
	IPv4 *IPv4PrefixLengths `json:"ipv4,omitempty" yaml:"ipv4,omitempty"`
	// IPv6 defines the ipv6 prefixlengths
	// +optional
	IPv6 *IPv6PrefixLengths `json:"ipv6,omitempty" yaml:"ipv6,omitempty"`
}

func (*PrefixLengths) DeepCopy

func (in *PrefixLengths) DeepCopy() *PrefixLengths

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

func (*PrefixLengths) DeepCopyInto

func (in *PrefixLengths) DeepCopyInto(out *PrefixLengths)

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

type RoutingTable

type RoutingTable struct {
	// Name defines the name of the routing table
	Name string `json:"name" yaml:"name"`
	// Interfaces defines the interfaces belonging to the routing table
	Interfaces []Interface `json:"interfaces,omitempty" yaml:"interfaces,omitempty"`
	// Prefixes defines the prefixes belonging to the routing table
	Prefixes []ipamv1alpha1.Prefix `json:"prefixes" yaml:"prefixes"`
}

func (*RoutingTable) DeepCopy

func (in *RoutingTable) DeepCopy() *RoutingTable

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

func (*RoutingTable) DeepCopyInto

func (in *RoutingTable) DeepCopyInto(out *RoutingTable)

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