Documentation
¶
Index ¶
- func DeriveAddresses(cfg *network.Config) (underlayIP, overlayIP, bridgeMAC string, err error)
- func DeriveBridgeMAC(ipmiMAC string) string
- func DeriveIPFromOffset(sourceIP, sourceSubnet, targetSubnet string) (string, error)
- func RenderConfig(cfg *network.Config, underlayIP, overlayIP string, nics []string) (string, error)
- type Commander
- type ExecCommander
- type FRRConfigBuilder
- func (b *FRRConfigBuilder) Build() string
- func (b *FRRConfigBuilder) WithAddressFamily(afi, safi string) *FRRConfigBuilder
- func (b *FRRConfigBuilder) WithBFDProfile(name string, transmitMS, receiveMS uint32) *FRRConfigBuilder
- func (b *FRRConfigBuilder) WithBGPTimers(keepalive, hold uint32) *FRRConfigBuilder
- func (b *FRRConfigBuilder) WithNICs(nics []string) *FRRConfigBuilder
- func (b *FRRConfigBuilder) WithOnefabric(dcgwIPs []string, aggregate, vpnRT string) *FRRConfigBuilder
- func (b *FRRConfigBuilder) WithVRF(name string, tableID uint32) *FRRConfigBuilder
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveAddresses ¶
DeriveAddresses computes underlay IP, overlay IP, and bridge MAC from IPMI information and network configuration.
func DeriveBridgeMAC ¶
DeriveBridgeMAC creates a locally-administered MAC from the IPMI MAC.
func DeriveIPFromOffset ¶
DeriveIPFromOffset calculates a target IP by applying the host offset from sourceIP within sourceSubnet to targetSubnet.
Types ¶
type FRRConfigBuilder ¶
type FRRConfigBuilder struct {
// contains filtered or unexported fields
}
FRRConfigBuilder constructs an FRR configuration programmatically. Methods can be called in any order; Build() emits sections in canonical FRR order regardless.
func NewFRRConfigBuilder ¶
func NewFRRConfigBuilder(asn uint32, routerID string) *FRRConfigBuilder
NewFRRConfigBuilder creates a new builder with required BGP ASN and router-id.
func (*FRRConfigBuilder) Build ¶
func (b *FRRConfigBuilder) Build() string
Build generates the complete FRR configuration string. Sections are emitted in canonical FRR order.
func (*FRRConfigBuilder) WithAddressFamily ¶
func (b *FRRConfigBuilder) WithAddressFamily(afi, safi string) *FRRConfigBuilder
WithAddressFamily adds a BGP address-family (e.g. "ipv4"/"unicast", "l2vpn"/"evpn").
func (*FRRConfigBuilder) WithBFDProfile ¶
func (b *FRRConfigBuilder) WithBFDProfile(name string, transmitMS, receiveMS uint32) *FRRConfigBuilder
WithBFDProfile adds a named BFD profile with transmit/receive intervals.
func (*FRRConfigBuilder) WithBGPTimers ¶
func (b *FRRConfigBuilder) WithBGPTimers(keepalive, hold uint32) *FRRConfigBuilder
WithBGPTimers sets BGP keepalive and hold timers (seconds). If zero, FRR datacenter defaults are used (3s/9s).
func (*FRRConfigBuilder) WithNICs ¶
func (b *FRRConfigBuilder) WithNICs(nics []string) *FRRConfigBuilder
WithNICs configures interfaces as BGP unnumbered peers in the peer-group.
func (*FRRConfigBuilder) WithOnefabric ¶
func (b *FRRConfigBuilder) WithOnefabric(dcgwIPs []string, aggregate, vpnRT string) *FRRConfigBuilder
WithOnefabric enables onefabric mode with DCGW peering, route aggregation, and VPN RT.
func (*FRRConfigBuilder) WithVRF ¶
func (b *FRRConfigBuilder) WithVRF(name string, tableID uint32) *FRRConfigBuilder
WithVRF sets VRF name and routing table ID.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles FRR/EVPN network setup and teardown.
func (*Manager) DumpFRRState ¶
func (m *Manager) DumpFRRState()
DumpFRRState logs FRR diagnostic state via the commander abstraction. Called on FRR setup failure or connectivity timeout to capture BGP/EVPN state.