Documentation
¶
Overview ¶
Package dbadapter implements Domain Specific Language (DSL) for resync and change of VPP configuration using Data Broker (by writing to key value store).
Index ¶
- type DataChangeDSL
- type DataResyncDSL
- func (dsl *DataResyncDSL) ABF(val *abf.ABF) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) ACL(val *acl.ACL) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Arp(val *l3.ARPEntry) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BD(val *l2.BridgeDomain) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BDFIB(val *l2.FIBEntry) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) DNAT44(nat44 *nat.DNat44) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) IPSecSA(sa *ipsec.SecurityAssociation) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabase) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Interface(val *intf.Interface) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) ProxyArp(proxyArp *l3.ProxyARP) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) PuntException(val *punt.Exception) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) PuntIPRedirect(val *punt.IPRedirect) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) PuntToHost(val *punt.ToHost) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Send() vppclient.Reply
- func (dsl *DataResyncDSL) StaticRoute(val *l3.Route) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) StnRule(val *stn.Rule) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) VrfTable(val *l3.VrfTable) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) XConnect(val *l2.XConnectPair) vppclient.DataResyncDSL
- type DeleteDSL
- func (dsl *DeleteDSL) ABF(abfIndex uint32) vppclient.DeleteDSL
- func (dsl *DeleteDSL) ACL(aclName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) Arp(ifaceName string, ipAddr string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) BD(bdName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) BDFIB(bdName string, mac string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) DNAT44(label string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) IPScanNeighbor() vppclient.DeleteDSL
- func (dsl *DeleteDSL) IPSecSA(saIndex string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) IPSecSPD(spdIndex string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) Interface(interfaceName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) NAT44Global() vppclient.DeleteDSL
- func (dsl *DeleteDSL) ProxyArp() vppclient.DeleteDSL
- func (dsl *DeleteDSL) PuntException(reason string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) PuntIPRedirect(l3Proto punt.L3Protocol, txInterface string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) PuntToHost(l3Proto punt.L3Protocol, l4Proto punt.L4Protocol, port uint32) vppclient.DeleteDSL
- func (dsl *DeleteDSL) Put() vppclient.PutDSL
- func (dsl *DeleteDSL) Send() vppclient.Reply
- func (dsl *DeleteDSL) StaticRoute(iface string, vrf uint32, dstAddr string, nextHopAddr string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) StnRule(iface, addr string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) VrfTable(id uint32, proto l3.VrfTable_Protocol) vppclient.DeleteDSL
- func (dsl *DeleteDSL) XConnect(rxIfName string) vppclient.DeleteDSL
- type PutDSL
- func (dsl *PutDSL) ABF(val *abf.ABF) vppclient.PutDSL
- func (dsl *PutDSL) ACL(val *acl.ACL) vppclient.PutDSL
- func (dsl *PutDSL) Arp(arp *l3.ARPEntry) vppclient.PutDSL
- func (dsl *PutDSL) BD(val *l2.BridgeDomain) vppclient.PutDSL
- func (dsl *PutDSL) BDFIB(val *l2.FIBEntry) vppclient.PutDSL
- func (dsl *PutDSL) DNAT44(nat44 *nat.DNat44) vppclient.PutDSL
- func (dsl *PutDSL) Delete() vppclient.DeleteDSL
- func (dsl *PutDSL) IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) vppclient.PutDSL
- func (dsl *PutDSL) IPSecSA(sa *ipsec.SecurityAssociation) vppclient.PutDSL
- func (dsl *PutDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabase) vppclient.PutDSL
- func (dsl *PutDSL) Interface(val *intf.Interface) vppclient.PutDSL
- func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.PutDSL
- func (dsl *PutDSL) ProxyArp(proxyArp *l3.ProxyARP) vppclient.PutDSL
- func (dsl *PutDSL) PuntException(val *punt.Exception) vppclient.PutDSL
- func (dsl *PutDSL) PuntIPRedirect(val *punt.IPRedirect) vppclient.PutDSL
- func (dsl *PutDSL) PuntToHost(val *punt.ToHost) vppclient.PutDSL
- func (dsl *PutDSL) Send() vppclient.Reply
- func (dsl *PutDSL) StaticRoute(val *l3.Route) vppclient.PutDSL
- func (dsl *PutDSL) StnRule(val *stn.Rule) vppclient.PutDSL
- func (dsl *PutDSL) VrfTable(val *l3.VrfTable) vppclient.PutDSL
- func (dsl *PutDSL) XConnect(val *l2.XConnectPair) vppclient.PutDSL
- type Reply
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 the VPP configuration.
func NewDataChangeDSL ¶
func NewDataChangeDSL(txn keyval.ProtoTxn) *DataChangeDSL
NewDataChangeDSL returns a new instance of DataChangeDSL which implements the data change DSL for VPP config. Transaction <txn> is used to propagate changes to plugins.
func (*DataChangeDSL) Delete ¶
func (dsl *DataChangeDSL) Delete() vppclient.DeleteDSL
Delete initiates a chained sequence of data change DSL statements removing existing configurable objects.
func (*DataChangeDSL) Put ¶
func (dsl *DataChangeDSL) Put() vppclient.PutDSL
Put initiates a chained sequence of data change DSL statements declaring new configurable objects or changing 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 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 VPP configuration. Transaction <txn> is used to propagate changes to plugins. Function <listKeys> is used to list keys with already existing configuration.
func (*DataResyncDSL) ABF ¶
func (dsl *DataResyncDSL) ABF(val *abf.ABF) vppclient.DataResyncDSL
ABF adds ACL-based forwarding to the RESYNC request.
func (*DataResyncDSL) ACL ¶
func (dsl *DataResyncDSL) ACL(val *acl.ACL) vppclient.DataResyncDSL
ACL adds Access Control List to the RESYNC request.
func (*DataResyncDSL) Arp ¶
func (dsl *DataResyncDSL) Arp(val *l3.ARPEntry) vppclient.DataResyncDSL
Arp adds L3 ARP entry to the RESYNC request.
func (*DataResyncDSL) BD ¶
func (dsl *DataResyncDSL) BD(val *l2.BridgeDomain) vppclient.DataResyncDSL
BD adds Bridge Domain to the RESYNC request.
func (*DataResyncDSL) BDFIB ¶
func (dsl *DataResyncDSL) BDFIB(val *l2.FIBEntry) vppclient.DataResyncDSL
BDFIB adds Bridge Domain to the RESYNC request.
func (*DataResyncDSL) DNAT44 ¶
func (dsl *DataResyncDSL) DNAT44(nat44 *nat.DNat44) vppclient.DataResyncDSL
DNAT44 adds DNAT44 configuration to the RESYNC request
func (*DataResyncDSL) IPScanNeighbor ¶
func (dsl *DataResyncDSL) IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) vppclient.DataResyncDSL
IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
func (*DataResyncDSL) IPSecSA ¶
func (dsl *DataResyncDSL) IPSecSA(sa *ipsec.SecurityAssociation) vppclient.DataResyncDSL
IPSecSA adds request to create a new Security Association
func (*DataResyncDSL) IPSecSPD ¶
func (dsl *DataResyncDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabase) vppclient.DataResyncDSL
IPSecSPD adds request to create a new Security Policy Database
func (*DataResyncDSL) Interface ¶
func (dsl *DataResyncDSL) Interface(val *intf.Interface) vppclient.DataResyncDSL
Interface adds VPP interface to the RESYNC request.
func (*DataResyncDSL) NAT44Global ¶
func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.DataResyncDSL
NAT44Global adds global NAT44 configuration to the RESYNC request.
func (*DataResyncDSL) ProxyArp ¶
func (dsl *DataResyncDSL) ProxyArp(proxyArp *l3.ProxyARP) vppclient.DataResyncDSL
ProxyArp adds L3 proxy ARP to the RESYNC request.
func (*DataResyncDSL) PuntException ¶
func (dsl *DataResyncDSL) PuntException(val *punt.Exception) vppclient.DataResyncDSL
PuntException adds request to create or update exception to punt specific packets.
func (*DataResyncDSL) PuntIPRedirect ¶
func (dsl *DataResyncDSL) PuntIPRedirect(val *punt.IPRedirect) vppclient.DataResyncDSL
PuntIPRedirect adds request to RESYNC a rule used to punt L3 traffic via interface.
func (*DataResyncDSL) PuntToHost ¶
func (dsl *DataResyncDSL) PuntToHost(val *punt.ToHost) vppclient.DataResyncDSL
PuntToHost adds request to RESYNC a rule used to punt L4 traffic to a host.
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(val *l3.Route) vppclient.DataResyncDSL
StaticRoute adds L3 Static Route to the RESYNC request.
func (*DataResyncDSL) StnRule ¶
func (dsl *DataResyncDSL) StnRule(val *stn.Rule) vppclient.DataResyncDSL
StnRule adds Stn rule to the RESYNC request.
func (*DataResyncDSL) VrfTable ¶
func (dsl *DataResyncDSL) VrfTable(val *l3.VrfTable) vppclient.DataResyncDSL
VrfTable adds VRF table to the RESYNC request.
func (*DataResyncDSL) XConnect ¶
func (dsl *DataResyncDSL) XConnect(val *l2.XConnectPair) vppclient.DataResyncDSL
XConnect adds 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) BDFIB ¶
BDFIB adds a request to delete an existing VPP L2 Forwarding Information Base.
func (*DeleteDSL) IPScanNeighbor ¶
IPScanNeighbor adds a request to delete an existing VPP L3 IP Scan Neighbor.
func (*DeleteDSL) NAT44Global ¶
NAT44Global adds a request to remove global configuration for NAT44
func (*DeleteDSL) PuntException ¶
PuntException adds request to delete exception to punt specific packets.
func (*DeleteDSL) PuntIPRedirect ¶
func (dsl *DeleteDSL) PuntIPRedirect(l3Proto punt.L3Protocol, txInterface string) vppclient.DeleteDSL
PuntIPRedirect adds request to delete a rule used to punt L3 traffic via interface.
func (*DeleteDSL) PuntToHost ¶
func (dsl *DeleteDSL) PuntToHost(l3Proto punt.L3Protocol, l4Proto punt.L4Protocol, port uint32) vppclient.DeleteDSL
PuntToHost adds request to delete a rule used to punt L4 traffic to a host.
func (*DeleteDSL) StaticRoute ¶
func (dsl *DeleteDSL) StaticRoute(iface string, vrf uint32, dstAddr string, nextHopAddr string) vppclient.DeleteDSL
StaticRoute adds a request to delete an existing VPP L3 Static Route.
type PutDSL ¶
type PutDSL struct {
// contains filtered or unexported fields
}
PutDSL implements put operations of data change DSL.
func (*PutDSL) BD ¶
func (dsl *PutDSL) BD(val *l2.BridgeDomain) vppclient.PutDSL
BD adds a request to create or update VPP Bridge Domain.
func (*PutDSL) IPScanNeighbor ¶
func (dsl *PutDSL) IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) vppclient.PutDSL
IPScanNeighbor adds L3 IP Scan Neighbor to the RESYNC request.
func (*PutDSL) IPSecSA ¶
func (dsl *PutDSL) IPSecSA(sa *ipsec.SecurityAssociation) vppclient.PutDSL
IPSecSA adds request to create a new Security Association
func (*PutDSL) IPSecSPD ¶
func (dsl *PutDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabase) vppclient.PutDSL
IPSecSPD adds request to create a new Security Policy Database
func (*PutDSL) NAT44Global ¶
func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.PutDSL
NAT44Global adds a request to set global configuration for NAT44
func (*PutDSL) PuntException ¶
PuntException adds request to create or update exception to punt specific packets.
func (*PutDSL) PuntIPRedirect ¶
func (dsl *PutDSL) PuntIPRedirect(val *punt.IPRedirect) vppclient.PutDSL
PuntIPRedirect adds request to create or update rule to punt L3 traffic via interface.
func (*PutDSL) PuntToHost ¶
PuntToHost adds request to create or update rule to punt L4 traffic to a host.
func (*PutDSL) StaticRoute ¶
StaticRoute adds a request to create or update VPP L3 Static Route.
type Reply ¶
type Reply struct {
// contains filtered or unexported fields
}
Reply interface allows to wait for a reply to previously called Send() and extract the result from it (success/error).
func (Reply) ReceiveReply ¶
ReceiveReply waits for a reply to previously called Send() and returns the result (error or nil).