Documentation
¶
Overview ¶
Package vppcalls contains wrappers over VPP binary APIs for bridge-domains, and L2 FIBs and XConnect pairs and helpers for dumping them.
Index ¶
- type BridgeDomainDetails
- type BridgeDomainMeta
- type BridgeDomainVppAPI
- type BridgeDomainVppHandler
- func (h *BridgeDomainVppHandler) AddArpTerminationTableEntry(bdID uint32, mac string, ip string) error
- func (h *BridgeDomainVppHandler) AddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomain) error
- func (h *BridgeDomainVppHandler) AddInterfaceToBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
- func (h *BridgeDomainVppHandler) DeleteBridgeDomain(bdIdx uint32) error
- func (h *BridgeDomainVppHandler) DeleteInterfaceFromBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
- func (h *BridgeDomainVppHandler) DumpBridgeDomains() ([]*BridgeDomainDetails, error)
- func (h *BridgeDomainVppHandler) RemoveArpTerminationTableEntry(bdID uint32, mac string, ip string) error
- type BridgeDomainVppRead
- type BridgeDomainVppWrite
- type FIBVppAPI
- type FIBVppHandler
- type FIBVppRead
- type FIBVppWrite
- type FibMeta
- type FibTableDetails
- type XConnectDetails
- type XConnectVppAPI
- type XConnectVppHandler
- type XConnectVppRead
- type XConnectVppWrite
- type XcMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeDomainDetails ¶ added in v1.8.1
type BridgeDomainDetails struct {
Bd *l2nb.BridgeDomain `json:"bridge_domain"`
Meta *BridgeDomainMeta `json:"bridge_domain_meta"`
}
BridgeDomainDetails is the wrapper structure for the bridge domain northbound API structure. NOTE: Interfaces in BridgeDomains_BridgeDomain is overridden by the local Interfaces member.
type BridgeDomainMeta ¶ added in v1.8.1
type BridgeDomainMeta struct {
BdID uint32 `json:"bridge_domain_id"`
}
BridgeDomainMeta contains bridge domain interface name/index map
type BridgeDomainVppAPI ¶ added in v1.8.1
type BridgeDomainVppAPI interface {
BridgeDomainVppWrite
BridgeDomainVppRead
}
BridgeDomainVppAPI provides methods for managing bridge domains.
type BridgeDomainVppHandler ¶ added in v1.8.1
type BridgeDomainVppHandler struct {
// contains filtered or unexported fields
}
BridgeDomainVppHandler is accessor for bridge domain-related vppcalls methods.
func NewBridgeDomainVppHandler ¶ added in v1.8.1
func NewBridgeDomainVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *BridgeDomainVppHandler
NewBridgeDomainVppHandler creates new instance of bridge domain vppcalls handler.
func (*BridgeDomainVppHandler) AddArpTerminationTableEntry ¶
func (h *BridgeDomainVppHandler) AddArpTerminationTableEntry(bdID uint32, mac string, ip string) error
AddArpTerminationTableEntry creates ARP termination entry for bridge domain.
func (*BridgeDomainVppHandler) AddBridgeDomain ¶
func (h *BridgeDomainVppHandler) AddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomain) error
AddBridgeDomain adds new bridge domain.
func (*BridgeDomainVppHandler) AddInterfaceToBridgeDomain ¶
func (h *BridgeDomainVppHandler) AddInterfaceToBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
AddInterfaceToBridgeDomain puts interface into bridge domain.
func (*BridgeDomainVppHandler) DeleteBridgeDomain ¶
func (h *BridgeDomainVppHandler) DeleteBridgeDomain(bdIdx uint32) error
DeleteBridgeDomain removes existing bridge domain.
func (*BridgeDomainVppHandler) DeleteInterfaceFromBridgeDomain ¶
func (h *BridgeDomainVppHandler) DeleteInterfaceFromBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
DeleteInterfaceFromBridgeDomain removes interface from bridge domain.
func (*BridgeDomainVppHandler) DumpBridgeDomains ¶ added in v1.8.1
func (h *BridgeDomainVppHandler) DumpBridgeDomains() ([]*BridgeDomainDetails, error)
DumpBridgeDomains implements bridge domain handler.
type BridgeDomainVppRead ¶ added in v1.8.1
type BridgeDomainVppRead interface {
// DumpBridgeDomains dumps VPP bridge domain data into the northbound API data structure
// map indexed by bridge domain ID.
DumpBridgeDomains() ([]*BridgeDomainDetails, error)
}
BridgeDomainVppRead provides read methods for bridge domains.
type BridgeDomainVppWrite ¶ added in v1.8.1
type BridgeDomainVppWrite interface {
// AddBridgeDomain adds new bridge domain.
AddBridgeDomain(bdIdx uint32, bd *l2.BridgeDomain) error
// DeleteBridgeDomain removes existing bridge domain.
DeleteBridgeDomain(bdIdx uint32) error
// AddInterfaceToBridgeDomain puts interface into bridge domain.
AddInterfaceToBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
// DeleteInterfaceFromBridgeDomain removes interface from bridge domain.
DeleteInterfaceFromBridgeDomain(bdIdx uint32, ifaceCfg *l2.BridgeDomain_Interface) error
// AddArpTerminationTableEntry creates ARP termination entry for bridge domain.
AddArpTerminationTableEntry(bdID uint32, mac string, ip string) error
// RemoveArpTerminationTableEntry removes ARP termination entry from bridge domain.
RemoveArpTerminationTableEntry(bdID uint32, mac string, ip string) error
}
BridgeDomainVppWrite provides write methods for bridge domains.
type FIBVppAPI ¶
type FIBVppAPI interface {
FIBVppWrite
FIBVppRead
}
FIBVppAPI provides methods for managing FIBs.
type FIBVppHandler ¶
type FIBVppHandler struct {
// contains filtered or unexported fields
}
FIBVppHandler is accessor for FIB-related vppcalls methods.
func NewFIBVppHandler ¶
func NewFIBVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, bdIndexes idxvpp.NameToIndex, log logging.Logger) *FIBVppHandler
NewFIBVppHandler creates new instance of FIB vppcalls handler.
func (*FIBVppHandler) AddL2FIB ¶
func (h *FIBVppHandler) AddL2FIB(fib *l2nb.FIBEntry) error
AddL2FIB creates L2 FIB table entry.
func (*FIBVppHandler) DeleteL2FIB ¶
func (h *FIBVppHandler) DeleteL2FIB(fib *l2nb.FIBEntry) error
DeleteL2FIB removes existing L2 FIB table entry.
func (*FIBVppHandler) DumpL2FIBs ¶
func (h *FIBVppHandler) DumpL2FIBs() (map[string]*FibTableDetails, error)
DumpL2FIBs dumps VPP L2 FIB table entries into the northbound API data structure map indexed by destination MAC address.
type FIBVppRead ¶
type FIBVppRead interface {
// DumpL2FIBs dumps VPP L2 FIB table entries into the northbound API
// data structure map indexed by destination MAC address.
DumpL2FIBs() (map[string]*FibTableDetails, error)
}
FIBVppRead provides read methods for FIBs.
type FIBVppWrite ¶
type FIBVppWrite interface {
// AddL2FIB creates L2 FIB table entry.
AddL2FIB(fib *l2.FIBEntry) error
// DeleteL2FIB removes existing L2 FIB table entry.
DeleteL2FIB(fib *l2.FIBEntry) error
}
FIBVppWrite provides write methods for FIBs.
type FibMeta ¶ added in v1.8.1
type FibMeta struct {
BdID uint32 `json:"bridge_domain_id"`
IfIdx uint32 `json:"outgoing_interface_sw_if_idx"`
}
FibMeta contains FIB interface and bridge domain name/index map
type FibTableDetails ¶ added in v1.8.1
FibTableDetails is the wrapper structure for the FIB table entry northbound API structure.
type XConnectDetails ¶ added in v1.8.1
type XConnectDetails struct {
Xc *l2nb.XConnectPair `json:"x_connect"`
Meta *XcMeta `json:"x_connect_meta"`
}
XConnectDetails is the wrapper structure for the l2 xconnect northbound API structure.
type XConnectVppAPI ¶ added in v1.8.1
type XConnectVppAPI interface {
XConnectVppWrite
XConnectVppRead
}
XConnectVppAPI provides methods for managing cross connects.
type XConnectVppHandler ¶ added in v1.8.1
type XConnectVppHandler struct {
// contains filtered or unexported fields
}
XConnectVppHandler is accessor for cross-connect-related vppcalls methods.
func NewXConnectVppHandler ¶ added in v1.8.1
func NewXConnectVppHandler(callsChan govppapi.Channel, ifIndexes ifaceidx.IfaceMetadataIndex, log logging.Logger) *XConnectVppHandler
NewXConnectVppHandler creates new instance of cross connect vppcalls handler.
func (*XConnectVppHandler) AddL2XConnect ¶ added in v1.8.1
func (h *XConnectVppHandler) AddL2XConnect(rxIface, txIface string) error
AddL2XConnect creates xConnect between two existing interfaces.
func (*XConnectVppHandler) DeleteL2XConnect ¶ added in v1.8.1
func (h *XConnectVppHandler) DeleteL2XConnect(rxIface, txIface string) error
DeleteL2XConnect removes xConnect between two interfaces.
func (*XConnectVppHandler) DumpXConnectPairs ¶ added in v1.8.1
func (h *XConnectVppHandler) DumpXConnectPairs() (map[uint32]*XConnectDetails, error)
DumpXConnectPairs implements xconnect handler.
type XConnectVppRead ¶ added in v1.8.1
type XConnectVppRead interface {
// DumpXConnectPairs dumps VPP xconnect pair data into the northbound API
// data structure map indexed by rx interface index.
DumpXConnectPairs() (map[uint32]*XConnectDetails, error)
}
XConnectVppRead provides read methods for cross connects.
type XConnectVppWrite ¶ added in v1.8.1
type XConnectVppWrite interface {
// AddL2XConnect creates xConnect between two existing interfaces.
AddL2XConnect(rxIface, txIface string) error
// DeleteL2XConnect removes xConnect between two interfaces.
DeleteL2XConnect(rxIface, txIface string) error
}
XConnectVppWrite provides write methods for cross connects.
Source Files
¶
- api_vppcalls.go
- arp_term_vppcalls.go
- bridge_domain_vppcalls.go
- doc.go
- dump_vppcalls.go
- interface_vppcalls.go
- l2fib_vppcalls.go
- xconnect_vppcalls.go