Documentation ¶
Overview ¶
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP and Linux configuration.
Index ¶
- type DataChangeDSL
- type DataResyncDSL
- func (dsl *DataResyncDSL) ACL(acl *acl.AccessLists_Acl) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) AppNamespace(appNs *l4.AppNamespaces_AppNamespace) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) Arp(arp *l3.ArpTable_ArpEntry) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) BD(bd *l2.BridgeDomains_BridgeDomain) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) BDFIB(fib *l2.FibTable_FibEntry) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdSession(val *bfd.SingleHopBFD_Session) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) L4Features(val *l4.L4Features) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) LinuxArpEntry(val *linuxL3.LinuxStaticArpEntries_ArpEntry) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) LinuxInterface(val *linuxIf.LinuxInterfaces_Interface) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) LinuxRoute(val *linuxL3.LinuxStaticRoutes_Route) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) ProxyArpInterfaces(val *l3.ProxyArpInterfaces_InterfaceList) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) ProxyArpRanges(val *l3.ProxyArpRanges_RangeList) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) Send() vppclient.Reply
- func (dsl *DataResyncDSL) StaticRoute(staticRoute *l3.StaticRoutes_Route) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) StnRule(stn *stn.STN_Rule) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) VppInterface(intf *interfaces.Interfaces_Interface) linuxclient.DataResyncDSL
- func (dsl *DataResyncDSL) XConnect(xcon *l2.XConnectPairs_XConnectPair) linuxclient.DataResyncDSL
- type DeleteDSL
- func (dsl *DeleteDSL) ACL(aclName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) AppNamespace(id string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) Arp(ifaceName string, ipAddr string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) BD(bdName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) BDFIB(bdName string, mac string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) BfdAuthKeys(bfdKey string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) BfdEchoFunction(bfdEchoName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) BfdSession(bfdSessionIfaceName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) L4Features() linuxclient.DeleteDSL
- func (dsl *DeleteDSL) LinuxArpEntry(entryName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) LinuxInterface(interfaceName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) LinuxRoute(routeName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) NAT44DNat(label string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) NAT44Global() linuxclient.DeleteDSL
- func (dsl *DeleteDSL) ProxyArpInterfaces(label string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) ProxyArpRanges(label string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) Put() linuxclient.PutDSL
- func (dsl *DeleteDSL) Send() vppclient.Reply
- func (dsl *DeleteDSL) StaticRoute(vrf uint32, dstAddr string, nextHopAddr string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) StnRule(ruleName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) VppInterface(ifaceName string) linuxclient.DeleteDSL
- func (dsl *DeleteDSL) XConnect(rxIfaceName string) linuxclient.DeleteDSL
- type PutDSL
- func (dsl *PutDSL) ACL(acl *acl.AccessLists_Acl) linuxclient.PutDSL
- func (dsl *PutDSL) AppNamespace(appNs *l4.AppNamespaces_AppNamespace) linuxclient.PutDSL
- func (dsl *PutDSL) Arp(arp *l3.ArpTable_ArpEntry) linuxclient.PutDSL
- func (dsl *PutDSL) BD(val *l2.BridgeDomains_BridgeDomain) linuxclient.PutDSL
- func (dsl *PutDSL) BDFIB(fib *l2.FibTable_FibEntry) linuxclient.PutDSL
- func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) linuxclient.PutDSL
- func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) linuxclient.PutDSL
- func (dsl *PutDSL) BfdSession(val *bfd.SingleHopBFD_Session) linuxclient.PutDSL
- func (dsl *PutDSL) Delete() linuxclient.DeleteDSL
- func (dsl *PutDSL) L4Features(val *l4.L4Features) linuxclient.PutDSL
- func (dsl *PutDSL) LinuxArpEntry(val *linuxL3.LinuxStaticArpEntries_ArpEntry) linuxclient.PutDSL
- func (dsl *PutDSL) LinuxInterface(val *linuxIf.LinuxInterfaces_Interface) linuxclient.PutDSL
- func (dsl *PutDSL) LinuxRoute(val *linuxL3.LinuxStaticRoutes_Route) linuxclient.PutDSL
- func (dsl *PutDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) linuxclient.PutDSL
- func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) linuxclient.PutDSL
- func (dsl *PutDSL) ProxyArpInterfaces(arp *l3.ProxyArpInterfaces_InterfaceList) linuxclient.PutDSL
- func (dsl *PutDSL) ProxyArpRanges(arp *l3.ProxyArpRanges_RangeList) linuxclient.PutDSL
- func (dsl *PutDSL) Send() vppclient.Reply
- func (dsl *PutDSL) StaticRoute(val *l3.StaticRoutes_Route) linuxclient.PutDSL
- func (dsl *PutDSL) StnRule(stn *stn.STN_Rule) linuxclient.PutDSL
- func (dsl *PutDSL) VppInterface(val *interfaces.Interfaces_Interface) linuxclient.PutDSL
- func (dsl *PutDSL) XConnect(val *l2.XConnectPairs_XConnectPair) linuxclient.PutDSL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataChangeDSL ¶
type DataChangeDSL struct {
// contains filtered or unexported fields
}
DataChangeDSL is an implementation of Domain Specific Language (DSL) for changes of both Linux and VPP configuration.
func NewDataChangeDSL ¶
func NewDataChangeDSL(txn keyval.ProtoTxn) *DataChangeDSL
NewDataChangeDSL returns a new instance of DataChangeDSL which implements the data change DSL for both Linux and VPP config (inherits dbadapter from vppplugin). Transaction <txn> is used to propagate changes to plugins.
func (*DataChangeDSL) Delete ¶
func (dsl *DataChangeDSL) Delete() linuxclient.DeleteDSL
Delete initiates a chained sequence of data change DSL statements removing existing configurable objects.
func (*DataChangeDSL) Put ¶
func (dsl *DataChangeDSL) Put() linuxclient.PutDSL
Put initiates a chained sequence of data change DSL statements and declares new configurable objects or changes existing ones.
func (*DataChangeDSL) Send ¶
func (dsl *DataChangeDSL) Send() vppclient.Reply
Send propagates requested changes to the plugins.
type DataResyncDSL ¶
type DataResyncDSL struct {
// contains filtered or unexported fields
}
DataResyncDSL is an implementation of Domain Specific Language (DSL) for data RESYNC of both Linux and VPP configuration.
func NewDataResyncDSL ¶
func NewDataResyncDSL(txn keyval.ProtoTxn, listKeys func(prefix string) (keyval.ProtoKeyIterator, error)) *DataResyncDSL
NewDataResyncDSL returns a new instance of DataResyncDSL which implements the data RESYNC DSL for both Linux and VPP config (inherits dbadapter from vppplugin). Transaction <txn> is used to propagate changes to plugins. Function <listKeys> is used to list keys with already existing configuration.
func (*DataResyncDSL) ACL ¶
func (dsl *DataResyncDSL) ACL(acl *acl.AccessLists_Acl) linuxclient.DataResyncDSL
ACL adds VPP Access Control List to the RESYNC request.
func (*DataResyncDSL) AppNamespace ¶ added in v1.4.0
func (dsl *DataResyncDSL) AppNamespace(appNs *l4.AppNamespaces_AppNamespace) linuxclient.DataResyncDSL
AppNamespace adds VPP Application namespaces to the RESYNC request
func (*DataResyncDSL) Arp ¶ added in v1.4.0
func (dsl *DataResyncDSL) Arp(arp *l3.ArpTable_ArpEntry) linuxclient.DataResyncDSL
Arp adds VPP L3 ARP to the RESYNC request.
func (*DataResyncDSL) BD ¶
func (dsl *DataResyncDSL) BD(bd *l2.BridgeDomains_BridgeDomain) linuxclient.DataResyncDSL
BD adds VPP Bridge Domain to the RESYNC request.
func (*DataResyncDSL) BDFIB ¶
func (dsl *DataResyncDSL) BDFIB(fib *l2.FibTable_FibEntry) linuxclient.DataResyncDSL
BDFIB adds VPP L2 FIB to the RESYNC request.
func (*DataResyncDSL) BfdAuthKeys ¶ added in v1.0.5
func (dsl *DataResyncDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) linuxclient.DataResyncDSL
BfdAuthKeys adds VPP bidirectional forwarding detection key to the RESYNC request.
func (*DataResyncDSL) BfdEchoFunction ¶ added in v1.0.5
func (dsl *DataResyncDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) linuxclient.DataResyncDSL
BfdEchoFunction adds VPP bidirectional forwarding detection echo function to the RESYNC request.
func (*DataResyncDSL) BfdSession ¶ added in v1.0.5
func (dsl *DataResyncDSL) BfdSession(val *bfd.SingleHopBFD_Session) linuxclient.DataResyncDSL
BfdSession adds VPP bidirectional forwarding detection session to the RESYNC request.
func (*DataResyncDSL) L4Features ¶ added in v1.4.0
func (dsl *DataResyncDSL) L4Features(val *l4.L4Features) linuxclient.DataResyncDSL
L4Features adds L4 features to the RESYNC request
func (*DataResyncDSL) LinuxArpEntry ¶ added in v1.0.7
func (dsl *DataResyncDSL) LinuxArpEntry(val *linuxL3.LinuxStaticArpEntries_ArpEntry) linuxclient.DataResyncDSL
LinuxArpEntry adds Linux ARP entry to the RESYNC request.
func (*DataResyncDSL) LinuxInterface ¶
func (dsl *DataResyncDSL) LinuxInterface(val *linuxIf.LinuxInterfaces_Interface) linuxclient.DataResyncDSL
LinuxInterface adds Linux interface to the RESYNC request.
func (*DataResyncDSL) LinuxRoute ¶ added in v1.0.7
func (dsl *DataResyncDSL) LinuxRoute(val *linuxL3.LinuxStaticRoutes_Route) linuxclient.DataResyncDSL
LinuxRoute adds Linux route to the RESYNC request.
func (*DataResyncDSL) NAT44DNat ¶ added in v1.4.0
func (dsl *DataResyncDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) linuxclient.DataResyncDSL
NAT44DNat adds a request to RESYNC a new DNAT configuration
func (*DataResyncDSL) NAT44Global ¶ added in v1.4.0
func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) linuxclient.DataResyncDSL
NAT44Global adds a request to RESYNC global configuration for NAT44
func (*DataResyncDSL) ProxyArpInterfaces ¶ added in v1.4.0
func (dsl *DataResyncDSL) ProxyArpInterfaces(val *l3.ProxyArpInterfaces_InterfaceList) linuxclient.DataResyncDSL
ProxyArpInterfaces adds L3 proxy ARP interfaces to the RESYNC request.
func (*DataResyncDSL) ProxyArpRanges ¶ added in v1.4.0
func (dsl *DataResyncDSL) ProxyArpRanges(val *l3.ProxyArpRanges_RangeList) linuxclient.DataResyncDSL
ProxyArpRanges adds L3 proxy ARP ranges to the RESYNC request.
func (*DataResyncDSL) Send ¶
func (dsl *DataResyncDSL) Send() vppclient.Reply
Send propagates the request to the plugins. It deletes obsolete keys if listKeys() (from constructor) function is not nil.
func (*DataResyncDSL) StaticRoute ¶
func (dsl *DataResyncDSL) StaticRoute(staticRoute *l3.StaticRoutes_Route) linuxclient.DataResyncDSL
StaticRoute adds VPP L3 Static Route to the RESYNC request.
func (*DataResyncDSL) StnRule ¶ added in v1.4.0
func (dsl *DataResyncDSL) StnRule(stn *stn.STN_Rule) linuxclient.DataResyncDSL
StnRule adds Stn rule to the RESYNC request.
func (*DataResyncDSL) VppInterface ¶
func (dsl *DataResyncDSL) VppInterface(intf *interfaces.Interfaces_Interface) linuxclient.DataResyncDSL
VppInterface adds VPP interface to the RESYNC request.
func (*DataResyncDSL) XConnect ¶
func (dsl *DataResyncDSL) XConnect(xcon *l2.XConnectPairs_XConnectPair) linuxclient.DataResyncDSL
XConnect adds VPP Cross Connect to the RESYNC request.
type DeleteDSL ¶
type DeleteDSL struct {
// contains filtered or unexported fields
}
DeleteDSL implements delete operations of data change DSL.
func (*DeleteDSL) AppNamespace ¶ added in v1.4.0
AppNamespace adds a request to delete VPP Application namespace Note: current version does not support application namespace deletion
func (*DeleteDSL) BDFIB ¶
BDFIB adds a request to delete an existing VPP L2 Forwarding Information Base.
func (*DeleteDSL) BfdAuthKeys ¶ added in v1.0.5
BfdAuthKeys adds a request to delete an existing VPP bidirectional forwarding detection key.
func (*DeleteDSL) BfdEchoFunction ¶ added in v1.0.5
BfdEchoFunction adds a request to delete an existing VPP bidirectional forwarding detection echo function.
func (*DeleteDSL) BfdSession ¶ added in v1.0.5
BfdSession adds a request to delete an existing VPP bidirectional forwarding detection session.
func (*DeleteDSL) L4Features ¶ added in v1.4.0
func (dsl *DeleteDSL) L4Features() linuxclient.DeleteDSL
L4Features adds a request to enable or disable L4 features
func (*DeleteDSL) LinuxArpEntry ¶ added in v1.0.7
LinuxArpEntry adds a request to delete Linux ARP entry.
func (*DeleteDSL) LinuxInterface ¶
LinuxInterface adds a request to delete an existing Linux network interface.
func (*DeleteDSL) LinuxRoute ¶ added in v1.0.7
LinuxRoute adds a request to delete Linux route.
func (*DeleteDSL) NAT44DNat ¶ added in v1.4.0
NAT44DNat adds a request to delete a new DNAT configuration
func (*DeleteDSL) NAT44Global ¶ added in v1.4.0
func (dsl *DeleteDSL) NAT44Global() linuxclient.DeleteDSL
NAT44Global adds a request to remove global configuration for NAT44
func (*DeleteDSL) ProxyArpInterfaces ¶ added in v1.4.0
ProxyArpInterfaces adds a request to delete an existing VPP L3 proxy ARP interfaces
func (*DeleteDSL) ProxyArpRanges ¶ added in v1.4.0
ProxyArpRanges adds a request to delete an existing VPP L3 proxy ARP ranges
func (*DeleteDSL) Put ¶
func (dsl *DeleteDSL) Put() linuxclient.PutDSL
Put changes the DSL mode to allow configuration editing.
func (*DeleteDSL) Send ¶
func (dsl *DeleteDSL) Send() vppclient.Reply
Send propagates requested changes to the plugins.
func (*DeleteDSL) StaticRoute ¶
func (dsl *DeleteDSL) StaticRoute(vrf uint32, dstAddr string, nextHopAddr string) linuxclient.DeleteDSL
StaticRoute adds a request to delete an existing VPP L3 Static Route.
func (*DeleteDSL) StnRule ¶ added in v1.4.0
StnRule adds a request to delete an existing VPP Stn rule.
func (*DeleteDSL) VppInterface ¶
VppInterface adds a request to delete an existing VPP network interface.
type PutDSL ¶
type PutDSL struct {
// contains filtered or unexported fields
}
PutDSL implements put operations of data change DSL.
func (*PutDSL) ACL ¶
func (dsl *PutDSL) ACL(acl *acl.AccessLists_Acl) linuxclient.PutDSL
ACL adds a request to create or update VPP Access Control List.
func (*PutDSL) AppNamespace ¶ added in v1.4.0
func (dsl *PutDSL) AppNamespace(appNs *l4.AppNamespaces_AppNamespace) linuxclient.PutDSL
AppNamespace adds a request to create or update VPP Application namespace
func (*PutDSL) Arp ¶ added in v1.4.0
func (dsl *PutDSL) Arp(arp *l3.ArpTable_ArpEntry) linuxclient.PutDSL
Arp adds a request to create or update VPP L3 ARP.
func (*PutDSL) BD ¶
func (dsl *PutDSL) BD(val *l2.BridgeDomains_BridgeDomain) linuxclient.PutDSL
BD adds a request to create or update VPP Bridge Domain.
func (*PutDSL) BDFIB ¶
func (dsl *PutDSL) BDFIB(fib *l2.FibTable_FibEntry) linuxclient.PutDSL
BDFIB adds a request to create or update VPP L2 Forwarding Information Base.
func (*PutDSL) BfdAuthKeys ¶ added in v1.0.5
func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) linuxclient.PutDSL
BfdAuthKeys adds a request to create or update VPP bidirectional forwarding detection key.
func (*PutDSL) BfdEchoFunction ¶ added in v1.0.5
func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) linuxclient.PutDSL
BfdEchoFunction adds a request to create or update VPP bidirectional forwarding detection echo function.
func (*PutDSL) BfdSession ¶ added in v1.0.5
func (dsl *PutDSL) BfdSession(val *bfd.SingleHopBFD_Session) linuxclient.PutDSL
BfdSession adds a request to create or update VPP bidirectional forwarding detection session.
func (*PutDSL) Delete ¶
func (dsl *PutDSL) Delete() linuxclient.DeleteDSL
Delete changes the DSL mode to allow removal of an existing configuration.
func (*PutDSL) L4Features ¶ added in v1.4.0
func (dsl *PutDSL) L4Features(val *l4.L4Features) linuxclient.PutDSL
L4Features adds a request to enable or disable L4 features
func (*PutDSL) LinuxArpEntry ¶ added in v1.0.7
func (dsl *PutDSL) LinuxArpEntry(val *linuxL3.LinuxStaticArpEntries_ArpEntry) linuxclient.PutDSL
LinuxArpEntry adds a request to create or update Linux ARP entry.
func (*PutDSL) LinuxInterface ¶
func (dsl *PutDSL) LinuxInterface(val *linuxIf.LinuxInterfaces_Interface) linuxclient.PutDSL
LinuxInterface adds a request to create or update Linux network interface.
func (*PutDSL) LinuxRoute ¶ added in v1.0.7
func (dsl *PutDSL) LinuxRoute(val *linuxL3.LinuxStaticRoutes_Route) linuxclient.PutDSL
LinuxRoute adds a request to create or update Linux route.
func (*PutDSL) NAT44DNat ¶ added in v1.4.0
func (dsl *PutDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) linuxclient.PutDSL
NAT44DNat adds a request to create a new DNAT configuration
func (*PutDSL) NAT44Global ¶ added in v1.4.0
func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) linuxclient.PutDSL
NAT44Global adds a request to set global configuration for NAT44
func (*PutDSL) ProxyArpInterfaces ¶ added in v1.4.0
func (dsl *PutDSL) ProxyArpInterfaces(arp *l3.ProxyArpInterfaces_InterfaceList) linuxclient.PutDSL
ProxyArpInterfaces adds a request to create or update VPP L3 proxy ARP interfaces.
func (*PutDSL) ProxyArpRanges ¶ added in v1.4.0
func (dsl *PutDSL) ProxyArpRanges(arp *l3.ProxyArpRanges_RangeList) linuxclient.PutDSL
ProxyArpRanges adds a request to create or update VPP L3 proxy ARP ranges
func (*PutDSL) Send ¶
func (dsl *PutDSL) Send() vppclient.Reply
Send propagates requested changes to the plugins.
func (*PutDSL) StaticRoute ¶
func (dsl *PutDSL) StaticRoute(val *l3.StaticRoutes_Route) linuxclient.PutDSL
StaticRoute adds a request to create or update VPP L3 Static Route.
func (*PutDSL) VppInterface ¶
func (dsl *PutDSL) VppInterface(val *interfaces.Interfaces_Interface) linuxclient.PutDSL
VppInterface adds a request to create or update VPP network interface.
func (*PutDSL) XConnect ¶
func (dsl *PutDSL) XConnect(val *l2.XConnectPairs_XConnectPair) linuxclient.PutDSL
XConnect adds a request to create or update VPP Cross Connect.