vppclient

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package vppclient contains clients for local and remote management of VPP configuration via default plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataChangeDSL

type DataChangeDSL interface {
	// Put initiates a chained sequence of data change DSL statements, declaring
	// new or changing existing configurable objects, e.g.:
	//     Put().Interface(&memif).XConnect(&xconnect).BD(&BD) ... Send()
	// The set of available objects to be created or changed is defined by PutDSL.
	Put() PutDSL

	// Delete initiates a chained sequence of data change DSL statements,
	// removing existing configurable objects (by name), e.g.:
	//     Delete().Interface(memifName).XConnect(xconnectName).BD(BDName) ... Send()
	// The set of available objects to be removed is defined by DeleteDSL.
	Delete() DeleteDSL

	// Send propagates requested changes to the plugins.
	Send() Reply
}

DataChangeDSL defines Domain Specific Language (DSL) for data change. of the VPP configuration. Use this interface to make your implementation independent of the local and any remote client. Every DSL statement (apart from Send) returns the receiver (possibly wrapped to change the scope of DSL), allowing the calls to be chained together conveniently in a single statement.

type DataDumpDSL added in v1.8.1

type DataDumpDSL interface {
	// Dump initiates a chained sequence of data read DSL statements, reading
	// existing configurable objects, e.g.:
	//     Dump().Interfaces().BD() ... Send()
	// The set of available objects to be created or changed is defined by GetDSL.
	Dump() DumpDSL
}

DataDumpDSL defines Domain Specific Language (DSL) for data read. of the VPP configuration. Use this interface to make your implementation independent of the local and any remote client. Every DSL statement (apart from Send) returns the receiver (possibly wrapped to change the scope of DSL), allowing the calls to be chained together conveniently in a single statement.

type DataResyncDSL

type DataResyncDSL interface {
	// Interface adds interface to the RESYNC request.
	Interface(intf *interfaces.Interfaces_Interface) DataResyncDSL
	// BfdSession adds bidirectional forwarding detection session to the RESYNC
	// request.
	BfdSession(val *bfd.SingleHopBFD_Session) DataResyncDSL
	// BfdAuthKeys adds bidirectional forwarding detection key to the RESYNC
	// request.
	BfdAuthKeys(val *bfd.SingleHopBFD_Key) DataResyncDSL
	// BfdEchoFunction adds bidirectional forwarding detection echo function
	// to the RESYNC request.
	BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) DataResyncDSL
	// BD adds Bridge Domain to the RESYNC request.
	BD(bd *l2.BridgeDomains_BridgeDomain) DataResyncDSL
	// BDFIB adds L2 Forwarding Information Base.
	BDFIB(fib *l2.FibTable_FibEntry) DataResyncDSL
	// XConnect adds Cross Connect to the RESYNC request.
	XConnect(xcon *l2.XConnectPairs_XConnectPair) DataResyncDSL
	// StaticRoute adds L3 Static Route to the RESYNC request.
	StaticRoute(staticRoute *l3.StaticRoutes_Route) DataResyncDSL
	// ACL adds Access Control List to the RESYNC request.
	ACL(acl *acl.AccessLists_Acl) DataResyncDSL
	// Arp adds VPP L3 ARP to the RESYNC request.
	Arp(arp *l3.ArpTable_ArpEntry) DataResyncDSL
	// ProxyArpInterfaces adds L3 proxy ARP interfaces to the RESYNC request.
	ProxyArpInterfaces(pArpIfs *l3.ProxyArpInterfaces_InterfaceList) DataResyncDSL
	// ProxyArpRanges adds L3 proxy ARP ranges to the RESYNC request.
	ProxyArpRanges(pArpRng *l3.ProxyArpRanges_RangeList) DataResyncDSL
	// L4Features adds L4 features to the RESYNC request
	L4Features(val *l4.L4Features) DataResyncDSL
	// AppNamespace adds VPP Application namespaces to the RESYNC request
	AppNamespace(appNs *l4.AppNamespaces_AppNamespace) DataResyncDSL
	// StnRule adds Stn rule to the RESYNC request.
	StnRule(stn *stn.STN_Rule) DataResyncDSL
	// NAT44Global adds a request to RESYNC global configuration for NAT44
	NAT44Global(nat *nat.Nat44Global) DataResyncDSL
	// NAT44DNat adds a request to RESYNC a new DNAT configuration
	NAT44DNat(dnat *nat.Nat44DNat_DNatConfig) DataResyncDSL
	// IPSecSA adds request to RESYNC a new Security Association
	IPSecSA(sa *ipsec.SecurityAssociations_SA) DataResyncDSL
	// IPSecSPD adds request to RESYNC a new Security Policy Database
	IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) DataResyncDSL
	// IPSecTunnel adds request to RESYNC a new IPSec tunnel
	IPSecTunnel(tun *ipsec.TunnelInterfaces_Tunnel) DataResyncDSL
	// PuntSocketRegister adds request to RESYNC a new punt to host entry
	PuntSocketRegister(puntCfg *punt.Punt) DataResyncDSL

	// Send propagates the RESYNC request to the plugins.
	Send() Reply
}

DataResyncDSL defines the Domain Specific Language (DSL) for data RESYNC of the VPP configuration. Use this interface to make your implementation independent of the local and any remote client. Each method (apart from Send) returns the receiver, allowing the calls to be chained together conveniently in a single statement.

type DeleteDSL

type DeleteDSL interface {
	// Interface adds a request to delete an existing VPP network interface.
	Interface(ifaceName string) DeleteDSL
	// BfdSession adds a request to delete an existing bidirectional forwarding
	// detection session.
	BfdSession(bfdSessionIfaceName string) DeleteDSL
	// BfdAuthKeys adds a request to delete an existing bidirectional forwarding
	// detection key.
	BfdAuthKeys(bfdKey string) DeleteDSL
	// BfdEchoFunction adds a request to delete an existing bidirectional
	// forwarding detection echo function.
	BfdEchoFunction(bfdEchoName string) DeleteDSL
	// BD adds a request to delete an existing VPP Bridge Domain.
	BD(bdName string) DeleteDSL
	// BDFIB adds a request to delete an existing VPP L2 Forwarding Information
	// Base.
	BDFIB(bdName string, mac string) DeleteDSL
	// XConnect adds a request to delete an existing VPP Cross Connect.
	XConnect(rxIfaceName string) DeleteDSL
	// StaticRoute adds a request to delete an existing VPP L3 Static Route.
	StaticRoute(vrf uint32, dstAddr string, nextHopAddr string) DeleteDSL
	// ACL adds a request to delete an existing VPP Access Control List.
	ACL(aclName string) DeleteDSL
	// L4Features adds a request to enable or disable L4 features
	L4Features() DeleteDSL
	// AppNamespace adds a request to delete VPP Application namespace
	// Note: current version does not support application namespace deletion
	AppNamespace(id string) DeleteDSL
	// Arp adds a request to delete an existing VPP L3 ARP.
	Arp(ifaceName string, ipAddr string) DeleteDSL
	// ProxyArpInterfaces adds a request to delete an existing VPP L3 proxy ARP interfaces
	ProxyArpInterfaces(label string) DeleteDSL
	// ProxyArpRanges adds a request to delete an existing VPP L3 proxy ARP ranges
	ProxyArpRanges(label string) DeleteDSL
	// StnRule adds a request to delete an existing Stn rule.
	StnRule(ruleName string) DeleteDSL
	// NAT44Global adds a request to remove global configuration for NAT44
	NAT44Global() DeleteDSL
	// NAT44DNat adds a request to delete a new DNAT configuration
	NAT44DNat(label string) DeleteDSL
	// IPSecSA adds request to delete a Security Association
	IPSecSA(saName string) DeleteDSL
	// IPSecSPD adds request to delete a Security Policy Database
	IPSecSPD(spdName string) DeleteDSL
	// IPSecTunnel adds request to delete an IPSec tunnel
	IPSecTunnel(tunName string) DeleteDSL
	// PuntSocketDeregister adds request to de-register an existing punt to host entry
	PuntSocketDeregister(puntName string) DeleteDSL

	// Put changes the DSL mode to allow configuration editing.
	// See documentation for DataChangeDSL.Put().
	Put() PutDSL

	// Send propagates requested changes to the plugins.
	Send() Reply
}

DeleteDSL is a subset of data change DSL statements, used to remove an existing VPP configuration.

type DumpDSL added in v1.8.1

type DumpDSL interface {
	// ACLs adds a request to read VPP access lists.
	ACLs() DumpDSL
	// Interfaces adds a request to read VPP interfaces.
	Interfaces() DumpDSL
	// IPSecSPDs adds a request to read IPSec SPDs.
	IPSecSPDs() DumpDSL
	// IPSecSAs adds a request to read IPSec SAs.
	IPSecSAs() DumpDSL
	// IPSecTunnels adds a request to read IPSec tunnels.
	IPSecTunnels() DumpDSL
	// BDs adds a request to read bridge domains.
	BDs() DumpDSL
	// FIBs adds a request to read FIBs.
	FIBs() DumpDSL
	// XConnects adds a request to read cross connects.
	XConnects() DumpDSL
	// Routes adds a request to read routes.
	Routes() DumpDSL
	// ARPs adds a request to read ARPs.
	ARPs() DumpDSL
	// PuntRegistrations adds a request to read punt socket registrations.
	PuntRegistrations() DumpDSL
	// LinuxInterfaces adds a request to read linux interfaces.
	LinuxInterfaces() DumpDSL
	// LinuxARPs adds a request to read linux ARPs.
	LinuxARPs() DumpDSL
	// LinuxRoutes adds a request to read linux routes.
	LinuxRoutes() DumpDSL

	// Send propagates requested changes to the plugins.
	Send() DumpReply
}

DumpDSL is a subset of data read DSL statements, used to read existing VPP configuration.

type DumpReply added in v1.8.1

type DumpReply interface {
	// ReceiveReply waits for a reply to previously called Send() and returns
	// the result (data set or error).
	ReceiveReply() (ReplyData, error)
}

DumpReply interface allows to wait for a reply to previously called Send() and extract the result from it (success/error).

type PutDSL

type PutDSL interface {
	// Interface adds a request to create or update VPP network interface.
	Interface(val *interfaces.Interfaces_Interface) PutDSL
	// BfdSession adds a request to create or update bidirectional forwarding
	// detection session.
	BfdSession(val *bfd.SingleHopBFD_Session) PutDSL
	// BfdAuthKeys adds a request to create or update bidirectional forwarding
	// detection key.
	BfdAuthKeys(val *bfd.SingleHopBFD_Key) PutDSL
	// BfdEchoFunction adds a request to create or update bidirectional
	// forwarding detection echo function.
	BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) PutDSL
	// BD adds a request to create or update VPP Bridge Domain.
	BD(val *l2.BridgeDomains_BridgeDomain) PutDSL
	// BDFIB adds a request to create or update VPP L2 Forwarding Information Base.
	BDFIB(fib *l2.FibTable_FibEntry) PutDSL
	// XConnect adds a request to create or update VPP Cross Connect.
	XConnect(val *l2.XConnectPairs_XConnectPair) PutDSL
	// StaticRoute adds a request to create or update VPP L3 Static Route.
	StaticRoute(val *l3.StaticRoutes_Route) PutDSL
	// ACL adds a request to create or update VPP Access Control List.
	ACL(acl *acl.AccessLists_Acl) PutDSL
	// Arp adds a request to create or update VPP L3 ARP.
	Arp(arp *l3.ArpTable_ArpEntry) PutDSL
	// ProxyArpInterfaces adds a request to create or update VPP L3 proxy ARP interfaces
	ProxyArpInterfaces(pArpIfs *l3.ProxyArpInterfaces_InterfaceList) PutDSL
	// ProxyArpRanges adds a request to create or update VPP L3 proxy ARP ranges
	ProxyArpRanges(pArpRng *l3.ProxyArpRanges_RangeList) PutDSL
	// L4Features adds a request to enable or disable L4 features
	L4Features(val *l4.L4Features) PutDSL
	// AppNamespace adds a request to create or update VPP Application namespace
	AppNamespace(appNs *l4.AppNamespaces_AppNamespace) PutDSL
	// StnRule adds a request to create or update Stn rule.
	StnRule(stn *stn.STN_Rule) PutDSL
	// NAT44Global adds a request to set global configuration for NAT44
	NAT44Global(nat *nat.Nat44Global) PutDSL
	// NAT44DNat adds a request to create a new DNAT configuration
	NAT44DNat(dnat *nat.Nat44DNat_DNatConfig) PutDSL
	// IPSecSA adds request to create a new Security Association
	IPSecSA(sa *ipsec.SecurityAssociations_SA) PutDSL
	// IPSecSPD adds request to create a new Security Policy Database
	IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) PutDSL
	// IPSecTunnel adds request to create a new IPSec tunnel
	IPSecTunnel(spd *ipsec.TunnelInterfaces_Tunnel) PutDSL
	// PuntSocketRegister adds request to register a new punt to host entry
	PuntSocketRegister(puntCfg *punt.Punt) PutDSL

	// Delete changes the DSL mode to allow removal of an existing configuration.
	// See documentation for DataChangeDSL.Delete().
	Delete() DeleteDSL

	// Send propagates requested changes to the plugins.
	Send() Reply
}

PutDSL is a subset of data change DSL statements, used to declare new VPP configuration or to change an existing one.

type Reply

type Reply interface {
	// ReceiveReply waits for a reply to previously called Send() and returns
	// the result (error or nil).
	ReceiveReply() error
}

Reply interface allows to wait for a reply to previously called Send() and extract the result from it (success/error).

type ReplyData added in v1.8.1

type ReplyData interface {
	// GetACLs returns all access lists from the reply
	GetACLs() []*acl.AccessLists_Acl
	// GetInterfaces returns all the interfaces from the reply
	GetInterfaces() []*interfaces.Interfaces_Interface
	// GetIPSecSPDs returns all the IPSec SPDs from the reply
	GetIPSecSPDs() []*ipsec.SecurityPolicyDatabases_SPD
	// GetIPSecSAs returns all the IPSec SAa from the reply
	GetIPSecSAs() []*ipsec.SecurityAssociations_SA
	// GetBDs returns all the bridge domains from the reply
	GetBDs() []*l2.BridgeDomains_BridgeDomain
	// GetFIBs returns all the FIB entries from the reply
	GetFIBs() []*l2.FibTable_FibEntry
	// GetXConnects returns all the XConnects from the reply
	GetXConnects() []*l2.XConnectPairs_XConnectPair
	// GetARPs returns all the ARPs from the reply
	GetARPs() []*l3.ArpTable_ArpEntry
	// GetRoutes returns all the routes from the reply
	GetRoutes() []*l3.StaticRoutes_Route
	// GetPunts returns all the punts from the reply
	GetPunts() []*rpc.PuntResponse_PuntEntry
	// GetLinuxInterfaces returns all the linux interfaces from the reply
	GetLinuxInterfaces() []*linuxIf.LinuxInterfaces_Interface
	// GetLinuxARPs returns all the linux ARPs from the reply
	GetLinuxARPs() []*linuxL3.LinuxStaticArpEntries_ArpEntry
	// GetLinuxRoutes returns all the linux routes from the reply
	GetLinuxRoutes() []*linuxL3.LinuxStaticRoutes_Route
}

ReplyData is helper interface for more convenient access to typed data

Directories

Path Synopsis
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using Data Broker (by writing to key value store).
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using Data Broker (by writing to key value store).
Package grpcadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using GRPC client.
Package grpcadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using GRPC client.
Package localclient implements client for local management of VPP configuration.
Package localclient implements client for local management of VPP configuration.
Package remoteclient implements the client for remote management of VPP configuration.
Package remoteclient implements the client for remote management of VPP configuration.

Jump to

Keyboard shortcuts

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