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) ACL(val *acl.Acl) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) AppNamespace(val *l4.AppNamespaces_AppNamespace) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Arp(val *l3.ArpTable_ArpEntry) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BD(val *l2.BridgeDomain) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BDFIB(val *l2.FIBEntry) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) BfdSession(val *bfd.SingleHopBFD_Session) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) IPSecSA(sa *ipsec.SecurityAssociations_SA) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Interface(val *intf.Interface) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) L4Features(val *l4.L4Features) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) ProxyArpInterfaces(val *l3.ProxyArpInterfaces_InterfaceList) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) ProxyArpRanges(val *l3.ProxyArpRanges_RangeList) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) Send() vppclient.Reply
- func (dsl *DataResyncDSL) StaticRoute(val *l3.StaticRoutes_Route) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) StnRule(val *stn.STN_Rule) vppclient.DataResyncDSL
- func (dsl *DataResyncDSL) XConnect(val *l2.XConnectPair) vppclient.DataResyncDSL
- type DeleteDSL
- func (dsl *DeleteDSL) ACL(aclName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) AppNamespace(id 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) BfdAuthKeys(bfdKey string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) BfdEchoFunction(bfdEchoName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) BfdSession(bfdSessionIfaceName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) IPSecSA(saName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) IPSecSPD(spdName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) Interface(interfaceName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) L4Features() vppclient.DeleteDSL
- func (dsl *DeleteDSL) NAT44DNat(label string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) NAT44Global() vppclient.DeleteDSL
- func (dsl *DeleteDSL) ProxyArpInterfaces(label string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) ProxyArpRanges(label string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) Put() vppclient.PutDSL
- func (dsl *DeleteDSL) Send() vppclient.Reply
- func (dsl *DeleteDSL) StaticRoute(vrf uint32, dstAddr string, nextHopAddr string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) StnRule(ruleName string) vppclient.DeleteDSL
- func (dsl *DeleteDSL) XConnect(rxIfName string) vppclient.DeleteDSL
- type PutDSL
- func (dsl *PutDSL) ACL(val *acl.Acl) vppclient.PutDSL
- func (dsl *PutDSL) AppNamespace(val *l4.AppNamespaces_AppNamespace) vppclient.PutDSL
- func (dsl *PutDSL) Arp(arp *l3.ArpTable_ArpEntry) vppclient.PutDSL
- func (dsl *PutDSL) BD(val *l2.BridgeDomain) vppclient.PutDSL
- func (dsl *PutDSL) BDFIB(val *l2.FIBEntry) vppclient.PutDSL
- func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) vppclient.PutDSL
- func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) vppclient.PutDSL
- func (dsl *PutDSL) BfdSession(val *bfd.SingleHopBFD_Session) vppclient.PutDSL
- func (dsl *PutDSL) Delete() vppclient.DeleteDSL
- func (dsl *PutDSL) IPSecSA(sa *ipsec.SecurityAssociations_SA) vppclient.PutDSL
- func (dsl *PutDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) vppclient.PutDSL
- func (dsl *PutDSL) Interface(val *intf.Interface) vppclient.PutDSL
- func (dsl *PutDSL) L4Features(val *l4.L4Features) vppclient.PutDSL
- func (dsl *PutDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) vppclient.PutDSL
- func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.PutDSL
- func (dsl *PutDSL) ProxyArpInterfaces(arp *l3.ProxyArpInterfaces_InterfaceList) vppclient.PutDSL
- func (dsl *PutDSL) ProxyArpRanges(arp *l3.ProxyArpRanges_RangeList) vppclient.PutDSL
- func (dsl *PutDSL) Send() vppclient.Reply
- func (dsl *PutDSL) StaticRoute(val *l3.StaticRoutes_Route) vppclient.PutDSL
- func (dsl *PutDSL) StnRule(val *stn.STN_Rule) 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) ACL ¶
func (dsl *DataResyncDSL) ACL(val *acl.Acl) vppclient.DataResyncDSL
ACL adds Access Control List to the RESYNC request.
func (*DataResyncDSL) AppNamespace ¶
func (dsl *DataResyncDSL) AppNamespace(val *l4.AppNamespaces_AppNamespace) vppclient.DataResyncDSL
AppNamespace adds Application Namespace to the RESYNC request
func (*DataResyncDSL) Arp ¶
func (dsl *DataResyncDSL) Arp(val *l3.ArpTable_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) BfdAuthKeys ¶
func (dsl *DataResyncDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) vppclient.DataResyncDSL
BfdAuthKeys adds bidirectional forwarding detection key to the RESYNC request.
func (*DataResyncDSL) BfdEchoFunction ¶
func (dsl *DataResyncDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) vppclient.DataResyncDSL
BfdEchoFunction adds bidirectional forwarding detection echo function to the RESYNC request.
func (*DataResyncDSL) BfdSession ¶
func (dsl *DataResyncDSL) BfdSession(val *bfd.SingleHopBFD_Session) vppclient.DataResyncDSL
BfdSession adds bidirectional forwarding detection session to the RESYNC request.
func (*DataResyncDSL) IPSecSA ¶
func (dsl *DataResyncDSL) IPSecSA(sa *ipsec.SecurityAssociations_SA) vppclient.DataResyncDSL
IPSecSA adds request to create a new Security Association
func (*DataResyncDSL) IPSecSPD ¶
func (dsl *DataResyncDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) 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) L4Features ¶
func (dsl *DataResyncDSL) L4Features(val *l4.L4Features) vppclient.DataResyncDSL
L4Features adds L4Features to the RESYNC request
func (*DataResyncDSL) NAT44DNat ¶
func (dsl *DataResyncDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) vppclient.DataResyncDSL
NAT44DNat adds a request to RESYNC a new DNAT configuration
func (*DataResyncDSL) NAT44Global ¶
func (dsl *DataResyncDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.DataResyncDSL
NAT44Global adds a request to RESYNC global configuration for NAT44
func (*DataResyncDSL) ProxyArpInterfaces ¶
func (dsl *DataResyncDSL) ProxyArpInterfaces(val *l3.ProxyArpInterfaces_InterfaceList) vppclient.DataResyncDSL
ProxyArpInterfaces adds L3 proxy ARP interfaces to the RESYNC request.
func (*DataResyncDSL) ProxyArpRanges ¶
func (dsl *DataResyncDSL) ProxyArpRanges(val *l3.ProxyArpRanges_RangeList) vppclient.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(val *l3.StaticRoutes_Route) vppclient.DataResyncDSL
StaticRoute adds L3 Static Route to the RESYNC request.
func (*DataResyncDSL) StnRule ¶
func (dsl *DataResyncDSL) StnRule(val *stn.STN_Rule) vppclient.DataResyncDSL
StnRule adds Stn rule 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) AppNamespace ¶
AppNamespace adds a request to delete an existing VPP Application Namespace.
func (*DeleteDSL) BDFIB ¶
BDFIB adds a request to delete an existing VPP L2 Forwarding Information Base.
func (*DeleteDSL) BfdAuthKeys ¶
BfdAuthKeys adds a request to delete an existing bidirectional forwarding detection key.
func (*DeleteDSL) BfdEchoFunction ¶
BfdEchoFunction adds a request to delete an existing bidirectional forwarding detection echo function.
func (*DeleteDSL) BfdSession ¶
BfdSession adds a request to delete an existing bidirectional forwarding detection session.
func (*DeleteDSL) L4Features ¶
func (dsl *DeleteDSL) L4Features() vppclient.DeleteDSL
L4Features delete request for the L4Features
func (*DeleteDSL) NAT44Global ¶
func (dsl *DeleteDSL) NAT44Global() vppclient.DeleteDSL
NAT44Global adds a request to remove global configuration for NAT44
func (*DeleteDSL) ProxyArpInterfaces ¶
ProxyArpInterfaces adds a request to delete an existing VPP L3 proxy ARP interfaces
func (*DeleteDSL) ProxyArpRanges ¶
ProxyArpRanges adds a request to delete an existing VPP L3 proxy ARP ranges
func (*DeleteDSL) Put ¶
func (dsl *DeleteDSL) Put() vppclient.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) 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) AppNamespace ¶
func (dsl *PutDSL) AppNamespace(val *l4.AppNamespaces_AppNamespace) vppclient.PutDSL
AppNamespace create or update request for the Application Namespaces List
func (*PutDSL) Arp ¶
func (dsl *PutDSL) Arp(arp *l3.ArpTable_ArpEntry) vppclient.PutDSL
Arp adds a request to create or update VPP L3 ARP entry.
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) BfdAuthKeys ¶
func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) vppclient.PutDSL
BfdAuthKeys adds a request to create or update bidirectional forwarding detection key.
func (*PutDSL) BfdEchoFunction ¶
func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) vppclient.PutDSL
BfdEchoFunction adds a request to create or update bidirectional forwarding detection echo function.
func (*PutDSL) BfdSession ¶
func (dsl *PutDSL) BfdSession(val *bfd.SingleHopBFD_Session) vppclient.PutDSL
BfdSession adds a request to create or update bidirectional forwarding detection session.
func (*PutDSL) Delete ¶
func (dsl *PutDSL) Delete() vppclient.DeleteDSL
Delete changes the DSL mode to allow removal of an existing configuration.
func (*PutDSL) IPSecSA ¶
func (dsl *PutDSL) IPSecSA(sa *ipsec.SecurityAssociations_SA) vppclient.PutDSL
IPSecSA adds request to create a new Security Association
func (*PutDSL) IPSecSPD ¶
func (dsl *PutDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabases_SPD) vppclient.PutDSL
IPSecSPD adds request to create a new Security Policy Database
func (*PutDSL) L4Features ¶
func (dsl *PutDSL) L4Features(val *l4.L4Features) vppclient.PutDSL
L4Features create or update request for the L4Features
func (*PutDSL) NAT44DNat ¶
func (dsl *PutDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) vppclient.PutDSL
NAT44DNat adds a request to create a new DNAT configuration
func (*PutDSL) NAT44Global ¶
func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) vppclient.PutDSL
NAT44Global adds a request to set global configuration for NAT44
func (*PutDSL) ProxyArpInterfaces ¶
func (dsl *PutDSL) ProxyArpInterfaces(arp *l3.ProxyArpInterfaces_InterfaceList) vppclient.PutDSL
ProxyArpInterfaces adds a request to create or update VPP L3 proxy ARP interfaces.
func (*PutDSL) ProxyArpRanges ¶
func (dsl *PutDSL) ProxyArpRanges(arp *l3.ProxyArpRanges_RangeList) vppclient.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) vppclient.PutDSL
StaticRoute adds a request to create or update VPP L3 Static Route.
func (*PutDSL) XConnect ¶
func (dsl *PutDSL) XConnect(val *l2.XConnectPair) vppclient.PutDSL
XConnect adds a request to create or update VPP Cross Connect.
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).