vppclient

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 9 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 DataResyncDSL

type DataResyncDSL interface {
	// Interface adds interface to the RESYNC request.
	Interface(intf *interfaces.Interface) DataResyncDSL
	// Span adds span to the RESYNC request.
	Span(intf *interfaces.Span) DataResyncDSL
	// ACL adds Access Control List to the RESYNC request.
	ACL(acl *acl.ACL) DataResyncDSL
	// ABF adds ACL-based forwarding to the RESYNC request.
	ABF(abf *abf.ABF) DataResyncDSL
	// BD adds Bridge Domain to the RESYNC request.
	BD(bd *l2.BridgeDomain) DataResyncDSL
	// BDFIB adds L2 Forwarding Information Base.
	BDFIB(fib *l2.FIBEntry) DataResyncDSL
	// XConnect adds Cross Connect to the RESYNC request.
	XConnect(xcon *l2.XConnectPair) DataResyncDSL
	// VrfTable adds VRF table to the RESYNC request.
	VrfTable(val *l3.VrfTable) DataResyncDSL
	// StaticRoute adds L3 Static Route to the RESYNC request.
	StaticRoute(staticRoute *l3.Route) DataResyncDSL
	// Arp adds VPP L3 ARP to the RESYNC request.
	Arp(arp *l3.ARPEntry) DataResyncDSL
	// ProxyArp adds L3 proxy ARP interfaces to the RESYNC request.
	ProxyArp(proxyArp *l3.ProxyARP) DataResyncDSL
	// IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
	IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) DataResyncDSL
	// StnRule adds Stn rule to the RESYNC request.
	StnRule(stn *stn.Rule) DataResyncDSL
	// NAT44Global adds global NAT44 configuration to the RESYNC request.
	NAT44Global(nat *nat.Nat44Global) DataResyncDSL
	// DNAT44 adds DNAT44 configuration to the RESYNC request
	DNAT44(dnat *nat.DNat44) DataResyncDSL
	// IPSecSA adds request to RESYNC a new Security Association
	IPSecSA(sa *ipsec.SecurityAssociation) DataResyncDSL
	// IPSecSPD adds request to RESYNC a new Security Policy Database
	IPSecSPD(spd *ipsec.SecurityPolicyDatabase) DataResyncDSL
	// PuntIPRedirect adds request to RESYNC a rule used to punt L3 traffic via interface.
	PuntIPRedirect(val *punt.IPRedirect) DataResyncDSL
	// PuntToHost adds request to RESYNC a rule used to punt L4 traffic to a host.
	PuntToHost(val *punt.ToHost) DataResyncDSL
	// PuntException adds request to create or update exception to punt specific packets.
	PuntException(val *punt.Exception) 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
	// Span adds VPP span to the Delete request.
	Span(span *interfaces.Span) DeleteDSL
	// ACL adds a request to delete an existing VPP Access Control List.
	ACL(aclName string) DeleteDSL
	// ABF adds a request to delete and existing VPP Access Control List.
	ABF(abfIndex uint32) 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
	// VrfTable adds a request to delete existing VPP VRF table.
	VrfTable(id uint32, proto l3.VrfTable_Protocol) DeleteDSL
	// StaticRoute adds a request to delete an existing VPP L3 Static Route.
	StaticRoute(iface string, vrf uint32, dstAddr string, nextHopAddr 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
	ProxyArp() DeleteDSL
	// IPScanNeighbor adds a request to delete an existing VPP L3 IP Scan Neighbor.
	IPScanNeighbor() DeleteDSL
	// StnRule adds a request to delete an existing Stn rule.
	StnRule(iface, addr string) DeleteDSL
	// NAT44Global adds a request to remove global configuration for NAT44
	NAT44Global() DeleteDSL
	// DNAT44 adds a request to delete an existing DNAT44 configuration
	DNAT44(label string) DeleteDSL
	// IPSecSA adds request to delete a Security Association
	IPSecSA(saIndex string) DeleteDSL
	// IPSecSPD adds request to delete a Security Policy Database
	IPSecSPD(spdIndex string) DeleteDSL
	// PuntIPRedirect adds request to delete a rule used to punt L3 traffic via interface.
	PuntIPRedirect(l3Proto punt.L3Protocol, txInterface string) DeleteDSL
	// PuntToHost adds request to delete a rule used to punt L4 traffic to a host.
	PuntToHost(l3Proto punt.L3Protocol, l4Proto punt.L4Protocol, port uint32) DeleteDSL
	// PuntException adds request to delete exception to punt specific packets.
	PuntException(reason 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 PutDSL

type PutDSL interface {
	// Interface adds a request to create or update VPP network interface.
	Interface(val *interfaces.Interface) PutDSL
	// Span adds VPP span to the Put request.
	Span(span *interfaces.Span) PutDSL
	// ACL adds a request to create or update VPP Access Control List.
	ACL(acl *acl.ACL) PutDSL
	// ABF adds a request to create or update VPP ACL-based forwarding.
	ABF(abf *abf.ABF) PutDSL
	// BD adds a request to create or update VPP Bridge Domain.
	BD(val *l2.BridgeDomain) PutDSL
	// BDFIB adds a request to create or update VPP L2 Forwarding Information Base.
	BDFIB(fib *l2.FIBEntry) PutDSL
	// XConnect adds a request to create or update VPP Cross Connect.
	XConnect(val *l2.XConnectPair) PutDSL
	// VrfTable adds a request to create or update VPP VRF table.
	VrfTable(val *l3.VrfTable) PutDSL
	// StaticRoute adds a request to create or update VPP L3 Static Route.
	StaticRoute(val *l3.Route) PutDSL
	// Arp adds a request to create or update VPP L3 ARP.
	Arp(arp *l3.ARPEntry) PutDSL
	// ProxyArpInterfaces adds a request to create or update VPP L3 proxy ARP interfaces
	ProxyArp(proxyArp *l3.ProxyARP) PutDSL
	// IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
	IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) PutDSL
	// StnRule adds a request to create or update Stn rule.
	StnRule(stn *stn.Rule) PutDSL
	// NAT44Global adds a request to set global configuration for NAT44
	NAT44Global(nat *nat.Nat44Global) PutDSL
	// DNAT44 adds a request to create or update DNAT44 configuration
	DNAT44(dnat *nat.DNat44) PutDSL
	// IPSecSA adds request to create a new Security Association
	IPSecSA(sa *ipsec.SecurityAssociation) PutDSL
	// IPSecSPD adds request to create a new Security Policy Database
	IPSecSPD(spd *ipsec.SecurityPolicyDatabase) PutDSL
	// PuntIPRedirect adds request to create or update rule to punt L3 traffic via interface.
	PuntIPRedirect(val *punt.IPRedirect) PutDSL
	// PuntToHost adds request to create or update rule to punt L4 traffic to a host.
	PuntToHost(val *punt.ToHost) PutDSL
	// PuntException adds request to create or update exception to punt specific packets.
	PuntException(val *punt.Exception) 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).

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 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