v1beta1

package
v0.52.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1beta1 contains API Schema definitions for the wiring v1beta1 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"
	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: "v1beta1"}

	// 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")
	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 ComparePortNames

func ComparePortNames(a, b string) int

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

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

func MatchingLabelsForSwitchGroup(groupName string) client.MatchingLabels

func SortPortNames

func SortPortNames(portNames []string)

func SplitPortName

func SplitPortName(name string) []string

func ValidatePortBreakoutMode

func ValidatePortBreakoutMode(mode string) error

func ValidatePortSpeed

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 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

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"`
	// 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) LinkSummary

func (connSpec *ConnectionSpec) LinkSummary(noColor bool) []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 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) 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

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

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 {
	// 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.

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 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 SwitchBoot

type SwitchBoot struct {
	// Identify switch by serial number
	Serial string `json:"serial,omitempty"`
	// Identify switch by MAC address of the management port
	MAC string `json:"mac,omitempty"`
}

func (*SwitchBoot) DeepCopy

func (in *SwitchBoot) DeepCopy() *SwitchBoot

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

func (*SwitchBoot) DeepCopyInto

func (in *SwitchBoot) DeepCopyInto(out *SwitchBoot)

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

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

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

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

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

func (in *SwitchProfileConfig) DeepCopy() *SwitchProfileConfig

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

func (*SwitchProfileConfig) DeepCopyInto

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

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

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

func (*SwitchProfileFeatures) DeepCopyInto

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

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

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

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

func (*SwitchProfilePortGroup) DeepCopyInto

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

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"`
	// AutoNegAllowed defines if configuring auto-negotiation is allowed for the port
	AutoNegAllowed bool `json:"autoNegAllowed,omitempty"`
	// AutoNegDefault defines the default auto-negotiation state for the port
	AutoNegDefault bool `json:"autoNegDefault,omitempty"`
}

Defines a switch port profile configuration

func (*SwitchProfilePortProfile) DeepCopy

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

func (*SwitchProfilePortProfile) DeepCopyInto

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

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

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

func (*SwitchProfilePortProfileBreakout) DeepCopyInto

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

type SwitchProfilePortProfileBreakoutMode

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

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

func (*SwitchProfilePortProfileBreakoutMode) DeepCopyInto

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

type SwitchProfilePortProfileSpeed

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

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

func (*SwitchProfilePortProfileSpeed) DeepCopyInto

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

type SwitchProfilePortSummary

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

func (*SwitchProfilePortSummary) DeepCopy

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

func (*SwitchProfilePortSummary) DeepCopyInto

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"`
	// NOSType defines the NOS type to be used for the switch
	NOSType meta.NOSType `json:"nosType,omitempty"`
	// Platform is what expected to be request by ONIE and displayed in the NOS
	Platform string `json:"platform,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

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

func (*SwitchProfileSpec) GetAllBreakoutNOSNames

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

func (*SwitchProfileSpec) GetAutoNegsDefaultsFor

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

func (*SwitchProfileSpec) GetNOS2APIBreakouts

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

func (*SwitchProfileSpec) GetNOS2APIPortsFor

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

func (*SwitchProfileSpec) GetPortsSummary

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"`
	// 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"`
	// PortAutoNegs is a map of port auto negotiation, key is the port name, value is true or false
	PortAutoNegs map[string]bool `json:"portAutoNegs,omitempty"`
	// Boot is the boot/provisioning information of the switch
	Boot SwitchBoot `json:"boot,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

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