frr

package
v0.1.12-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FRR_UNIT        = "frr.service"
	FRR_PERMISSIONS = fs.FileMode(0640)
)
View Source
var (
	VRF_TPL          = mustParse("vrf", VRF_RAW_TPL)
	ROUTE_MAP_TPL    = mustParse("route-map", ROUTE_MAP_RAW_TPL)
	PREFIX_LIST_TPL  = mustParse("prefix-list", PREFIX_LIST_RAW_TPL)
	NEIGHBOR_TPL     = mustParse("neighbor", NEIGHBOR_RAW_TPL)
	NEIGHBOR_V4_TPL  = mustParse("neighborv4", NEIGHBOR_V4_RAW_TPL)
	NEIGHBOR_V6_TPL  = mustParse("neighborv6", NEIGHBOR_V6_RAW_TPL)
	BGP_INSTANCE_TPL = mustParse("bgpinstance", BGP_INSTANCE_RAW_TPL)
)
View Source
var BGP_INSTANCE_RAW_TPL string

Template for VRF BGP instance

View Source
var NEIGHBOR_RAW_TPL string

Template for bgp neighbor

View Source
var NEIGHBOR_V4_RAW_TPL string

Template for bgp v4 neighbor

View Source
var NEIGHBOR_V6_RAW_TPL string

Template for bgp v4 neighbor

View Source
var PREFIX_LIST_RAW_TPL string

Template for ip prefix-list

View Source
var ROUTE_MAP_RAW_TPL string

Template for route-maps

View Source
var (
	VRF_ASN_CONFIG = 4200065169
)
View Source
var VRF_RAW_TPL string

Template for VRF config

Functions

This section is empty.

Types

type FRRConfiguration

type FRRConfiguration struct {
	ASN  int
	VRFs []VRFConfiguration
}

type FRRManager

type FRRManager struct {
	ConfigPath   string
	TemplatePath string
	// contains filtered or unexported fields
}

func NewFRRManager

func NewFRRManager() *FRRManager

func (*FRRManager) Configure

func (m *FRRManager) Configure(in FRRConfiguration) (bool, error)

func (*FRRManager) Init

func (m *FRRManager) Init() error

func (*FRRManager) ReloadFRR

func (m *FRRManager) ReloadFRR() error

type FRRTemplateConfig

type FRRTemplateConfig struct {
	VRFs        string
	Neighbors   string
	NeighborsV4 string
	NeighborsV6 string
	BGP         string
	PrefixLists string
	RouteMaps   string

	Hostname         string
	UnderlayRouterID string
	HostRouterID     string
}

type PrefixList

type PrefixList struct {
	Items     []PrefixedRouteItem
	Seq       int
	Community *int
}

type PrefixedRouteItem

type PrefixedRouteItem struct {
	CIDR   net.IPNet
	IPv6   bool
	Seq    int
	Action string
	GE     *int
	LE     *int
}

type VRFConfiguration

type VRFConfiguration struct {
	Name          string
	VNI           int
	RT            string
	AggregateIPv4 []string
	AggregateIPv6 []string
	Import        []PrefixList
	Export        []PrefixList
}

func (VRFConfiguration) ShouldDefineRT

func (v VRFConfiguration) ShouldDefineRT() bool

func (VRFConfiguration) ShouldTemplateVRF

func (v VRFConfiguration) ShouldTemplateVRF() bool

Jump to

Keyboard shortcuts

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