dbadapter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

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

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() defaultplugins.DeleteDSL

Delete initiates a chained sequence of data change DSL statements removing existing configurable objects.

func (*DataChangeDSL) Put

func (dsl *DataChangeDSL) Put() defaultplugins.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() defaultplugins.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

ACL adds Access Control List to the RESYNC request.

func (*DataResyncDSL) AppNamespace added in v1.0.8

AppNamespace adds Application Namespace to the RESYNC request

func (*DataResyncDSL) Arp added in v1.0.8

Arp adds L3 ARP entry to the RESYNC request.

func (*DataResyncDSL) BD

BD adds Bridge Domain to the RESYNC request.

func (*DataResyncDSL) BDFIB

BDFIB adds Bridge Domain to the RESYNC request.

func (*DataResyncDSL) BfdAuthKeys added in v1.0.5

BfdAuthKeys adds bidirectional forwarding detection key to the RESYNC request.

func (*DataResyncDSL) BfdEchoFunction

BfdEchoFunction adds bidirectional forwarding detection echo function to the RESYNC request.

func (*DataResyncDSL) BfdSession

BfdSession adds bidirectional forwarding detection session to the RESYNC request.

func (*DataResyncDSL) IPSecSA added in v1.4.0

IPSecSA adds request to create a new Security Association

func (*DataResyncDSL) IPSecSPD added in v1.4.0

IPSecSPD adds request to create a new Security Policy Database

func (*DataResyncDSL) Interface

Interface adds VPP interface to the RESYNC request.

func (*DataResyncDSL) L4Features added in v1.0.8

func (dsl *DataResyncDSL) L4Features(val *l4.L4Features) defaultplugins.DataResyncDSL

L4Features adds L4Features to the RESYNC request

func (*DataResyncDSL) NAT44DNat added in v1.4.0

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) defaultplugins.DataResyncDSL

NAT44Global adds a request to RESYNC global configuration for NAT44

func (*DataResyncDSL) ProxyArpInterfaces added in v1.4.0

ProxyArpInterfaces adds L3 proxy ARP interfaces to the RESYNC request.

func (*DataResyncDSL) ProxyArpRanges added in v1.4.0

ProxyArpRanges adds L3 proxy ARP ranges to the RESYNC request.

func (*DataResyncDSL) Send

func (dsl *DataResyncDSL) Send() defaultplugins.Reply

Send propagates the request to the plugins. It deletes obsolete keys if listKeys() (from constructor) function is not nil.

func (*DataResyncDSL) StaticRoute

StaticRoute adds L3 Static Route to the RESYNC request.

func (*DataResyncDSL) StnRule added in v1.4.0

StnRule adds Stn rule to the RESYNC request.

func (*DataResyncDSL) XConnect

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

func (dsl *DeleteDSL) ACL(aclName string) defaultplugins.DeleteDSL

ACL adds a request to delete an existing VPP Access Control List.

func (*DeleteDSL) AppNamespace added in v1.0.8

func (dsl *DeleteDSL) AppNamespace(id string) defaultplugins.DeleteDSL

AppNamespace adds a request to delete an existing VPP Application Namespace.

func (*DeleteDSL) Arp added in v1.0.8

func (dsl *DeleteDSL) Arp(ifaceName string, ipAddr string) defaultplugins.DeleteDSL

Arp adds a request to delete an existing VPP L3 ARP entry.

func (*DeleteDSL) BD

func (dsl *DeleteDSL) BD(bdName string) defaultplugins.DeleteDSL

BD adds a request to delete an existing VPP Bridge Domain.

func (*DeleteDSL) BDFIB

func (dsl *DeleteDSL) BDFIB(bdName string, mac string) defaultplugins.DeleteDSL

BDFIB adds a request to delete an existing VPP L2 Forwarding Information Base.

func (*DeleteDSL) BfdAuthKeys added in v1.0.5

func (dsl *DeleteDSL) BfdAuthKeys(bfdKey string) defaultplugins.DeleteDSL

BfdAuthKeys adds a request to delete an existing bidirectional forwarding detection key.

func (*DeleteDSL) BfdEchoFunction added in v1.0.5

func (dsl *DeleteDSL) BfdEchoFunction(bfdEchoName string) defaultplugins.DeleteDSL

BfdEchoFunction adds a request to delete an existing bidirectional forwarding detection echo function.

func (*DeleteDSL) BfdSession added in v1.0.5

func (dsl *DeleteDSL) BfdSession(bfdSessionIfaceName string) defaultplugins.DeleteDSL

BfdSession adds a request to delete an existing bidirectional forwarding detection session.

func (*DeleteDSL) IPSecSA added in v1.4.0

func (dsl *DeleteDSL) IPSecSA(saName string) defaultplugins.DeleteDSL

IPSecSA adds request to create a new Security Association

func (*DeleteDSL) IPSecSPD added in v1.4.0

func (dsl *DeleteDSL) IPSecSPD(spdName string) defaultplugins.DeleteDSL

IPSecSPD adds request to create a new Security Policy Database

func (*DeleteDSL) Interface

func (dsl *DeleteDSL) Interface(interfaceName string) defaultplugins.DeleteDSL

Interface adds a request to delete an existing VPP network interface.

func (*DeleteDSL) L4Features added in v1.0.8

func (dsl *DeleteDSL) L4Features() defaultplugins.DeleteDSL

L4Features delete request for the L4Features

func (*DeleteDSL) NAT44DNat added in v1.4.0

func (dsl *DeleteDSL) NAT44DNat(label string) defaultplugins.DeleteDSL

NAT44DNat adds a request to delete a new DNAT configuration

func (*DeleteDSL) NAT44Global added in v1.4.0

func (dsl *DeleteDSL) NAT44Global() defaultplugins.DeleteDSL

NAT44Global adds a request to remove global configuration for NAT44

func (*DeleteDSL) ProxyArpInterfaces added in v1.4.0

func (dsl *DeleteDSL) ProxyArpInterfaces(label string) defaultplugins.DeleteDSL

ProxyArpInterfaces adds a request to delete an existing VPP L3 proxy ARP interfaces

func (*DeleteDSL) ProxyArpRanges added in v1.4.0

func (dsl *DeleteDSL) ProxyArpRanges(label string) defaultplugins.DeleteDSL

ProxyArpRanges adds a request to delete an existing VPP L3 proxy ARP ranges

func (*DeleteDSL) Put

func (dsl *DeleteDSL) Put() defaultplugins.PutDSL

Put changes the DSL mode to allow configuration editing.

func (*DeleteDSL) Send

func (dsl *DeleteDSL) Send() defaultplugins.Reply

Send propagates requested changes to the plugins.

func (*DeleteDSL) StaticRoute

func (dsl *DeleteDSL) StaticRoute(vrf uint32, dstAddr string, nextHopAddr string) defaultplugins.DeleteDSL

StaticRoute adds a request to delete an existing VPP L3 Static Route.

func (*DeleteDSL) StnRule added in v1.4.0

func (dsl *DeleteDSL) StnRule(ruleName string) defaultplugins.DeleteDSL

StnRule adds request to delete Stn rule.

func (*DeleteDSL) XConnect

func (dsl *DeleteDSL) XConnect(rxIfName string) defaultplugins.DeleteDSL

XConnect adds a request to delete an existing VPP Cross Connect.

type PutDSL

type PutDSL struct {
	// contains filtered or unexported fields
}

PutDSL implements put operations of data change DSL.

func (*PutDSL) ACL

ACL adds a request to create or update VPP Access Control List.

func (*PutDSL) AppNamespace added in v1.0.8

func (dsl *PutDSL) AppNamespace(val *l4.AppNamespaces_AppNamespace) defaultplugins.PutDSL

AppNamespace create or update request for the Application Namespaces List

func (*PutDSL) Arp added in v1.0.8

Arp adds a request to create or update VPP L3 ARP entry.

func (*PutDSL) BD

BD adds a request to create or update VPP Bridge Domain.

func (*PutDSL) BDFIB

func (dsl *PutDSL) BDFIB(val *l2.FibTable_FibEntry) defaultplugins.PutDSL

BDFIB adds a request to create or update VPP L2 Forwarding Information Base.

func (*PutDSL) BfdAuthKeys

func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) defaultplugins.PutDSL

BfdAuthKeys adds a request to create or update bidirectional forwarding detection key.

func (*PutDSL) BfdEchoFunction

func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) defaultplugins.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) defaultplugins.PutDSL

BfdSession adds a request to create or update bidirectional forwarding detection session.

func (*PutDSL) Delete

func (dsl *PutDSL) Delete() defaultplugins.DeleteDSL

Delete changes the DSL mode to allow removal of an existing configuration.

func (*PutDSL) IPSecSA added in v1.4.0

IPSecSA adds request to create a new Security Association

func (*PutDSL) IPSecSPD added in v1.4.0

IPSecSPD adds request to create a new Security Policy Database

func (*PutDSL) Interface

Interface adds a request to create or update VPP network interface.

func (*PutDSL) L4Features added in v1.0.8

func (dsl *PutDSL) L4Features(val *l4.L4Features) defaultplugins.PutDSL

L4Features create or update request for the L4Features

func (*PutDSL) NAT44DNat added in v1.4.0

func (dsl *PutDSL) NAT44DNat(nat44 *nat.Nat44DNat_DNatConfig) defaultplugins.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) defaultplugins.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) defaultplugins.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) defaultplugins.PutDSL

ProxyArpRanges adds a request to create or update VPP L3 proxy ARP ranges

func (*PutDSL) Send

func (dsl *PutDSL) Send() defaultplugins.Reply

Send propagates requested changes to the plugins.

func (*PutDSL) StaticRoute

func (dsl *PutDSL) StaticRoute(val *l3.StaticRoutes_Route) defaultplugins.PutDSL

StaticRoute adds a request to create or update VPP L3 Static Route.

func (*PutDSL) StnRule added in v1.4.0

func (dsl *PutDSL) StnRule(val *stn.STN_Rule) defaultplugins.PutDSL

StnRule adds a request to create or update STN rule.

func (*PutDSL) XConnect

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

func (dsl Reply) ReceiveReply() error

ReceiveReply waits for a reply to previously called Send() and returns the result (error or nil).

Jump to

Keyboard shortcuts

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