VOL-3588 Update OFAgent to support new version of protos

Change-Id: Ic3944779f9a600ebcd5d7a916616f473059e311e
diff --git a/internal/pkg/holder/holder.go b/internal/pkg/holder/holder.go
index 0074582..60b0785 100644
--- a/internal/pkg/holder/holder.go
+++ b/internal/pkg/holder/holder.go
@@ -19,7 +19,7 @@
 import (
 	"sync"
 
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 // VolthaServiceClientHolder provides a consistent (voluntarily unmutable) reference
diff --git a/internal/pkg/mock/voltha_client_mock.go b/internal/pkg/mock/voltha_client_mock.go
index d19a9ff..a41ae2f 100644
--- a/internal/pkg/mock/voltha_client_mock.go
+++ b/internal/pkg/mock/voltha_client_mock.go
@@ -20,10 +20,10 @@
 	"context"
 
 	. "github.com/golang/protobuf/ptypes/empty"
-	"github.com/opencord/voltha-protos/v3/go/common"
-	"github.com/opencord/voltha-protos/v3/go/omci"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	. "github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-protos/v4/go/common"
+	"github.com/opencord/voltha-protos/v4/go/omci"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	. "github.com/opencord/voltha-protos/v4/go/voltha"
 	"google.golang.org/grpc"
 )
 
@@ -275,3 +275,11 @@
 func (c MockVolthaClient) StartOmciTestAction(ctx context.Context, in *OmciTestRequest, opts ...grpc.CallOption) (*TestResponse, error) {
 	return &TestResponse{}, nil
 }
+
+func (c MockVolthaClient) ForceDeleteDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Empty, error) {
+	return &Empty{}, nil
+}
+
+func (c MockVolthaClient) SetExtValue(ctx context.Context, in *ValueSet, opts ...grpc.CallOption) (*Empty, error) {
+	return &Empty{}, nil
+}
diff --git a/internal/pkg/ofagent/changeEvent.go b/internal/pkg/ofagent/changeEvent.go
index 6a79d42..cb7c965 100644
--- a/internal/pkg/ofagent/changeEvent.go
+++ b/internal/pkg/ofagent/changeEvent.go
@@ -24,7 +24,7 @@
 	"github.com/golang/protobuf/ptypes/empty"
 	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/pkg/ofagent/common.go b/internal/pkg/ofagent/common.go
index dd5659e..a4f62ed 100644
--- a/internal/pkg/ofagent/common.go
+++ b/internal/pkg/ofagent/common.go
@@ -18,7 +18,7 @@
 package ofagent
 
 import (
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 var logger log.CLogger
diff --git a/internal/pkg/ofagent/connection.go b/internal/pkg/ofagent/connection.go
index a518638..6bfd0af 100644
--- a/internal/pkg/ofagent/connection.go
+++ b/internal/pkg/ofagent/connection.go
@@ -23,9 +23,9 @@
 	"github.com/golang/protobuf/ptypes/empty"
 	grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
 	grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-lib-go/v3/pkg/probe"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/probe"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/pkg/ofagent/ofagent.go b/internal/pkg/ofagent/ofagent.go
index 9e0914f..e2b66f3 100644
--- a/internal/pkg/ofagent/ofagent.go
+++ b/internal/pkg/ofagent/ofagent.go
@@ -23,9 +23,10 @@
 
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-lib-go/v3/pkg/probe"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/probe"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 	"google.golang.org/grpc"
 )
 
@@ -58,7 +59,7 @@
 
 	packetInChannel    chan *voltha.PacketIn
 	packetOutChannel   chan *voltha.PacketOut
-	changeEventChannel chan *voltha.ChangeEvent
+	changeEventChannel chan *openflow_13.ChangeEvent
 }
 
 func NewOFAgent(ctx context.Context, config *OFAgent) (*OFAgent, error) {
@@ -71,7 +72,7 @@
 		volthaClient:              &holder.VolthaServiceClientHolder{},
 		packetInChannel:           make(chan *voltha.PacketIn),
 		packetOutChannel:          make(chan *voltha.PacketOut),
-		changeEventChannel:        make(chan *voltha.ChangeEvent),
+		changeEventChannel:        make(chan *openflow_13.ChangeEvent),
 		clientMap:                 make(map[string]*openflow.OFClient),
 		events:                    make(chan ofaEvent, 100),
 	}
diff --git a/internal/pkg/ofagent/packetIn.go b/internal/pkg/ofagent/packetIn.go
index 4d28410..f3555ae 100644
--- a/internal/pkg/ofagent/packetIn.go
+++ b/internal/pkg/ofagent/packetIn.go
@@ -24,9 +24,9 @@
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/pkg/ofagent/packetOut.go b/internal/pkg/ofagent/packetOut.go
index 6fe6546..aee7b75 100644
--- a/internal/pkg/ofagent/packetOut.go
+++ b/internal/pkg/ofagent/packetOut.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/pkg/ofagent/refresh.go b/internal/pkg/ofagent/refresh.go
index 55865ca..8025ba7 100644
--- a/internal/pkg/ofagent/refresh.go
+++ b/internal/pkg/ofagent/refresh.go
@@ -22,7 +22,7 @@
 
 	"github.com/golang/protobuf/ptypes/empty"
 	"github.com/opencord/ofagent-go/internal/pkg/openflow"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofa *OFAgent) synchronizeDeviceList(ctx context.Context) {
diff --git a/internal/pkg/openflow/barrier.go b/internal/pkg/openflow/barrier.go
index 7c7bf5e..96b466a 100644
--- a/internal/pkg/openflow/barrier.go
+++ b/internal/pkg/openflow/barrier.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleBarrierRequest(ctx context.Context, request *ofp.BarrierRequest) {
diff --git a/internal/pkg/openflow/client.go b/internal/pkg/openflow/client.go
index ce85c60..91a7096 100644
--- a/internal/pkg/openflow/client.go
+++ b/internal/pkg/openflow/client.go
@@ -24,8 +24,8 @@
 
 	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 var NoVolthaConnectionError = errors.New("no-voltha-connection")
diff --git a/internal/pkg/openflow/common.go b/internal/pkg/openflow/common.go
index f0a5680..cd9072c 100644
--- a/internal/pkg/openflow/common.go
+++ b/internal/pkg/openflow/common.go
@@ -18,7 +18,7 @@
 package openflow
 
 import (
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 var logger log.CLogger
diff --git a/internal/pkg/openflow/connection.go b/internal/pkg/openflow/connection.go
index b9cb6e2..87a50b3 100644
--- a/internal/pkg/openflow/connection.go
+++ b/internal/pkg/openflow/connection.go
@@ -29,8 +29,8 @@
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 type OFConnection struct {
diff --git a/internal/pkg/openflow/echo.go b/internal/pkg/openflow/echo.go
index 9d0026f..0525ef3 100644
--- a/internal/pkg/openflow/echo.go
+++ b/internal/pkg/openflow/echo.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleEchoRequest(ctx context.Context, request *ofp.EchoRequest) {
diff --git a/internal/pkg/openflow/error.go b/internal/pkg/openflow/error.go
index cfb09a6..cfd9c09 100644
--- a/internal/pkg/openflow/error.go
+++ b/internal/pkg/openflow/error.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleErrMsg(ctx context.Context, message ofp.IErrorMsg) {
diff --git a/internal/pkg/openflow/feature.go b/internal/pkg/openflow/feature.go
index d9caec6..7048183 100644
--- a/internal/pkg/openflow/feature.go
+++ b/internal/pkg/openflow/feature.go
@@ -21,8 +21,8 @@
 	"encoding/json"
 
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/common"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/common"
 )
 
 func (ofc *OFConnection) handleFeatureRequest(ctx context.Context, request *ofp.FeaturesRequest) error {
diff --git a/internal/pkg/openflow/flowMod.go b/internal/pkg/openflow/flowMod.go
index 342375f..1c8a906 100644
--- a/internal/pkg/openflow/flowMod.go
+++ b/internal/pkg/openflow/flowMod.go
@@ -21,9 +21,9 @@
 	"encoding/binary"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 	"net"
 )
 
diff --git a/internal/pkg/openflow/getConfig.go b/internal/pkg/openflow/getConfig.go
index 3991d0c..f720960 100644
--- a/internal/pkg/openflow/getConfig.go
+++ b/internal/pkg/openflow/getConfig.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleGetConfigRequest(ctx context.Context, request *ofp.GetConfigRequest) {
diff --git a/internal/pkg/openflow/group.go b/internal/pkg/openflow/group.go
index 99d12b7..0b316bd 100644
--- a/internal/pkg/openflow/group.go
+++ b/internal/pkg/openflow/group.go
@@ -20,9 +20,9 @@
 	"context"
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 func (ofc *OFConnection) handleGroupMod(ctx context.Context, groupMod ofp.IGroupMod) {
diff --git a/internal/pkg/openflow/meter.go b/internal/pkg/openflow/meter.go
index 2334fb2..edaed4d 100644
--- a/internal/pkg/openflow/meter.go
+++ b/internal/pkg/openflow/meter.go
@@ -21,8 +21,8 @@
 	"unsafe"
 
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
 	"golang.org/x/net/context"
 )
 
diff --git a/internal/pkg/openflow/packet.go b/internal/pkg/openflow/packet.go
index dfbb0d9..5e3680d 100644
--- a/internal/pkg/openflow/packet.go
+++ b/internal/pkg/openflow/packet.go
@@ -20,8 +20,8 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 func (ofc *OFConnection) handlePacketOut(ctx context.Context, packetOut *ofp.PacketOut) {
diff --git a/internal/pkg/openflow/parseGrpcReturn.go b/internal/pkg/openflow/parseGrpcReturn.go
index 8f67e06..d0c315a 100644
--- a/internal/pkg/openflow/parseGrpcReturn.go
+++ b/internal/pkg/openflow/parseGrpcReturn.go
@@ -22,9 +22,9 @@
 	"encoding/json"
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 )
 
 func parseOxm(ctx context.Context, ofbField *openflow_13.OfpOxmOfbField) goloxi.IOxm {
diff --git a/internal/pkg/openflow/role.go b/internal/pkg/openflow/role.go
index d522bb2..41008aa 100644
--- a/internal/pkg/openflow/role.go
+++ b/internal/pkg/openflow/role.go
@@ -21,7 +21,7 @@
 	"encoding/json"
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleRoleRequest(ctx context.Context, request *ofp.RoleRequest) {
diff --git a/internal/pkg/openflow/setConfig.go b/internal/pkg/openflow/setConfig.go
index 554db38..3d17d7e 100644
--- a/internal/pkg/openflow/setConfig.go
+++ b/internal/pkg/openflow/setConfig.go
@@ -20,7 +20,7 @@
 	"context"
 	"encoding/json"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
 func (ofc *OFConnection) handleSetConfig(ctx context.Context, request *ofp.SetConfig) {
diff --git a/internal/pkg/openflow/stats.go b/internal/pkg/openflow/stats.go
index 096e731..ccf7d7d 100644
--- a/internal/pkg/openflow/stats.go
+++ b/internal/pkg/openflow/stats.go
@@ -23,9 +23,9 @@
 
 	"github.com/opencord/goloxi"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-protos/v3/go/common"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-protos/v4/go/common"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
 )
 
 func (ofc *OFConnection) handleStatsRequest(ctx context.Context, request ofp.IHeader, statType uint16) error {
diff --git a/internal/pkg/openflow/stats_test.go b/internal/pkg/openflow/stats_test.go
index d618fe4..cad0352 100644
--- a/internal/pkg/openflow/stats_test.go
+++ b/internal/pkg/openflow/stats_test.go
@@ -26,8 +26,8 @@
 	"github.com/opencord/goloxi/of13"
 	"github.com/opencord/ofagent-go/internal/pkg/holder"
 	"github.com/opencord/ofagent-go/internal/pkg/mock"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/internal/pkg/openflow/utils.go b/internal/pkg/openflow/utils.go
index ffe4e52..08de458 100644
--- a/internal/pkg/openflow/utils.go
+++ b/internal/pkg/openflow/utils.go
@@ -19,7 +19,7 @@
 import (
 	"fmt"
 	ofp "github.com/opencord/goloxi/of13"
-	"github.com/opencord/voltha-protos/v3/go/openflow_13"
+	"github.com/opencord/voltha-protos/v4/go/openflow_13"
 	"strings"
 	"sync"
 )