afthelper

package
v0.0.0-...-800520f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package afthelper provides helper functions for handling the OpenConfig AFT schema.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextHopAddrsForPrefix

func NextHopAddrsForPrefix(rib map[string]*aft.RIB, netinst, prefix string) (map[string]*NextHopSummary, error)

NextHopAddrsForPrefix unrolls the prefix specified within the network-instance netInst from the specified ribs. It returns a map of next-hop IP address to a summary of the resolved next-hop.

TODO(robjs): support recursion.

Types

type NextHopSummary

type NextHopSummary struct {
	// Weight is the share of traffic that the next-hop gets.
	Weight uint64 `json:"weight"`
	// Address is the IP address of the next-hop.
	Address string `json:"address"`
	// NetworkInstance is the network instance within which the address was resolved.
	NetworkInstance string `json:"network-instance"`
}

NextHopSummary provides a summary of an next-hop for a particular entry.

Jump to

Keyboard shortcuts

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