v1alpha2

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the wiring v1alpha2 API group. It is public API group mainly for the underlay definition including Switches, Server, wiring between them and etc. Intended to be used by the user. +kubebuilder:object:generate=true +groupName=wiring.githedgehog.com

Index

Constants

View Source
const (
	ConnectionTypeUnbundled      = "unbundled"
	ConnectionTypeBundled        = "bundled"
	ConnectionTypeManagement     = "management" // TODO rename to control?
	ConnectionTypeMCLAG          = "mclag"
	ConnectionTypeMCLAGDomain    = "mclag-domain"
	ConnectionTypeESLAG          = "eslag"
	ConnectionTypeFabric         = "fabric"
	ConnectionTypeVPCLoopback    = "vpc-loopback"
	ConnectionTypeExternal       = "external"
	ConnectionTypeStaticExternal = "static-external"
)
View Source
const (
	PortNameSeparator    = "/"
	DefaultVLANNamespace = "default"
)
View Source
const (
	ManagementPortPrefix        = "M"
	ManagementPortNOSNamePrefix = "Management"
	DataPortPrefix              = "E"
	DataPortNOSNamePrefix       = "Ethernet"
	BreakoutNOSNamePrefix       = "1/"
	ONIEPortNamePrefix          = "eth"
)
View Source
const INVALID = "<invalid>"
View Source
const KindConnection = "Connection"
View Source
const KindServer = "Server"
View Source
const KindServerProfile = "ServerProfile"
View Source
const KindSwitch = "Switch"
View Source
const KindSwitchGroup = "SwitchGroup"
View Source
const KindSwitchProfile = "SwitchProfile"
View Source
const KindVLANNamespace = "VLANNamespace"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "wiring.githedgehog.com", Version: "v1alpha2"}

	// 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 (
	// TODO should it be same as group name? or just standard prefix for all APIs?
	LabelPrefix               = "fabric.githedgehog.com/"
	LabelSwitch               = LabelName("switch")
	LabelProfile              = LabelName("profile")
	LabelServer               = LabelName("server")
	LabelServerType           = LabelName("server-type")
	LabelLocation             = LabelName("location")
	LabelConnection           = LabelName("connection")
	LabelConnectionType       = LabelName("connection-type")
	LabelSwitches             = LabelName("switches")
	LabelServers              = LabelName("servers")
	LabelVPC                  = LabelName("vpc")
	ListLabelValue            = "true"
	ConnectionLabelTypeServer = "server"
	ConnectionLabelTypeSwitch = "switch"
	AnnotationPorts           = LabelName("ports")
)

Functions

func CleanupFabricLabels

func CleanupFabricLabels(labels map[string]string)

func LabelName

func LabelName(name string) string

func ListLabel

func ListLabel(listType, val string) string

func ListLabelPrefix

func ListLabelPrefix(listType string) string

func ListLabelServer

func ListLabelServer(serverName string) string

func ListLabelSwitch

func ListLabelSwitch(switchName string) string

func ListLabelSwitchGroup added in v0.35.0

func ListLabelSwitchGroup(groupName string) string

func ListLabelVLANNamespace

func ListLabelVLANNamespace(vlanNamespace string) string

func MatchingLabelsForListLabelServer

func MatchingLabelsForListLabelServer(serverName string) client.MatchingLabels

func MatchingLabelsForListLabelSwitch

func MatchingLabelsForListLabelSwitch(switchName string) client.MatchingLabels

func MatchingLabelsForSwitchGroup added in v0.35.0

func MatchingLabelsForSwitchGroup(groupName string) client.MatchingLabels

func SplitPortName

func SplitPortName(name string) []string

func ValidatePortBreakoutMode added in v0.39.0

func ValidatePortBreakoutMode(mode string) error

func ValidatePortSpeed added in v0.39.0

func ValidatePortSpeed(speed string) error

Types

type ApplyStatus

type ApplyStatus struct {
	Generation int64            `json:"gen,omitempty"`
	Time       metav1.Time      `json:"time,omitempty"`
	Detailed   map[string]int64 `json:"detailed,omitempty"`
}

func (*ApplyStatus) DeepCopy

func (in *ApplyStatus) DeepCopy() *ApplyStatus

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

func (*ApplyStatus) DeepCopyInto

func (in *ApplyStatus) DeepCopyInto(out *ApplyStatus)

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

type BasePortName

type BasePortName struct {
	// Port defines the full name of the switch port in the format of "device/port", such as "spine-1/Ethernet1".
	// SONiC port name is used as a port name and switch name should be same as the name of the Switch object.
	Port string `json:"port,omitempty"`
}

BasePortName defines the full name of the switch port

func NewBasePortName

func NewBasePortName(name string) BasePortName

func (*BasePortName) DeepCopy

func (in *BasePortName) DeepCopy() *BasePortName

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

func (*BasePortName) DeepCopyInto

func (in *BasePortName) DeepCopyInto(out *BasePortName)

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

func (*BasePortName) DeviceName

func (pn *BasePortName) DeviceName() string

func (*BasePortName) LocalPortName

func (pn *BasePortName) LocalPortName() string

func (*BasePortName) PortName

func (pn *BasePortName) PortName() string

type ConnBundled

type ConnBundled struct {
	// Links is the list of server-to-switch links
	Links []ServerToSwitchLink `json:"links,omitempty"`
	// ServerFacingConnectionConfig defines any server-facing connection (unbundled, bundled, mclag, etc.) configuration
	ServerFacingConnectionConfig `json:",inline"`
}

ConnBundled defines the bundled connection (port channel, single server to a single switch with multiple links)

func (*ConnBundled) DeepCopy

func (in *ConnBundled) DeepCopy() *ConnBundled

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

func (*ConnBundled) DeepCopyInto

func (in *ConnBundled) DeepCopyInto(out *ConnBundled)

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

type ConnESLAG

type ConnESLAG struct {
	//+kubebuilder:validation:MinItems=2
	// Links is the list of server-to-switch links
	Links []ServerToSwitchLink `json:"links,omitempty"`
	// ServerFacingConnectionConfig defines any server-facing connection (unbundled, bundled, eslag, etc.) configuration
	ServerFacingConnectionConfig `json:",inline"`
	// Fallback is the optional flag that used to indicate one of the links in LACP port channel to be used as a fallback link
	Fallback bool `json:"fallback,omitempty"`
}

ConnESLAG defines the ESLAG connection (port channel, single server to 2-4 switches with multiple links)

func (*ConnESLAG) DeepCopy

func (in *ConnESLAG) DeepCopy() *ConnESLAG

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

func (*ConnESLAG) DeepCopyInto

func (in *ConnESLAG) DeepCopyInto(out *ConnESLAG)

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

type ConnExternal

type ConnExternal struct {
	// Link is the external connection link
	Link ConnExternalLink `json:"link,omitempty"`
}

ConnExternal defines the external connection (single switch to a single external device with a single link)

func (*ConnExternal) DeepCopy

func (in *ConnExternal) DeepCopy() *ConnExternal

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

func (*ConnExternal) DeepCopyInto

func (in *ConnExternal) DeepCopyInto(out *ConnExternal)

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

type ConnExternalLink struct {
	Switch BasePortName `json:"switch,omitempty"`
}

ConnExternalLink defines the external connection link

func (*ConnExternalLink) DeepCopy

func (in *ConnExternalLink) DeepCopy() *ConnExternalLink

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

func (*ConnExternalLink) DeepCopyInto

func (in *ConnExternalLink) DeepCopyInto(out *ConnExternalLink)

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

type ConnFabric

type ConnFabric struct {
	//+kubebuilder:validation:MinItems=1
	// Links is the list of spine-to-leaf links
	Links []FabricLink `json:"links,omitempty"`
}

ConnFabric defines the fabric connection (single spine to a single leaf with at least one link)

func (*ConnFabric) DeepCopy

func (in *ConnFabric) DeepCopy() *ConnFabric

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

func (*ConnFabric) DeepCopyInto

func (in *ConnFabric) DeepCopyInto(out *ConnFabric)

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

type ConnFabricLinkSwitch

type ConnFabricLinkSwitch struct {
	// BasePortName defines the full name of the switch port
	BasePortName `json:",inline"`
	//+kubebuilder:validation:Pattern=`^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}/([1-2]?[0-9]|3[0-2])$`
	// IP is the IP address of the switch side of the fabric link (switch port configuration)
	IP string `json:"ip,omitempty"`
}

ConnFabricLinkSwitch defines the switch side of the fabric link

func (*ConnFabricLinkSwitch) DeepCopy

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

func (*ConnFabricLinkSwitch) DeepCopyInto

func (in *ConnFabricLinkSwitch) DeepCopyInto(out *ConnFabricLinkSwitch)

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

type ConnMCLAG

type ConnMCLAG struct {
	//+kubebuilder:validation:MinItems=2
	// Links is the list of server-to-switch links
	Links []ServerToSwitchLink `json:"links,omitempty"`
	// ServerFacingConnectionConfig defines any server-facing connection (unbundled, bundled, mclag, etc.) configuration
	ServerFacingConnectionConfig `json:",inline"`
	// Fallback is the optional flag that used to indicate one of the links in LACP port channel to be used as a fallback link
	Fallback bool `json:"fallback,omitempty"`
}

ConnMCLAG defines the MCLAG connection (port channel, single server to pair of switches with multiple links)

func (*ConnMCLAG) DeepCopy

func (in *ConnMCLAG) DeepCopy() *ConnMCLAG

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

func (*ConnMCLAG) DeepCopyInto

func (in *ConnMCLAG) DeepCopyInto(out *ConnMCLAG)

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

type ConnMCLAGDomain

type ConnMCLAGDomain struct {
	//+kubebuilder:validation:MinItems=1
	// PeerLinks is the list of peer links between the switches, used to pass server traffic between switch
	PeerLinks []SwitchToSwitchLink `json:"peerLinks,omitempty"`

	//+kubebuilder:validation:MinItems=1
	// SessionLinks is the list of session links between the switches, used only to pass MCLAG control plane and BGP
	// traffic between switches
	SessionLinks []SwitchToSwitchLink `json:"sessionLinks,omitempty"`
}

ConnMCLAGDomain defines the MCLAG domain connection which makes two switches into a single logical switch or redundancy group and allows to use MCLAG connections to connect servers in a multi-homed way.

func (*ConnMCLAGDomain) DeepCopy

func (in *ConnMCLAGDomain) DeepCopy() *ConnMCLAGDomain

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

func (*ConnMCLAGDomain) DeepCopyInto

func (in *ConnMCLAGDomain) DeepCopyInto(out *ConnMCLAGDomain)

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

type ConnMgmt

type ConnMgmt struct {
	Link ConnMgmtLink `json:"link,omitempty"`
}

ConnMgmt defines the management connection (single control node/server to a single switch with a single link)

func (*ConnMgmt) DeepCopy

func (in *ConnMgmt) DeepCopy() *ConnMgmt

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

func (*ConnMgmt) DeepCopyInto

func (in *ConnMgmt) DeepCopyInto(out *ConnMgmt)

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

type ConnMgmtLink struct {
	// Server is the server side of the management link
	Server ConnMgmtLinkServer `json:"server,omitempty"`
	// Switch is the switch side of the management link
	Switch ConnMgmtLinkSwitch `json:"switch,omitempty"`
}

ConnMgmtLink defines the management connection link

func (*ConnMgmtLink) DeepCopy

func (in *ConnMgmtLink) DeepCopy() *ConnMgmtLink

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

func (*ConnMgmtLink) DeepCopyInto

func (in *ConnMgmtLink) DeepCopyInto(out *ConnMgmtLink)

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

type ConnMgmtLinkServer

type ConnMgmtLinkServer struct {
	// BasePortName defines the full name of the switch port
	BasePortName `json:",inline"`
	//+kubebuilder:validation:Pattern=`^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}/([1-2]?[0-9]|3[0-2])$`
	// IP is the IP address of the server side of the management link (control node port configuration)
	IP string `json:"ip,omitempty"`
	// MAC is an optional MAC address of the control node port for the management link, if specified will be used to
	// create a "virtual" link with the connection names on the control node
	MAC string `json:"mac,omitempty"`
}

ConnMgmtLinkServer defines the server side of the management link

func (*ConnMgmtLinkServer) DeepCopy

func (in *ConnMgmtLinkServer) DeepCopy() *ConnMgmtLinkServer

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

func (*ConnMgmtLinkServer) DeepCopyInto

func (in *ConnMgmtLinkServer) DeepCopyInto(out *ConnMgmtLinkServer)

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

type ConnMgmtLinkSwitch

type ConnMgmtLinkSwitch struct {
	// BasePortName defines the full name of the switch port
	BasePortName `json:",inline"`
	//+kubebuilder:validation:Pattern=`^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}/([1-2]?[0-9]|3[0-2])$`
	// IP is the IP address of the switch side of the management link (switch port configuration)
	IP string `json:"ip,omitempty"`
	// ONIEPortName is an optional ONIE port name of the switch side of the management link that's only used by the IPv6 Link Local discovery
	ONIEPortName string `json:"oniePortName,omitempty"`
}

ConnMgmtLinkSwitch defines the switch side of the management link

func (*ConnMgmtLinkSwitch) DeepCopy

func (in *ConnMgmtLinkSwitch) DeepCopy() *ConnMgmtLinkSwitch

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

func (*ConnMgmtLinkSwitch) DeepCopyInto

func (in *ConnMgmtLinkSwitch) DeepCopyInto(out *ConnMgmtLinkSwitch)

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

type ConnStaticExternal

type ConnStaticExternal struct {
	// Link is the static external connection link
	Link ConnStaticExternalLink `json:"link,omitempty"`
	// WithinVPC is the optional VPC name to provision the static external connection within the VPC VRF instead of default one to make resource available to the specific VPC
	WithinVPC string `json:"withinVPC,omitempty"`
}

ConnStaticExternal defines the static external connection (single switch to a single external device with a single link)

func (*ConnStaticExternal) DeepCopy

func (in *ConnStaticExternal) DeepCopy() *ConnStaticExternal

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

func (*ConnStaticExternal) DeepCopyInto

func (in *ConnStaticExternal) DeepCopyInto(out *ConnStaticExternal)

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

type ConnStaticExternalLink struct {
	// Switch is the switch side of the static external connection link
	Switch ConnStaticExternalLinkSwitch `json:"switch,omitempty"`
}

ConnStaticExternalLink defines the static external connection link

func (*ConnStaticExternalLink) DeepCopy

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

func (*ConnStaticExternalLink) DeepCopyInto

func (in *ConnStaticExternalLink) DeepCopyInto(out *ConnStaticExternalLink)

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

type ConnStaticExternalLinkSwitch

type ConnStaticExternalLinkSwitch struct {
	// BasePortName defines the full name of the switch port
	BasePortName `json:",inline"`
	//+kubebuilder:validation:Pattern=`^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}/([1-2]?[0-9]|3[0-2])$`
	// IP is the IP address of the switch side of the static external connection link (switch port configuration)
	IP string `json:"ip,omitempty"`
	//+kubebuilder:validation:Pattern=`^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$`
	// NextHop is the next hop IP address for static routes that will be created for the subnets
	NextHop string `json:"nextHop,omitempty"`
	// Subnets is the list of subnets that will get static routes using the specified next hop
	Subnets []string `json:"subnets,omitempty"`
	// VLAN is the optional VLAN ID to be configured on the switch port
	VLAN uint16 `json:"vlan,omitempty"`
}

ConnStaticExternalLinkSwitch defines the switch side of the static external connection link

func (*ConnStaticExternalLinkSwitch) DeepCopy

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

func (*ConnStaticExternalLinkSwitch) DeepCopyInto

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

type ConnUnbundled

type ConnUnbundled struct {
	// Link is the server-to-switch link
	Link ServerToSwitchLink `json:"link,omitempty"`
	// ServerFacingConnectionConfig defines any server-facing connection (unbundled, bundled, mclag, etc.) configuration
	ServerFacingConnectionConfig `json:",inline"`
}

ConnUnbundled defines the unbundled connection (no port channel, single server to a single switch with a single link)

func (*ConnUnbundled) DeepCopy

func (in *ConnUnbundled) DeepCopy() *ConnUnbundled

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

func (*ConnUnbundled) DeepCopyInto

func (in *ConnUnbundled) DeepCopyInto(out *ConnUnbundled)

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

type ConnVPCLoopback

type ConnVPCLoopback struct {
	//+kubebuilder:validation:MinItems=1
	// Links is the list of VPC loopback links
	Links []SwitchToSwitchLink `json:"links,omitempty"`
}

ConnVPCLoopback defines the VPC loopback connection (multiple port pairs on a single switch) that enables automated workaround named "VPC Loopback" that allow to avoid switch hardware limitations and traffic going through CPU in some cases

func (*ConnVPCLoopback) DeepCopy

func (in *ConnVPCLoopback) DeepCopy() *ConnVPCLoopback

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

func (*ConnVPCLoopback) DeepCopyInto

func (in *ConnVPCLoopback) DeepCopyInto(out *ConnVPCLoopback)

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

type Connection

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

	// Spec is the desired state of the Connection
	Spec ConnectionSpec `json:"spec,omitempty"`
	// Status is the observed state of the Connection
	Status ConnectionStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=conn +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.metadata.labels.fabric\.githedgehog\.com/connection-type`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 Connection object represents a logical and physical connections between any devices in the Fabric (Switch, Server and External objects). It's needed to define all physical and logical connections between the devices in the Wiring Diagram. Connection type is defined by the top-level field in the ConnectionSpec. Exactly one of them could be used in a single Connection object.

func (*Connection) DeepCopy

func (in *Connection) DeepCopy() *Connection

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

func (*Connection) DeepCopyInto

func (in *Connection) DeepCopyInto(out *Connection)

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

func (*Connection) DeepCopyObject

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

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

func (*Connection) Default

func (conn *Connection) Default()

func (*Connection) Validate

func (conn *Connection) Validate(ctx context.Context, kube client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type ConnectionList

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

ConnectionList contains a list of Connection

func (*ConnectionList) DeepCopy

func (in *ConnectionList) DeepCopy() *ConnectionList

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

func (*ConnectionList) DeepCopyInto

func (in *ConnectionList) DeepCopyInto(out *ConnectionList)

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

func (*ConnectionList) DeepCopyObject

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

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

func (*ConnectionList) GetItems added in v0.34.0

func (connList *ConnectionList) GetItems() []meta.Object

type ConnectionSpec

type ConnectionSpec struct {
	// Unbundled defines the unbundled connection (no port channel, single server to a single switch with a single link)
	Unbundled *ConnUnbundled `json:"unbundled,omitempty"`
	// Bundled defines the bundled connection (port channel, single server to a single switch with multiple links)
	Bundled *ConnBundled `json:"bundled,omitempty"`
	// Management defines the management connection (single control node/server to a single switch with a single link)
	Management *ConnMgmt `json:"management,omitempty"`
	// MCLAG defines the MCLAG connection (port channel, single server to pair of switches with multiple links)
	MCLAG *ConnMCLAG `json:"mclag,omitempty"`
	// ESLAG defines the ESLAG connection (port channel, single server to 2-4 switches with multiple links)
	ESLAG *ConnESLAG `json:"eslag,omitempty"`
	// MCLAGDomain defines the MCLAG domain connection which makes two switches into a single logical switch for server multi-homing
	MCLAGDomain *ConnMCLAGDomain `json:"mclagDomain,omitempty"`
	// Fabric defines the fabric connection (single spine to a single leaf with at least one link)
	Fabric *ConnFabric `json:"fabric,omitempty"`
	// VPCLoopback defines the VPC loopback connection (multiple port pairs on a single switch) for automated workaround
	VPCLoopback *ConnVPCLoopback `json:"vpcLoopback,omitempty"`
	// External defines the external connection (single switch to a single external device with a single link)
	External *ConnExternal `json:"external,omitempty"`
	// StaticExternal defines the static external connection (single switch to a single external device with a single link)
	StaticExternal *ConnStaticExternal `json:"staticExternal,omitempty"`
}

ConnectionSpec defines the desired state of Connection

func (*ConnectionSpec) ConnectionLabels

func (connSpec *ConnectionSpec) ConnectionLabels() map[string]string

func (*ConnectionSpec) DeepCopy

func (in *ConnectionSpec) DeepCopy() *ConnectionSpec

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

func (*ConnectionSpec) DeepCopyInto

func (in *ConnectionSpec) DeepCopyInto(out *ConnectionSpec)

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

func (*ConnectionSpec) Endpoints

func (connSpec *ConnectionSpec) Endpoints() ([]string, []string, []string, map[string]string, error)

func (*ConnectionSpec) GenerateName

func (connSpec *ConnectionSpec) GenerateName() string

func (*ConnectionSpec) Type

func (connSpec *ConnectionSpec) Type() string

func (*ConnectionSpec) ValidateServerFacingMTU

func (connSpec *ConnectionSpec) ValidateServerFacingMTU(fabricMTU uint16, serverFacingMTUOffset uint16) error

type ConnectionStatus

type ConnectionStatus struct{}

ConnectionStatus defines the observed state of Connection

func (*ConnectionStatus) DeepCopy

func (in *ConnectionStatus) DeepCopy() *ConnectionStatus

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

func (*ConnectionStatus) DeepCopyInto

func (in *ConnectionStatus) DeepCopyInto(out *ConnectionStatus)

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

type FabricLink struct {
	// Spine is the spine side of the fabric link
	Spine ConnFabricLinkSwitch `json:"spine,omitempty"`
	// Leaf is the leaf side of the fabric link
	Leaf ConnFabricLinkSwitch `json:"leaf,omitempty"`
}

FabricLink defines the fabric connection link

func (*FabricLink) DeepCopy

func (in *FabricLink) DeepCopy() *FabricLink

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

func (*FabricLink) DeepCopyInto

func (in *FabricLink) DeepCopyInto(out *FabricLink)

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

type IPort

type IPort interface {
	PortName() string
	LocalPortName() string
	DeviceName() string
}

+kubebuilder:object:generate=false

type Location

type Location struct {
	Location string `json:"location,omitempty"`
	Aisle    string `json:"aisle,omitempty"`
	Row      string `json:"row,omitempty"`
	Rack     string `json:"rack,omitempty"`
	Slot     string `json:"slot,omitempty"`
}

Location defines the geographical position of the device in a datacenter

func (*Location) DeepCopy

func (in *Location) DeepCopy() *Location

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

func (*Location) DeepCopyInto

func (in *Location) DeepCopyInto(out *Location)

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

func (*Location) GenerateUUID

func (l *Location) GenerateUUID() (string, string)

GenerateUUID generates the location UUID which is a version 5 UUID over the fields of `Location`. It also returns the URL representation that was used in order to generate the UUID.

func (*Location) IsEmpty

func (l *Location) IsEmpty() bool

type LocationSig

type LocationSig struct {
	Sig     string `json:"sig,omitempty"`
	UUIDSig string `json:"uuidSig,omitempty"`
}

LocationSig contains signatures for the location UUID as well as the device location itself

func (*LocationSig) DeepCopy

func (in *LocationSig) DeepCopy() *LocationSig

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

func (*LocationSig) DeepCopyInto

func (in *LocationSig) DeepCopyInto(out *LocationSig)

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

type Server

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

	// Spec is desired state of the server
	Spec ServerSpec `json:"spec,omitempty"`
	// Status is the observed state of the server
	Status ServerStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=srv +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type`,priority=0 +kubebuilder:printcolumn:name="Descr",type=string,JSONPath=`.spec.description`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 Server is the Schema for the servers API

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

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

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

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

func (*Server) DeepCopyObject

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

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

func (*Server) Default

func (server *Server) Default()

func (*Server) IsControl

func (server *Server) IsControl() bool

func (*Server) Validate

func (server *Server) Validate(_ context.Context, _ client.Reader, _ *meta.FabricConfig) (admission.Warnings, error)

type ServerFacingConnectionConfig

type ServerFacingConnectionConfig struct {
	// MTU is the MTU to be configured on the switch port or port channel
	MTU uint16 `json:"mtu,omitempty"`
}

ServerFacingConnectionConfig defines any server-facing connection (unbundled, bundled, mclag, etc.) configuration

func (*ServerFacingConnectionConfig) DeepCopy

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

func (*ServerFacingConnectionConfig) DeepCopyInto

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

type ServerList

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

ServerList contains a list of Server

func (*ServerList) DeepCopy

func (in *ServerList) DeepCopy() *ServerList

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

func (*ServerList) DeepCopyInto

func (in *ServerList) DeepCopyInto(out *ServerList)

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

func (*ServerList) DeepCopyObject

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

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

func (*ServerList) GetItems added in v0.34.0

func (srvList *ServerList) GetItems() []meta.Object

type ServerProfile

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

	Spec   ServerProfileSpec   `json:"spec,omitempty"`
	Status ServerProfileStatus `json:"status,omitempty"`
}

ServerProfile is currently not used/implemented in the Fabric API

func (*ServerProfile) DeepCopy

func (in *ServerProfile) DeepCopy() *ServerProfile

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

func (*ServerProfile) DeepCopyInto

func (in *ServerProfile) DeepCopyInto(out *ServerProfile)

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

func (*ServerProfile) DeepCopyObject

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

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

func (*ServerProfile) Default

func (sp *ServerProfile) Default()

func (*ServerProfile) Validate

type ServerProfileList

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

ServerProfileList contains a list of ServerProfile

func (*ServerProfileList) DeepCopy

func (in *ServerProfileList) DeepCopy() *ServerProfileList

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

func (*ServerProfileList) DeepCopyInto

func (in *ServerProfileList) DeepCopyInto(out *ServerProfileList)

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

func (*ServerProfileList) DeepCopyObject

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

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

func (*ServerProfileList) GetItems added in v0.34.0

func (spList *ServerProfileList) GetItems() []meta.Object

type ServerProfileNIC

type ServerProfileNIC struct {
	Name  string                 `json:"name,omitempty"`
	Ports []ServerProfileNICPort `json:"ports,omitempty"`
}

func (*ServerProfileNIC) DeepCopy

func (in *ServerProfileNIC) DeepCopy() *ServerProfileNIC

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

func (*ServerProfileNIC) DeepCopyInto

func (in *ServerProfileNIC) DeepCopyInto(out *ServerProfileNIC)

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

type ServerProfileNICPort

type ServerProfileNICPort struct {
	Name string `json:"name,omitempty"`
}

func (*ServerProfileNICPort) DeepCopy

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

func (*ServerProfileNICPort) DeepCopyInto

func (in *ServerProfileNICPort) DeepCopyInto(out *ServerProfileNICPort)

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

type ServerProfileSpec

type ServerProfileSpec struct {
	NICs []ServerProfileNIC `json:"nics,omitempty"`
}

ServerProfileSpec defines the desired state of ServerProfile

func (*ServerProfileSpec) DeepCopy

func (in *ServerProfileSpec) DeepCopy() *ServerProfileSpec

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

func (*ServerProfileSpec) DeepCopyInto

func (in *ServerProfileSpec) DeepCopyInto(out *ServerProfileSpec)

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

type ServerProfileStatus

type ServerProfileStatus struct{}

ServerProfileStatus defines the observed state of ServerProfile

func (*ServerProfileStatus) DeepCopy

func (in *ServerProfileStatus) DeepCopy() *ServerProfileStatus

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

func (*ServerProfileStatus) DeepCopyInto

func (in *ServerProfileStatus) DeepCopyInto(out *ServerProfileStatus)

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

type ServerSpec

type ServerSpec struct {
	// Type is the type of server, could be control for control nodes or default (empty string) for everything else
	Type ServerType `json:"type,omitempty"`
	// Description is a description of the server
	Description string `json:"description,omitempty"`
	// Profile is the profile of the server, name of the ServerProfile object to be used for this server, currently not used by the Fabric
	Profile string `json:"profile,omitempty"`
}

ServerSpec defines the desired state of Server

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

func (*ServerSpec) Labels

func (serverSpec *ServerSpec) Labels() map[string]string

type ServerStatus

type ServerStatus struct{}

ServerStatus defines the observed state of Server

func (*ServerStatus) DeepCopy

func (in *ServerStatus) DeepCopy() *ServerStatus

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

func (*ServerStatus) DeepCopyInto

func (in *ServerStatus) DeepCopyInto(out *ServerStatus)

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

type ServerToSwitchLink struct {
	// Server is the server side of the connection
	Server BasePortName `json:"server,omitempty"`
	// Switch is the switch side of the connection
	Switch BasePortName `json:"switch,omitempty"`
}

ServerToSwitchLink defines the server-to-switch link

func (*ServerToSwitchLink) DeepCopy

func (in *ServerToSwitchLink) DeepCopy() *ServerToSwitchLink

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

func (*ServerToSwitchLink) DeepCopyInto

func (in *ServerToSwitchLink) DeepCopyInto(out *ServerToSwitchLink)

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

type ServerType

type ServerType string

+kubebuilder:validation:Enum=control; ServerType is the type of server, could be control for control nodes or default (empty string) for everything else

const (
	ServerTypeControl ServerType = "control"
	ServerTypeDefault ServerType = "" // or nil - just a server
)

type Switch

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

	// Spec is desired state of the switch
	Spec SwitchSpec `json:"spec,omitempty"`
	// Status is the observed state of the switch
	Status SwitchStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=sw +kubebuilder:printcolumn:name="Profile",type=string,JSONPath=`.spec.profile`,priority=0 +kubebuilder:printcolumn:name="Role",type=string,JSONPath=`.spec.role`,priority=0 +kubebuilder:printcolumn:name="Descr",type=string,JSONPath=`.spec.description`,priority=0 +kubebuilder:printcolumn:name="Groups",type=string,JSONPath=`.spec.groups`,priority=0 +kubebuilder:printcolumn:name="LocationUUID",type=string,JSONPath=`.metadata.labels.fabric\.githedgehog\.com/location`,priority=0 +kubebuilder:printcolumn:name="PortGroups",type=string,JSONPath=`.spec.portGroupSpeeds`,priority=1 +kubebuilder:printcolumn:name="Breakouts",type=string,JSONPath=`.spec.portBreakouts`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 Switch is the Schema for the switches API

func (*Switch) DeepCopy

func (in *Switch) DeepCopy() *Switch

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

func (*Switch) DeepCopyInto

func (in *Switch) DeepCopyInto(out *Switch)

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

func (*Switch) DeepCopyObject

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

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

func (*Switch) Default

func (sw *Switch) Default()

func (*Switch) Validate

func (sw *Switch) Validate(ctx context.Context, kube client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type SwitchGroup

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

	// Spec is the desired state of the SwitchGroup
	Spec SwitchGroupSpec `json:"spec,omitempty"`
	// Status is the observed state of the SwitchGroup
	Status SwitchGroupStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=sg +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 SwitchGroup is the marker API object to group switches together, switch can belong to multiple groups

func (*SwitchGroup) DeepCopy

func (in *SwitchGroup) DeepCopy() *SwitchGroup

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

func (*SwitchGroup) DeepCopyInto

func (in *SwitchGroup) DeepCopyInto(out *SwitchGroup)

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

func (*SwitchGroup) DeepCopyObject

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

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

func (*SwitchGroup) Default

func (sg *SwitchGroup) Default()

func (*SwitchGroup) Validate

type SwitchGroupList

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

SwitchGroupList contains a list of SwitchGroup

func (*SwitchGroupList) DeepCopy

func (in *SwitchGroupList) DeepCopy() *SwitchGroupList

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

func (*SwitchGroupList) DeepCopyInto

func (in *SwitchGroupList) DeepCopyInto(out *SwitchGroupList)

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

func (*SwitchGroupList) DeepCopyObject

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

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

func (*SwitchGroupList) GetItems added in v0.34.0

func (sgList *SwitchGroupList) GetItems() []meta.Object

type SwitchGroupSpec

type SwitchGroupSpec struct{}

SwitchGroupSpec defines the desired state of SwitchGroup

func (*SwitchGroupSpec) DeepCopy

func (in *SwitchGroupSpec) DeepCopy() *SwitchGroupSpec

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

func (*SwitchGroupSpec) DeepCopyInto

func (in *SwitchGroupSpec) DeepCopyInto(out *SwitchGroupSpec)

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

type SwitchGroupStatus

type SwitchGroupStatus struct{}

SwitchGroupStatus defines the observed state of SwitchGroup

func (*SwitchGroupStatus) DeepCopy

func (in *SwitchGroupStatus) DeepCopy() *SwitchGroupStatus

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

func (*SwitchGroupStatus) DeepCopyInto

func (in *SwitchGroupStatus) DeepCopyInto(out *SwitchGroupStatus)

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

type SwitchList

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

SwitchList contains a list of Switch

func (*SwitchList) DeepCopy

func (in *SwitchList) DeepCopy() *SwitchList

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

func (*SwitchList) DeepCopyInto

func (in *SwitchList) DeepCopyInto(out *SwitchList)

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

func (*SwitchList) DeepCopyObject

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

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

func (*SwitchList) GetItems added in v0.34.0

func (swList *SwitchList) GetItems() []meta.Object

type SwitchProfile

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

	Spec   SwitchProfileSpec   `json:"spec,omitempty"`
	Status SwitchProfileStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=sp +kubebuilder:printcolumn:name="DisplayName",type=string,JSONPath=`.spec.displayName`,priority=0 +kubebuilder:printcolumn:name="OtherNames",type=string,JSONPath=`.spec.otherNames`,priority=0 +kubebuilder:printcolumn:name="Ports",type=string,JSONPath=`.metadata.annotations.fabric\.githedgehog\.com/ports`,priority=0 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 SwitchProfile represents switch capabilities and configuration

func (*SwitchProfile) DeepCopy

func (in *SwitchProfile) DeepCopy() *SwitchProfile

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

func (*SwitchProfile) DeepCopyInto

func (in *SwitchProfile) DeepCopyInto(out *SwitchProfile)

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

func (*SwitchProfile) DeepCopyObject

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

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

func (*SwitchProfile) Default

func (sp *SwitchProfile) Default()

func (*SwitchProfile) Validate

type SwitchProfileConfig added in v0.39.0

type SwitchProfileConfig struct {
	// MaxPathsIBGP defines the maximum number of IBGP paths to be configured
	MaxPathsEBGP uint32 `json:"maxPathsEBGP,omitempty"`
}

Defines switch-specific configuration options

func (*SwitchProfileConfig) DeepCopy added in v0.39.0

func (in *SwitchProfileConfig) DeepCopy() *SwitchProfileConfig

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

func (*SwitchProfileConfig) DeepCopyInto added in v0.39.0

func (in *SwitchProfileConfig) DeepCopyInto(out *SwitchProfileConfig)

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

type SwitchProfileFeatures added in v0.39.0

type SwitchProfileFeatures struct {
	// Subinterfaces defines if switch supports subinterfaces
	Subinterfaces bool `json:"subinterfaces,omitempty"`
	// VXLAN defines if switch supports VXLANs
	VXLAN bool `json:"vxlan,omitempty"`
	// ACLs defines if switch supports ACLs
	ACLs bool `json:"acls,omitempty"`
}

Defines features supported by a specific switch which is later used for roles and Fabric API features usage validation

func (*SwitchProfileFeatures) DeepCopy added in v0.39.0

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

func (*SwitchProfileFeatures) DeepCopyInto added in v0.39.0

func (in *SwitchProfileFeatures) DeepCopyInto(out *SwitchProfileFeatures)

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

type SwitchProfileList

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

SwitchProfileList contains a list of SwitchProfile

func (*SwitchProfileList) DeepCopy

func (in *SwitchProfileList) DeepCopy() *SwitchProfileList

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

func (*SwitchProfileList) DeepCopyInto

func (in *SwitchProfileList) DeepCopyInto(out *SwitchProfileList)

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

func (*SwitchProfileList) DeepCopyObject

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

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

func (*SwitchProfileList) GetItems added in v0.34.0

func (spList *SwitchProfileList) GetItems() []meta.Object

type SwitchProfilePort

type SwitchProfilePort struct {
	// NOSName defines how port is named in the NOS
	NOSName string `json:"nos,omitempty"`
	// BaseNOSName defines the base NOS name that could be used together with the profile to generate the actual NOS name (e.g. breakouts)
	BaseNOSName string `json:"baseNOSName,omitempty"`
	// Label defines the physical port label you can see on the actual switch
	Label string `json:"label,omitempty"`
	// If port isn't directly manageable, group defines the group it belongs to, exclusive with profile
	Group string `json:"group,omitempty"`
	// If port is directly configurable, profile defines the profile it belongs to, exclusive with group
	Profile string `json:"profile,omitempty"`
	// Management defines if port is a management port, it's a special case and it can't have a group or profile
	Management bool `json:"management,omitempty"`
	// OniePortName defines the ONIE port name for management ports only
	OniePortName string `json:"oniePortName,omitempty"`
}

Defines a switch port configuration Only one of Profile or Group can be set

func (*SwitchProfilePort) DeepCopy

func (in *SwitchProfilePort) DeepCopy() *SwitchProfilePort

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

func (*SwitchProfilePort) DeepCopyInto

func (in *SwitchProfilePort) DeepCopyInto(out *SwitchProfilePort)

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

type SwitchProfilePortGroup added in v0.39.0

type SwitchProfilePortGroup struct {
	// NOSName defines how group is named in the NOS
	NOSName string `json:"nos,omitempty"`
	// Profile defines the possible configuration profile for the group, could only have speed profile
	Profile string `json:"profile,omitempty"`
}

Defines a switch port group configuration

func (*SwitchProfilePortGroup) DeepCopy added in v0.39.0

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

func (*SwitchProfilePortGroup) DeepCopyInto added in v0.39.0

func (in *SwitchProfilePortGroup) DeepCopyInto(out *SwitchProfilePortGroup)

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

type SwitchProfilePortProfile added in v0.39.0

type SwitchProfilePortProfile struct {
	// Speed defines the speed configuration for the profile, exclusive with breakout
	Speed *SwitchProfilePortProfileSpeed `json:"speed,omitempty"`
	// Breakout defines the breakout configuration for the profile, exclusive with speed
	Breakout *SwitchProfilePortProfileBreakout `json:"breakout,omitempty"`
}

Defines a switch port profile configuration

func (*SwitchProfilePortProfile) DeepCopy added in v0.39.0

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

func (*SwitchProfilePortProfile) DeepCopyInto added in v0.39.0

func (in *SwitchProfilePortProfile) DeepCopyInto(out *SwitchProfilePortProfile)

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

type SwitchProfilePortProfileBreakout added in v0.39.0

type SwitchProfilePortProfileBreakout struct {
	// Default defines the default breakout mode for the profile
	Default string `json:"default,omitempty"`
	// Supported defines the supported breakout modes for the profile with the NOS name offsets
	Supported map[string]SwitchProfilePortProfileBreakoutMode `json:"supported,omitempty"`
}

Defines a switch port profile breakout configuration

func (*SwitchProfilePortProfileBreakout) DeepCopy added in v0.39.0

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

func (*SwitchProfilePortProfileBreakout) DeepCopyInto added in v0.39.0

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

type SwitchProfilePortProfileBreakoutMode added in v0.39.0

type SwitchProfilePortProfileBreakoutMode struct {
	// Offsets defines the breakout NOS port name offset from the port NOS Name for each breakout mode
	Offsets []string `json:"offsets,omitempty"`
}

Defines a switch port profile breakout mode configuration

func (*SwitchProfilePortProfileBreakoutMode) DeepCopy added in v0.39.0

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

func (*SwitchProfilePortProfileBreakoutMode) DeepCopyInto added in v0.39.0

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

type SwitchProfilePortProfileSpeed added in v0.39.0

type SwitchProfilePortProfileSpeed struct {
	// Default defines the default speed for the profile
	Default string `json:"default,omitempty"`
	// Supported defines the supported speeds for the profile
	Supported []string `json:"supported,omitempty"`
}

Defines a switch port profile speed configuration

func (*SwitchProfilePortProfileSpeed) DeepCopy added in v0.39.0

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

func (*SwitchProfilePortProfileSpeed) DeepCopyInto added in v0.39.0

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

type SwitchProfilePortSummary added in v0.39.4

type SwitchProfilePortSummary struct {
	Name      string
	Label     string
	Type      string
	Group     string
	Default   string
	Supported string
}

func (*SwitchProfilePortSummary) DeepCopy added in v0.39.4

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

func (*SwitchProfilePortSummary) DeepCopyInto added in v0.39.4

func (in *SwitchProfilePortSummary) DeepCopyInto(out *SwitchProfilePortSummary)

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

type SwitchProfileSpec

type SwitchProfileSpec struct {
	// DisplayName defines the human-readable name of the switch
	DisplayName string `json:"displayName,omitempty"`
	// OtherNames defines alternative names for the switch
	OtherNames []string `json:"otherNames,omitempty"`
	// Features defines the features supported by the switch
	Features SwitchProfileFeatures `json:"features,omitempty"`
	// Config defines the switch-specific configuration options
	Config SwitchProfileConfig `json:"config,omitempty"`
	// Ports defines the switch port configuration
	Ports map[string]SwitchProfilePort `json:"ports,omitempty"`
	// PortGroups defines the switch port group configuration
	PortGroups map[string]SwitchProfilePortGroup `json:"portGroups,omitempty"`
	// PortProfiles defines the switch port profile configuration
	PortProfiles map[string]SwitchProfilePortProfile `json:"portProfiles,omitempty"`
}

SwitchProfileSpec defines the desired state of SwitchProfile

func (*SwitchProfileSpec) DeepCopy

func (in *SwitchProfileSpec) DeepCopy() *SwitchProfileSpec

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

func (*SwitchProfileSpec) DeepCopyInto

func (in *SwitchProfileSpec) DeepCopyInto(out *SwitchProfileSpec)

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

func (*SwitchProfileSpec) GetAPI2NOSPortsFor added in v0.39.2

func (sp *SwitchProfileSpec) GetAPI2NOSPortsFor(sw *SwitchSpec) (map[string]string, error)

func (*SwitchProfileSpec) GetAllBreakoutNOSNames added in v0.39.0

func (sp *SwitchProfileSpec) GetAllBreakoutNOSNames() (map[string]bool, error)

func (*SwitchProfileSpec) GetNOS2APIBreakouts added in v0.39.2

func (sp *SwitchProfileSpec) GetNOS2APIBreakouts() (map[string]string, error)

func (*SwitchProfileSpec) GetNOS2APIPortsFor added in v0.39.2

func (sp *SwitchProfileSpec) GetNOS2APIPortsFor(sw *SwitchSpec) (map[string]string, error)

func (*SwitchProfileSpec) GetPortsSummary added in v0.39.4

func (sp *SwitchProfileSpec) GetPortsSummary() ([]SwitchProfilePortSummary, error)

type SwitchProfileStatus

type SwitchProfileStatus struct{}

SwitchProfileStatus defines the observed state of SwitchProfile

func (*SwitchProfileStatus) DeepCopy

func (in *SwitchProfileStatus) DeepCopy() *SwitchProfileStatus

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

func (*SwitchProfileStatus) DeepCopyInto

func (in *SwitchProfileStatus) DeepCopyInto(out *SwitchProfileStatus)

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

type SwitchRedundancy

type SwitchRedundancy struct {
	// Group is the name of the redundancy group switch belongs to
	Group string `json:"group,omitempty"`
	// Type is the type of the redundancy group, could be mclag or eslag
	Type meta.RedundancyType `json:"type,omitempty"`
}

SwitchRedundancy is the switch redundancy configuration which includes name of the redundancy group switch belongs to and its type, used both for MCLAG and ESLAG connections. It defines how redundancy will be configured and handled on the switch as well as which connection types will be available. If not specified, switch will not be part of any redundancy group. If name isn't empty, type must be specified as well and name should be the same as one of the SwitchGroup objects.

func (*SwitchRedundancy) DeepCopy

func (in *SwitchRedundancy) DeepCopy() *SwitchRedundancy

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

func (*SwitchRedundancy) DeepCopyInto

func (in *SwitchRedundancy) DeepCopyInto(out *SwitchRedundancy)

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

type SwitchRole

type SwitchRole string

+kubebuilder:validation:Enum=spine;server-leaf;border-leaf;mixed-leaf;virtual-edge SwitchRole is the role of the switch, could be spine, server-leaf or border-leaf or mixed-leaf

const (
	SwitchRoleSpine       SwitchRole = "spine"
	SwitchRoleServerLeaf  SwitchRole = "server-leaf"
	SwitchRoleBorderLeaf  SwitchRole = "border-leaf"
	SwitchRoleMixedLeaf   SwitchRole = "mixed-leaf"
	SwitchRoleVirtualEdge SwitchRole = "virtual-edge"
)

func (SwitchRole) IsLeaf

func (r SwitchRole) IsLeaf() bool

func (SwitchRole) IsSpine

func (r SwitchRole) IsSpine() bool

func (SwitchRole) IsVirtualEdge

func (r SwitchRole) IsVirtualEdge() bool

type SwitchSpec

type SwitchSpec struct {
	// +kubebuilder:validation:Required
	// Role is the role of the switch, could be spine, server-leaf or border-leaf or mixed-leaf
	Role SwitchRole `json:"role,omitempty"`
	// Description is a description of the switch
	Description string `json:"description,omitempty"`
	// Profile is the profile of the switch, name of the SwitchProfile object to be used for this switch, currently not used by the Fabric
	Profile string `json:"profile,omitempty"`
	// Location is the location of the switch, it is used to generate the location UUID and location signature
	Location Location `json:"location,omitempty"`
	// LocationSig is the location signature for the switch
	LocationSig LocationSig `json:"locationSig,omitempty"`
	// Groups is a list of switch groups the switch belongs to
	Groups []string `json:"groups,omitempty"`
	// Redundancy is the switch redundancy configuration including name of the redundancy group switch belongs to and its type, used both for MCLAG and ESLAG connections
	Redundancy SwitchRedundancy `json:"redundancy,omitempty"`
	// VLANNamespaces is a list of VLAN namespaces the switch is part of, their VLAN ranges could not overlap
	VLANNamespaces []string `json:"vlanNamespaces,omitempty"`
	// ASN is the ASN of the switch
	ASN uint32 `json:"asn,omitempty"`
	// IP is the IP of the switch that could be used to access it from other switches and control nodes in the Fabric
	IP string `json:"ip,omitempty"`
	// VTEPIP is the VTEP IP of the switch
	VTEPIP string `json:"vtepIP,omitempty"`
	// ProtocolIP is used as BGP Router ID for switch configuration
	ProtocolIP string `json:"protocolIP,omitempty"`
	// PortGroupSpeeds is a map of port group speeds, key is the port group name, value is the speed, such as '"2": 10G'
	PortGroupSpeeds map[string]string `json:"portGroupSpeeds,omitempty"`
	// PortSpeeds is a map of port speeds, key is the port name, value is the speed
	PortSpeeds map[string]string `json:"portSpeeds,omitempty"`
	// PortBreakouts is a map of port breakouts, key is the port name, value is the breakout configuration, such as "1/55: 4x25G"
	PortBreakouts map[string]string `json:"portBreakouts,omitempty"`
}

SwitchSpec defines the desired state of Switch

func (*SwitchSpec) DeepCopy

func (in *SwitchSpec) DeepCopy() *SwitchSpec

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

func (*SwitchSpec) DeepCopyInto

func (in *SwitchSpec) DeepCopyInto(out *SwitchSpec)

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

type SwitchStatus

type SwitchStatus struct {
}

SwitchStatus defines the observed state of Switch

func (*SwitchStatus) DeepCopy

func (in *SwitchStatus) DeepCopy() *SwitchStatus

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

func (*SwitchStatus) DeepCopyInto

func (in *SwitchStatus) DeepCopyInto(out *SwitchStatus)

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

type SwitchToSwitchLink struct {
	// Switch1 is the first switch side of the connection
	Switch1 BasePortName `json:"switch1,omitempty"`
	// Switch2 is the second switch side of the connection
	Switch2 BasePortName `json:"switch2,omitempty"`
}

SwitchToSwitchLink defines the switch-to-switch link

func (*SwitchToSwitchLink) DeepCopy

func (in *SwitchToSwitchLink) DeepCopy() *SwitchToSwitchLink

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

func (*SwitchToSwitchLink) DeepCopyInto

func (in *SwitchToSwitchLink) DeepCopyInto(out *SwitchToSwitchLink)

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

type VLANNamespace

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

	// Spec is the desired state of the VLANNamespace
	Spec VLANNamespaceSpec `json:"spec,omitempty"`
	// Status is the observed state of the VLANNamespace
	Status VLANNamespaceStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=hedgehog;wiring;fabric,shortName=vlanns +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,priority=0 VLANNamespace is the Schema for the vlannamespaces API

func (*VLANNamespace) DeepCopy

func (in *VLANNamespace) DeepCopy() *VLANNamespace

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

func (*VLANNamespace) DeepCopyInto

func (in *VLANNamespace) DeepCopyInto(out *VLANNamespace)

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

func (*VLANNamespace) DeepCopyObject

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

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

func (*VLANNamespace) Default

func (ns *VLANNamespace) Default()

func (*VLANNamespace) Validate

func (ns *VLANNamespace) Validate(_ context.Context, _ client.Reader, fabricCfg *meta.FabricConfig) (admission.Warnings, error)

type VLANNamespaceList

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

VLANNamespaceList contains a list of VLANNamespace

func (*VLANNamespaceList) DeepCopy

func (in *VLANNamespaceList) DeepCopy() *VLANNamespaceList

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

func (*VLANNamespaceList) DeepCopyInto

func (in *VLANNamespaceList) DeepCopyInto(out *VLANNamespaceList)

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

func (*VLANNamespaceList) DeepCopyObject

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

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

func (*VLANNamespaceList) GetItems added in v0.34.0

func (nsList *VLANNamespaceList) GetItems() []meta.Object

type VLANNamespaceSpec

type VLANNamespaceSpec struct {
	//+kubebuilder:validation:MinItems=1
	//+kubebuilder:validation:MaxItems=20
	// Ranges is a list of VLAN ranges to be used in this namespace, couldn't overlap between each other and with Fabric reserved VLAN ranges
	Ranges []meta.VLANRange `json:"ranges,omitempty"`
}

VLANNamespaceSpec defines the desired state of VLANNamespace

func (*VLANNamespaceSpec) Contains

func (ns *VLANNamespaceSpec) Contains(vlan uint16) bool

func (*VLANNamespaceSpec) DeepCopy

func (in *VLANNamespaceSpec) DeepCopy() *VLANNamespaceSpec

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

func (*VLANNamespaceSpec) DeepCopyInto

func (in *VLANNamespaceSpec) DeepCopyInto(out *VLANNamespaceSpec)

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

func (*VLANNamespaceSpec) Labels

func (ns *VLANNamespaceSpec) Labels() map[string]string

type VLANNamespaceStatus

type VLANNamespaceStatus struct{}

VLANNamespaceStatus defines the observed state of VLANNamespace

func (*VLANNamespaceStatus) DeepCopy

func (in *VLANNamespaceStatus) DeepCopy() *VLANNamespaceStatus

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

func (*VLANNamespaceStatus) DeepCopyInto

func (in *VLANNamespaceStatus) DeepCopyInto(out *VLANNamespaceStatus)

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