types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Name                 string
	LogLevel             string
	Loopback             string
	ASN                  uint32
	Ports                Ports
	MetalCoreCIDR        string
	AdditionalBridgeVIDs []string
}

Conf holds the switch configuration nolint:musttag

func (*Conf) CapitalizeVrfName added in v0.9.0

func (c *Conf) CapitalizeVrfName()

CapitalizeVrfName capitalizes VRF names, which is requirement for SONiC

func (*Conf) FillRouteMapsAndIPPrefixLists

func (c *Conf) FillRouteMapsAndIPPrefixLists()

func (*Conf) FillVLANIDs

func (c *Conf) FillVLANIDs(m vlan.Mapping) error

FillVLANIDs fills the given configuration object with switch-local VLAN-IDs if they are present in the given VLAN-Mapping otherwise: new available VLAN-IDs will be used

type Filter

type Filter struct {
	IPPrefixLists []IPPrefixList
	RouteMaps     []RouteMap
}

func (*Filter) Assemble

func (s *Filter) Assemble(rmPrefix string, vnis, cidrs []string)

type Firewall

type Firewall struct {
	Filter
	Port  string
	Cidrs []string
	Vnis  []string
}

type IPPrefixList

type IPPrefixList struct {
	Name string
	Spec string
}

IPPrefixList represents 'ip prefix-list' filtering mechanism to be used in combination with route-maps.

type Nic

type Nic struct {
	AddressCIDR string
	Gateway     string
}

Nic holds the configuration for a network interface

type Ports

type Ports struct {
	Eth0          Nic
	Underlay      []string
	Unprovisioned []string
	BladePorts    []string
	Vrfs          map[string]*Vrf
	Firewalls     map[string]*Firewall
}

type RouteMap

type RouteMap struct {
	Name    string
	Entries []string
	Policy  string
	Order   int
}

RouteMap represents a route-map to permit or deny routes.

type Vrf

type Vrf struct {
	Filter
	VNI       uint32
	VLANID    uint16
	Neighbors []string
	Cidrs     []string
}

Tenant holds the switch configuration for a specific tenant

Jump to

Keyboard shortcuts

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