linuxclient

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: 12 Imported by: 0

Documentation

Overview

Package linuxclient contains clients for local and remote management of both VPP and Linux configuration via Linux and 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 configurable objects or changing existing ones, e.g.:
	//     Put().LinuxInterface(&veth).VppInterface(&afpacket).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().LinuxInterface(vethName).VppInterface(afpacketName).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() vpp_clientv2.Reply
}

DataChangeDSL defines the Domain Specific Language (DSL) for data change of both Linux and 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 {
	// LinuxInterface adds Linux interface to the RESYNC request.
	LinuxInterface(intf *linux_interfaces.Interface) DataResyncDSL
	// LinuxInterface adds Linux ARP entry to the RESYNC request.
	LinuxArpEntry(arp *linux_l3.ARPEntry) DataResyncDSL
	// LinuxInterface adds Linux route to the RESYNC request.
	LinuxRoute(route *linux_l3.Route) DataResyncDSL

	// VppInterface adds VPP interface to the RESYNC request.
	VppInterface(intf *vpp_interfaces.Interface) DataResyncDSL
	// Span adds VPP span to the RESYNC request.
	Span(span *vpp_interfaces.Span) DataResyncDSL
	// ACL adds VPP Access Control List to the RESYNC request.
	ACL(acl *vpp_acl.ACL) DataResyncDSL
	// ABF adds ACL-based forwarding to the RESYNC request.
	ABF(acl *vpp_abf.ABF) DataResyncDSL
	/*// BfdSession adds VPP bidirectional forwarding detection session
	// to the RESYNC request.
	BfdSession(val *vpp_bfd.SingleHopBFD_Session) DataResyncDSL
	// BfdAuthKeys adds VPP bidirectional forwarding detection key to the RESYNC
	// request.
	BfdAuthKeys(val *vpp_bfd.SingleHopBFD_Key) DataResyncDSL
	// BfdEchoFunction adds VPP bidirectional forwarding detection echo function
	// to the RESYNC request.
	BfdEchoFunction(val *vpp_bfd.SingleHopBFD_EchoFunction) DataResyncDSL*/
	// BD adds VPP Bridge Domain to the RESYNC request.
	BD(bd *vpp_l2.BridgeDomain) DataResyncDSL
	// BDFIB adds VPP L2 FIB to the RESYNC request.
	BDFIB(fib *vpp_l2.FIBEntry) DataResyncDSL
	// VrfTable adds VPP VRF table to the RESYNC request.
	VrfTable(val *vpp_l3.VrfTable) DataResyncDSL
	// XConnect adds VPP Cross Connect to the RESYNC request.
	XConnect(xcon *vpp_l2.XConnectPair) DataResyncDSL
	// StaticRoute adds VPP L3 Static Route to the RESYNC request.
	StaticRoute(staticRoute *vpp_l3.Route) DataResyncDSL
	// Arp adds VPP L3 ARP to the RESYNC request.
	Arp(arp *vpp_l3.ARPEntry) DataResyncDSL
	// ProxyArp adds L3 proxy ARP interfaces to the RESYNC request.
	ProxyArp(proxyArp *vpp_l3.ProxyARP) DataResyncDSL
	// IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
	IPScanNeighbor(ipScanNeigh *vpp_l3.IPScanNeighbor) DataResyncDSL
	/*// L4Features adds L4 features to the RESYNC request
	L4Features(val *vpp_l4.L4Features) DataResyncDSL
	// AppNamespace adds VPP Application namespaces to the RESYNC request
	AppNamespace(appNs *vpp_l4.AppNamespaces_AppNamespace) DataResyncDSL*/
	// StnRule adds Stn rule to the RESYNC request.
	StnRule(stn *vpp_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() vpp_clientv2.Reply
}

DataResyncDSL defines the Domain Specific Language (DSL) for data RESYNC of both Linux and 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 {
	// LinuxInterface adds a request to delete an existing Linux network
	// interface.
	LinuxInterface(ifaceName string) DeleteDSL
	// LinuxArpEntry adds a request to delete Linux ARP entry
	LinuxArpEntry(ifaceName string, ipAddr string) DeleteDSL
	// LinuxRoute adds a request to delete Linux route
	LinuxRoute(dstAddr, outIfaceName string) DeleteDSL

	// VppInterface adds a request to delete an existing VPP network interface.
	VppInterface(ifaceName string) DeleteDSL
	// Span adds VPP span to the Delete request.
	Span(span *vpp_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 an existing VPP ACL-based forwarding.
	ABF(abfIndex uint32) DeleteDSL
	/*// BfdSession adds a request to delete an existing VPP bidirectional
	// forwarding detection session.
	BfdSession(bfdSessionIfaceName string) DeleteDSL
	// BfdAuthKeys adds a request to delete an existing VPP bidirectional
	// forwarding detection key.
	BfdAuthKeys(bfdKey string) DeleteDSL
	// BfdEchoFunction adds a request to delete an existing VPP bidirectional
	// forwarding detection echo function.
	BfdEchoFunction(bfdEchoName string) DeleteDSL*/
	// BD adds a request to delete an existing VPP Bridge Domain.
	BD(bdName string) DeleteDSL
	// FIB adds a request to delete an existing VPP L2 Forwarding Information
	// Base.
	BDFIB(bdName string, mac string) DeleteDSL
	// VrfTable adds a request to delete existing VPP VRF table.
	VrfTable(id uint32, proto vpp_l3.VrfTable_Protocol) 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(iface string, vrf uint32, dstAddr string, nextHopAddr 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
	// ProxyArp adds a request to delete an existing VPP L3 proxy ARP
	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 VPP 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 DNAT-44 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() vpp_clientv2.Reply
}

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

type PutDSL

type PutDSL interface {
	// LinuxInterface adds a request to create or update Linux network interface.
	LinuxInterface(val *linux_interfaces.Interface) PutDSL
	// LinuxArpEntry adds a request to crete or update Linux ARP entry
	LinuxArpEntry(val *linux_l3.ARPEntry) PutDSL
	// LinuxRoute adds a request to crete or update Linux route
	LinuxRoute(val *linux_l3.Route) PutDSL

	// VppInterface adds a request to create or update VPP network interface.
	VppInterface(val *vpp_interfaces.Interface) PutDSL
	// Span adds VPP span to the Put request.
	Span(span *vpp_interfaces.Span) PutDSL
	// ACL adds a request to create or update VPP Access Control List.
	ACL(acl *vpp_acl.ACL) PutDSL
	// ABF adds a request to create or update VPP ACL-based forwarding.
	ABF(abf *vpp_abf.ABF) PutDSL
	/*// BfdSession adds a request to create or update VPP bidirectional
	// forwarding detection session.
	BfdSession(val *vpp_bfd.SingleHopBFD_Session) PutDSL
	// BfdAuthKeys adds a request to create or update VPP bidirectional
	// forwarding detection key.
	BfdAuthKeys(val *vpp_bfd.SingleHopBFD_Key) PutDSL
	// BfdEchoFunction adds a request to create or update VPP bidirectional
	// forwarding detection echo function.
	BfdEchoFunction(val *vpp_bfd.SingleHopBFD_EchoFunction) PutDSL*/
	// BD adds a request to create or update VPP Bridge Domain.
	BD(val *vpp_l2.BridgeDomain) PutDSL
	// BDFIB adds a request to create or update VPP L2 Forwarding Information Base.
	BDFIB(fib *vpp_l2.FIBEntry) PutDSL
	// VrfTable adds a request to create or update VPP VRF table.
	VrfTable(val *vpp_l3.VrfTable) PutDSL
	// XConnect adds a request to create or update VPP Cross Connect.
	XConnect(val *vpp_l2.XConnectPair) PutDSL
	// StaticRoute adds a request to create or update VPP L3 Static Route.
	StaticRoute(val *vpp_l3.Route) PutDSL
	// Arp adds a request to create or update VPP L3 ARP.
	Arp(arp *vpp_l3.ARPEntry) PutDSL
	// ProxyArp adds a request to create or update VPP L3 proxy ARP.
	ProxyArp(proxyArp *vpp_l3.ProxyARP) PutDSL
	// IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
	IPScanNeighbor(ipScanNeigh *vpp_l3.IPScanNeighbor) PutDSL
	/*// L4Features adds a request to enable or disable L4 features
	L4Features(val *vpp_l4.L4Features) PutDSL
	// AppNamespace adds a request to create or update VPP Application namespace
	AppNamespace(appNs *vpp_l4.AppNamespaces_AppNamespace) PutDSL*/
	// StnRule adds a request to create or update VPP Stn rule.
	StnRule(stn *vpp_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 removing an existing configuration.
	// See documentation for DataChangeDSL.Delete().
	Delete() DeleteDSL

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

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

Directories

Path Synopsis
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP and Linux configuration.
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP and Linux configuration.
Package localclient implements client for local management of VPP and Linux configuration.
Package localclient implements client for local management of VPP and Linux configuration.
Package remoteclient implements client for remote management of VPP and Linux configuration.
Package remoteclient implements client for remote management of VPP and Linux configuration.

Jump to

Keyboard shortcuts

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