config

package
v0.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkipVrfTemplateVni = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	VTEPLoopbackIP     string     `yaml:"vtepLoopbackIP"`
	TrunkInterfaceName string     `yaml:"trunkInterfaceName"`
	ExportCIDRs        []string   `yaml:"exportCIDRs"`
	ManagementVRF      BaseVRF    `yaml:"managementVRF"`
	ClusterVRF         BaseVRF    `yaml:"clusterVRF"`
	LocalASN           int        `yaml:"localASN"`
	UnderlayNeighbors  []Neighbor `yaml:"underlayNeighbors"`
	ClusterNeighbors   []Neighbor `yaml:"clusterNeighbors"`
}

func LoadBaseConfig

func LoadBaseConfig(path string) (*BaseConfig, error)

type BaseVRF

type BaseVRF struct {
	Name            string `yaml:"name"`
	VNI             int    `yaml:"vni"`
	EVPNRouteTarget string `yaml:"evpnRouteTarget"`
}

type Config

type Config struct {
	VRFToVNI  map[string]int       `yaml:"vnimap"`
	VRFConfig map[string]VRFConfig `yaml:"vrfConfig"`
}

func LoadConfig

func LoadConfig() (*Config, error)

func (*Config) GetVNIAndRT

func (c *Config) GetVNIAndRT(vrf string) (int, string, error)

func (*Config) ReloadConfig added in v0.2.0

func (c *Config) ReloadConfig() error

type Neighbor

type Neighbor struct {
	IP        *string `yaml:"ip"`
	Interface *string `yaml:"interface"`

	UpdateSource *string `yaml:"updateSource"`

	RemoteASN string  `yaml:"remoteASN"`
	LocalASN  *string `yaml:"localASN"`

	KeepaliveTime int `yaml:"keepaliveTime"`
	HoldTime      int `yaml:"holdTime"`

	BFDMinTimer *int `yaml:"bfdMinTimer"`

	IPv4 bool `yaml:"ipv4"`
	IPv6 bool `yaml:"ipv6"`
	EVPN bool `yaml:"evpn"`
}

type VRFConfig

type VRFConfig struct {
	VNI int    `yaml:"vni"`
	RT  string `yaml:"rt"`
}

Jump to

Keyboard shortcuts

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