VOL-3419: OpenOLT adapter at scale constantly takes more that 10 seconds to react to flows
- Pass information to agent to do the flow replication
- Consolidate various locks in the adapter and remove reduntant locks
- use voltha-proto version 4.0.2 and voltha-lib-go version 4.0.0
- Bump adapter version to 3.0.0

Change-Id: Ic053c54e5319bb1736ec74facfc79dd10058ecf5
diff --git a/pkg/mocks/mockKVClient.go b/pkg/mocks/mockKVClient.go
index e45b30b..a034f87 100644
--- a/pkg/mocks/mockKVClient.go
+++ b/pkg/mocks/mockKVClient.go
@@ -25,12 +25,12 @@
 	"strings"
 	"time"
 
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	"github.com/opencord/voltha-openolt-adapter/internal/pkg/resourcemanager"
 
-	"github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
-	ofp "github.com/opencord/voltha-protos/v3/go/openflow_13"
-	openolt "github.com/opencord/voltha-protos/v3/go/openolt"
+	"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
+	ofp "github.com/opencord/voltha-protos/v4/go/openflow_13"
+	openolt "github.com/opencord/voltha-protos/v4/go/openolt"
 )
 
 const (
@@ -72,9 +72,8 @@
 
 // Get mock function implementation for KVClient
 func (kvclient *MockKVClient) Get(ctx context.Context, key string) (*kvstore.KVPair, error) {
-	logger.Debugw(ctx, "Warning Warning Warning: Get of MockKVClient called", log.Fields{"key": key})
+	logger.Debugw(ctx, "Get of MockKVClient called", log.Fields{"key": key})
 	if key != "" {
-		logger.Debug(ctx, "Warning Key Not Blank")
 		if strings.Contains(key, "meter_id/{0,62,8}/{upstream}") {
 			meterConfig := ofp.OfpMeterConfig{
 				Flags:   0,
@@ -135,12 +134,8 @@
 		}
 		if strings.Contains(key, "/{olt}/{0,-1,-1}/flow_id_info/") {
 			//multicast flow
-			data := []resourcemanager.FlowInfo{
-				{
-					Flow:            &openolt.Flow{FlowId: 1, OnuId: 0, UniId: 0, GemportId: 4000},
-					FlowStoreCookie: uint64(48132224281636694),
-					LogicalFlowID:   3961977515762683568,
-				},
+			data := resourcemanager.FlowInfo{
+				Flow: &openolt.Flow{FlowId: 1, OnuId: 0, UniId: 0, GemportId: 4000},
 			}
 			logger.Debug(ctx, "Error Error Error Key:", FlowIDs)
 			str, _ := json.Marshal(data)
@@ -148,13 +143,8 @@
 		}
 
 		if strings.Contains(key, FlowIDInfo) {
-
-			data := []resourcemanager.FlowInfo{
-				{
-					Flow:            &openolt.Flow{FlowId: 1, OnuId: 1, UniId: 1, GemportId: 1},
-					FlowStoreCookie: uint64(48132224281636694),
-					LogicalFlowID:   1,
-				},
+			data := resourcemanager.FlowInfo{
+				Flow: &openolt.Flow{FlowId: 1, OnuId: 1, UniId: 1, GemportId: 1},
 			}
 			logger.Debug(ctx, "Error Error Error Key:", FlowIDs)
 			str, _ := json.Marshal(data)