Documentation ¶
Index ¶
- func BGPNeighborshipHasState(frrPod *pod.Builder, neighborIPAddress string, state string) (bool, error)
- func DefineBGPConfig(localBGPASN, remoteBGPASN int, neighborsIPAddresses []string, ...) string
- func DefineBGPConfigWithStaticRouteAndNetwork(localBGPASN, remoteBGPASN int, ...) string
- func DefineBaseConfig(daemonsConfig, frrConfig, vtyShConfig string) map[string]string
- func FetchBGPConnectTimeValue(frrk8sPods []*pod.Builder, bgpPeerIP string) (int, error)
- func GetBGPAdvertisedRoutes(frrPod *pod.Builder, nodeIPs []string) (map[string]string, error)
- func GetBGPCommunityStatus(frrPod *pod.Builder, ipProtocolVersion string) (*bgpStatus, error)
- func GetBGPStatus(frrPod *pod.Builder, protocolVersion string, containerName ...string) (*bgpStatus, error)
- func GetMetricsByPrefix(frrPod *pod.Builder, metricPrefix string) ([]string, error)
- func IsProtocolConfigured(frrPod *pod.Builder, protocol string) (bool, error)
- func ResetBGPConnection(frrPod *pod.Builder) error
- func SetStaticRoute(frrPod *pod.Builder, action, destIP string, nextHopMap map[string]string) (string, error)
- func ValidateBGPRemoteAS(frrk8sPods []*pod.Builder, bgpPeerIP string, expectedRemoteAS int) error
- func VerifyBGPReceivedRoutesOnFrrNodes(frrk8sPods []*pod.Builder) (string, error)
- type BGPConnectionInfo
- type BgpAdvertisedRoutes
- type BgpReceivedRoutes
- type Nexthop
- type RouteInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BGPNeighborshipHasState ¶
func BGPNeighborshipHasState(frrPod *pod.Builder, neighborIPAddress string, state string) (bool, error)
BGPNeighborshipHasState verifies that BGP session on a pod has given state.
func DefineBGPConfig ¶
func DefineBGPConfig(localBGPASN, remoteBGPASN int, neighborsIPAddresses []string, multiHop, bfd bool) string
DefineBGPConfig returns string which represents BGP config file peering to all given IP addresses.
func DefineBGPConfigWithStaticRouteAndNetwork ¶
func DefineBGPConfigWithStaticRouteAndNetwork(localBGPASN, remoteBGPASN int, hubPodIPs, advertisedIPv4Routes, advertisedIPv6Routes, neighborsIPAddresses []string, multiHop, bfd bool) string
DefineBGPConfigWithStaticRouteAndNetwork defines BGP config file with static route and network.
func DefineBaseConfig ¶
DefineBaseConfig defines minimal required FRR configuration.
func FetchBGPConnectTimeValue ¶
FetchBGPConnectTimeValue fetches and returns the ConnectRetryTimer value for the specified BGP peer.
func GetBGPAdvertisedRoutes ¶
GetBGPAdvertisedRoutes retrieves the routes advertised from the external frr pod to the frr nodes.
func GetBGPCommunityStatus ¶
GetBGPCommunityStatus returns bgp community status from frr pod.
func GetBGPStatus ¶
func GetBGPStatus(frrPod *pod.Builder, protocolVersion string, containerName ...string) (*bgpStatus, error)
GetBGPStatus returns bgp status output from frr pod.
func GetMetricsByPrefix ¶
GetMetricsByPrefix pulls all metrics from frr pods and sort them in the list by given prefix.
func IsProtocolConfigured ¶
IsProtocolConfigured verifies that given protocol is set in frr config.
func ResetBGPConnection ¶
ResetBGPConnection restarts the TCP connection.
func SetStaticRoute ¶
func SetStaticRoute(frrPod *pod.Builder, action, destIP string, nextHopMap map[string]string) (string, error)
SetStaticRoute could set or delete static route on all Speaker pods.
func ValidateBGPRemoteAS ¶
ValidateBGPRemoteAS validates the remoteAS value for the specified BGP peer across all FRR pods.
Types ¶
type BGPConnectionInfo ¶
type BGPConnectionInfo struct { ConnectRetryTimer int `json:"connectRetryTimer"` RemoteAS int `json:"remoteAS"` }
BGPConnectionInfo struct includes the connectRetryTimer.
type BgpAdvertisedRoutes ¶
type BgpAdvertisedRoutes struct { BGPTableVersion int `json:"bgpTableVersion"` BGPLocalRouterID string `json:"bgpLocalRouterId"` DefaultLocPrf int `json:"defaultLocPrf"` LocalAS int `json:"localAS"` AdvertisedRoutes map[string]advertisedRoute `json:"advertisedRoutes"` }
BgpAdvertisedRoutes creates struct from json output.
type BgpReceivedRoutes ¶
BgpReceivedRoutes struct includes Routes map.
type Nexthop ¶
type Nexthop struct { Flags int `json:"flags"` Fib bool `json:"fib"` IP string `json:"ip"` Afi string `json:"afi"` InterfaceIndex int `json:"interfaceIndex"` InterfaceName string `json:"interfaceName"` Active bool `json:"active"` Weight int `json:"weight"` }
Nexthop struct includes nexthop route info.