Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialize abf plugin handler in configurator #1371

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/configurator/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/ligato/cn-infra/rpc/grpc"
"github.com/ligato/vpp-agent/plugins/govppmux"
"github.com/ligato/vpp-agent/plugins/orchestrator"
"github.com/ligato/vpp-agent/plugins/vpp/aclplugin"
"github.com/ligato/vpp-agent/plugins/vpp/ifplugin"
"github.com/ligato/vpp-agent/plugins/vpp/l2plugin"
)
Expand All @@ -33,6 +34,7 @@ func NewPlugin(opts ...Option) *Plugin {
p.GRPCServer = &grpc.DefaultPlugin
p.Dispatch = &orchestrator.DefaultPlugin
p.GoVppmux = &govppmux.DefaultPlugin
p.VPPACLPlugin = &aclplugin.DefaultPlugin
p.VPPIfPlugin = &ifplugin.DefaultPlugin
p.VPPL2Plugin = &l2plugin.DefaultPlugin

Expand Down
15 changes: 10 additions & 5 deletions plugins/configurator/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"git.fd.io/govpp.git/api"
"github.com/ligato/vpp-agent/api/models/vpp"
"github.com/ligato/vpp-agent/plugins/orchestrator"
abfvppcalls "github.com/ligato/vpp-agent/plugins/vpp/abfplugin/vppcalls"
"github.com/ligato/vpp-agent/plugins/vpp/aclplugin"
ipsecvppcalls "github.com/ligato/vpp-agent/plugins/vpp/ipsecplugin/vppcalls"
puntvppcalls "github.com/ligato/vpp-agent/plugins/vpp/puntplugin/vppcalls"

Expand Down Expand Up @@ -51,11 +53,12 @@ type Plugin struct {
// Deps - dependencies of Plugin
type Deps struct {
infra.PluginDeps
GRPCServer grpc.Server
Dispatch orchestrator.Dispatcher
GoVppmux govppmux.StatsAPI
VPPIfPlugin ifplugin.API
VPPL2Plugin *l2plugin.L2Plugin
GRPCServer grpc.Server
Dispatch orchestrator.Dispatcher
GoVppmux govppmux.StatsAPI
VPPACLPlugin aclplugin.API
VPPIfPlugin ifplugin.API
VPPL2Plugin *l2plugin.L2Plugin
}

// Init sets plugin child loggers
Expand Down Expand Up @@ -103,11 +106,13 @@ func (p *Plugin) initHandlers() (err error) {
}

// VPP Indexes
aclIndexes := p.VPPACLPlugin.GetACLIndex()
ifIndexes := p.VPPIfPlugin.GetInterfaceIndex()
bdIndexes := p.VPPL2Plugin.GetBDIndex()
dhcpIndexes := p.VPPIfPlugin.GetDHCPIndex()

// Initialize VPP handlers
p.configurator.abfHandler = abfvppcalls.CompatibleABFVppHandler(p.vppChan, p.dumpChan, aclIndexes, ifIndexes, p.Log)
p.configurator.aclHandler = aclvppcalls.CompatibleACLVppHandler(p.vppChan, p.dumpChan, ifIndexes, p.Log)
p.configurator.ifHandler = ifvppcalls.CompatibleInterfaceVppHandler(p.vppChan, p.Log)
p.configurator.natHandler = natvppcalls.CompatibleNatVppHandler(p.vppChan, ifIndexes, dhcpIndexes, p.Log)
Expand Down