From 07db6b1cb22fe22cf47748615576417b11a51e37 Mon Sep 17 00:00:00 2001 From: "jozef.slezak" Date: Mon, 9 Oct 2017 14:46:06 +0200 Subject: [PATCH] godoc improvement of L2 driver constructors --- controller/cnpdriver/sfcctlr_l2_driver.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controller/cnpdriver/sfcctlr_l2_driver.go b/controller/cnpdriver/sfcctlr_l2_driver.go index a3ac5d0a..b748de9f 100644 --- a/controller/cnpdriver/sfcctlr_l2_driver.go +++ b/controller/cnpdriver/sfcctlr_l2_driver.go @@ -65,7 +65,7 @@ type sfcCtlrL2CNPDriver struct { // (instead of using global variables that caused // problems while running automated tests) type sequencer struct { - VLanID uint32 + VLanID uint32 MemIfID uint32 MacInstanceID uint32 IPInstanceID uint32 @@ -100,13 +100,18 @@ type reconcileCacheType struct { l3Routes map[string]l3.StaticRoutes_Route } +// NewRemoteClientTxn new vpp-agent remote client instance on top of key-val DB (ETCD) +// that identifies a specific vpp-agent that needs to be configured +// returns new instance of DataBroker for accessing key-val DB (ETCD) func NewRemoteClientTxn(microserviceLabel string, dbFactory func(string) keyval.ProtoBroker) linux.DataChangeDSL { prefix := servicelabel.GetDifferentAgentPrefix(microserviceLabel) broker := dbFactory(prefix) return remoteclient.DataChangeRequestDB(broker) } -// Init the driver/mode for Native SFC Controller L2 Container Networking Policy +// NewSfcCtlrL2CNPDriver creates new driver/mode for Native SFC Controller L2 Container Networking Policy +// of the driver/plugin +// returns new instance of DataBroker for accessing key-val DB (ETCD) func NewSfcCtlrL2CNPDriver(name string, dbFactory func(string) keyval.ProtoBroker) *sfcCtlrL2CNPDriver { cnpd := &sfcCtlrL2CNPDriver{}