Documentation
¶
Index ¶
- Constants
- type L2DaemonsetMode
- type L2DiscoveryConfig
- func (config *L2DiscoveryConfig) DiscoverL2Connectivity(ptpInterfacesOnly bool) error
- func (config *L2DiscoveryConfig) GetL2DiscoveryConfig(ptpInterfacesOnly bool) (L2Info, error)
- func (config *L2DiscoveryConfig) GetLANs() *[][]int
- func (config *L2DiscoveryConfig) GetPortsGettingPTP() []*l2.PtpIf
- func (config *L2DiscoveryConfig) GetPtpIfList() []*l2.PtpIf
- func (config *L2DiscoveryConfig) GetPtpIfListUnfiltered() map[string]*l2.PtpIf
- func (config *L2DiscoveryConfig) InitSkippedInterfaces()
- func (config *L2DiscoveryConfig) PrintAllNICs()
- func (config *L2DiscoveryConfig) SetL2Client(k8sClient kubernetes.Interface, restClient *rest.Config)
- type L2Info
Constants ¶
View Source
const ( ExperimentalEthertype = "88b5" PtpEthertype = "88f7" LocalInterfaces = "0000" L2DaemonsetManagedString = "MANAGED" L2DaemonsetPreConfiguredString = "PRECONFIGURED" L2DiscoveryDsName = "l2discovery" L2DiscoveryNsName = "l2discovery" L2DiscoveryContainerName = "l2discovery" L2DiscoveryDuration = time.Second * 15 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L2DaemonsetMode ¶
type L2DaemonsetMode int64
const ( // In managed mode, the L2 Topology discovery Daemonset is created by the conformance suite Managed L2DaemonsetMode = iota // In pre-configured mode, the L2 topology daemonset is pre-configured by the user in the cluster PreConfigured )
func StringToL2Mode ¶
func StringToL2Mode(aString string) L2DaemonsetMode
func (L2DaemonsetMode) String ¶
func (mode L2DaemonsetMode) String() string
type L2DiscoveryConfig ¶
type L2DiscoveryConfig struct { // Map of L2 topology as discovered by L2 discovery mechanism DiscoveryMap map[string]map[string]map[string]*l2.Neighbors // L2 topology graph created from discovery map. This is the main internal graph L2ConnectivityMap *graph.Mutable // Max size of graph MaxL2GraphSize int // list of cluster interfaces indexed with a simple integer (X) for readability in the graph PtpIfList []*l2.PtpIf // list of unfiltered cluster interfaces indexed with a simple integer (X) for readability in the graph PtpIfListUnfiltered map[string]*l2.PtpIf // list of L2discovery daemonset pods L2DiscoveryPods map[string]*v1core.Pod // Mapping between clusterwide interface index and Mac address ClusterMacs map[l2.IfClusterIndex]string // Mapping between clusterwide interface index and a simple integer (X) for readability in the graph ClusterIndexToInt map[l2.IfClusterIndex]int // Mapping between a cluster wide MAC address and a simple integer (X) for readability in the graph ClusterMacToInt map[string]int // Mapping between a Mac address and a cluster wide interface index ClusterIndexes map[string]l2.IfClusterIndex // indicates whether the L2discovery daemonset is created by the test suite (managed) or not L2DsMode L2DaemonsetMode // LANs identified in the graph LANs *[][]int // List of port receiving PTP frames (assuming valid GM signal received) PortsGettingPTP []*l2.PtpIf // interfaces to avoid when running the tests SkippedInterfaces []string // contains filtered or unexported fields }
var GlobalL2DiscoveryConfig L2DiscoveryConfig
func (*L2DiscoveryConfig) DiscoverL2Connectivity ¶
func (config *L2DiscoveryConfig) DiscoverL2Connectivity(ptpInterfacesOnly bool) error
Discovers the L2 connectivity using l2discovery daemonset
func (*L2DiscoveryConfig) GetL2DiscoveryConfig ¶
func (config *L2DiscoveryConfig) GetL2DiscoveryConfig(ptpInterfacesOnly bool) (L2Info, error)
Gets existing L2 configuration or creates a new one (if refresh is set to true)
func (*L2DiscoveryConfig) GetLANs ¶
func (config *L2DiscoveryConfig) GetLANs() *[][]int
func (*L2DiscoveryConfig) GetPortsGettingPTP ¶
func (config *L2DiscoveryConfig) GetPortsGettingPTP() []*l2.PtpIf
func (*L2DiscoveryConfig) GetPtpIfList ¶
func (config *L2DiscoveryConfig) GetPtpIfList() []*l2.PtpIf
func (*L2DiscoveryConfig) GetPtpIfListUnfiltered ¶ added in v0.0.4
func (config *L2DiscoveryConfig) GetPtpIfListUnfiltered() map[string]*l2.PtpIf
func (*L2DiscoveryConfig) InitSkippedInterfaces ¶ added in v0.0.3
func (config *L2DiscoveryConfig) InitSkippedInterfaces()
retrieves interfaces to skip in the cluster
func (*L2DiscoveryConfig) PrintAllNICs ¶
func (config *L2DiscoveryConfig) PrintAllNICs()
Print database with all NICs
func (*L2DiscoveryConfig) SetL2Client ¶
func (config *L2DiscoveryConfig) SetL2Client(k8sClient kubernetes.Interface, restClient *rest.Config)
type L2Info ¶
type L2Info interface { // list of cluster interfaces indexed with a simple integer (X) for readability in the graph GetPtpIfList() []*l2.PtpIf // list of unfiltered cluster interfaces indexed with a simple integer (X) for readability in the graph GetPtpIfListUnfiltered() map[string]*l2.PtpIf // LANs identified in the graph GetLANs() *[][]int // List of port receiving PTP frames (assuming valid GM signal received) GetPortsGettingPTP() []*l2.PtpIf SetL2Client(kubernetes.Interface, *rest.Config) GetL2DiscoveryConfig(ptpInterfacesOnly bool) (config L2Info, err error) }
Click to show internal directories.
Click to hide internal directories.