[VOL-5567] Upgrade protos and remove deprecated dependencies

Change-Id: I61605ee294a3c5abe65ecf94a0fe647c6e3b8479
Signed-off-by: bseeniva <balaji.seenivasan@radisys.com>
diff --git a/pkg/mocks/mockCoreClient.go b/pkg/mocks/mockCoreClient.go
index dca0e3b..b68f60a 100644
--- a/pkg/mocks/mockCoreClient.go
+++ b/pkg/mocks/mockCoreClient.go
@@ -23,13 +23,13 @@
 	"fmt"
 	"strings"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
 	"github.com/opencord/voltha-protos/v5/go/common"
 	ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
 	"github.com/opencord/voltha-protos/v5/go/core_service"
 	"github.com/opencord/voltha-protos/v5/go/voltha"
 	"google.golang.org/grpc"
+	"google.golang.org/protobuf/types/known/emptypb"
 )
 
 // NewMockCoreClient creates a new mock core client for a given core service
@@ -48,46 +48,46 @@
 }
 
 // RegisterAdapter implements mock RegisterAdapter
-func (mcs MockCoreService) RegisterAdapter(ctx context.Context, in *ca.AdapterRegistration, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) RegisterAdapter(ctx context.Context, in *ca.AdapterRegistration, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if ctx == nil || in.Adapter == nil || in.DTypes == nil {
 		return nil, errors.New("registerAdapter func parameters cannot be nil")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DeviceUpdate implements mock DeviceUpdate
-func (mcs MockCoreService) DeviceUpdate(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) DeviceUpdate(ctx context.Context, in *voltha.Device, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.Id == "" {
 		return nil, errors.New("no Device")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // PortCreated implements mock PortCreated
-func (mcs MockCoreService) PortCreated(ctx context.Context, in *voltha.Port, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) PortCreated(ctx context.Context, in *voltha.Port, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no deviceID")
 	}
 	if in.Type > 7 {
 		return nil, errors.New("invalid porttype")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // PortsStateUpdate implements mock PortsStateUpdate
-func (mcs MockCoreService) PortsStateUpdate(ctx context.Context, in *ca.PortStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) PortsStateUpdate(ctx context.Context, in *ca.PortStateFilter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no Device")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DeleteAllPorts implements mock DeleteAllPorts
-func (mcs MockCoreService) DeleteAllPorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) DeleteAllPorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.Id == "" {
 		return nil, errors.New("no Device id")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // GetDevicePort implements mock GetDevicePort
@@ -110,16 +110,16 @@
 }
 
 // DeviceStateUpdate implements mock DeviceStateUpdate
-func (mcs MockCoreService) DeviceStateUpdate(ctx context.Context, in *ca.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) DeviceStateUpdate(ctx context.Context, in *ca.DeviceStateFilter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no Device id")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DevicePMConfigUpdate implements mock DevicePMConfigUpdate
-func (mcs MockCoreService) DevicePMConfigUpdate(ctx context.Context, in *voltha.PmConfigs, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mcs MockCoreService) DevicePMConfigUpdate(ctx context.Context, in *voltha.PmConfigs, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // ChildDeviceDetected implements mock ChildDeviceDetected
@@ -136,19 +136,19 @@
 }
 
 // ChildDevicesLost implements mock ChildDevicesLost
-func (mcs MockCoreService) ChildDevicesLost(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) ChildDevicesLost(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.Id == "" {
 		return nil, errors.New("no device id")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // ChildDevicesDetected implements mock ChildDevicesDetected
-func (mcs MockCoreService) ChildDevicesDetected(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) ChildDevicesDetected(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.Id == "" {
 		return nil, errors.New("no device id")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // GetDevice implements mock GetDevice
@@ -204,27 +204,27 @@
 }
 
 // SendPacketIn implements mock SendPacketIn
-func (mcs MockCoreService) SendPacketIn(ctx context.Context, in *ca.PacketIn, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) SendPacketIn(ctx context.Context, in *ca.PacketIn, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no Device ID")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // DeviceReasonUpdate implements mock DeviceReasonUpdate
-func (mcs MockCoreService) DeviceReasonUpdate(ctx context.Context, in *ca.DeviceReason, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) DeviceReasonUpdate(ctx context.Context, in *ca.DeviceReason, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no Device ID")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // PortStateUpdate implements mock PortStateUpdate
-func (mcs MockCoreService) PortStateUpdate(ctx context.Context, in *ca.PortState, opts ...grpc.CallOption) (*empty.Empty, error) {
+func (mcs MockCoreService) PortStateUpdate(ctx context.Context, in *ca.PortState, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	if in.DeviceId == "" {
 		return nil, errors.New("no Device")
 	}
-	return &empty.Empty{}, nil
+	return &emptypb.Empty{}, nil
 }
 
 // GetHealthStatus implements mock GetHealthStatus
@@ -235,8 +235,8 @@
 // Additional API found in the Core - unused?
 
 // ReconcileChildDevices implements mock ReconcileChildDevices
-func (mcs MockCoreService) ReconcileChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mcs MockCoreService) ReconcileChildDevices(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // GetChildDeviceWithProxyAddress implements mock GetChildDeviceWithProxyAddress
@@ -250,11 +250,11 @@
 }
 
 // ChildrenStateUpdate implements mock ChildrenStateUpdate
-func (mcs MockCoreService) ChildrenStateUpdate(ctx context.Context, in *ca.DeviceStateFilter, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mcs MockCoreService) ChildrenStateUpdate(ctx context.Context, in *ca.DeviceStateFilter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // UpdateImageDownload implements mock UpdateImageDownload
-func (mcs MockCoreService) UpdateImageDownload(ctx context.Context, in *voltha.ImageDownload, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mcs MockCoreService) UpdateImageDownload(ctx context.Context, in *voltha.ImageDownload, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
diff --git a/pkg/mocks/mockKVClient.go b/pkg/mocks/mockKVClient.go
index fabe4a8..67685b4 100644
--- a/pkg/mocks/mockKVClient.go
+++ b/pkg/mocks/mockKVClient.go
@@ -94,7 +94,7 @@
 				Flags:   0,
 				MeterId: 1,
 			}
-			str, _ := json.Marshal(meterConfig)
+			str, _ := json.Marshal(&meterConfig)
 			return kvstore.NewKVPair(key, string(str), "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, MeterConfig) {
diff --git a/pkg/mocks/mockOnuInterAdapterClient.go b/pkg/mocks/mockOnuInterAdapterClient.go
index ee740e8..0a05ff3 100644
--- a/pkg/mocks/mockOnuInterAdapterClient.go
+++ b/pkg/mocks/mockOnuInterAdapterClient.go
@@ -20,11 +20,11 @@
 import (
 	"context"
 
-	"github.com/golang/protobuf/ptypes/empty"
 	vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
 	ia "github.com/opencord/voltha-protos/v5/go/inter_adapter"
 	"github.com/opencord/voltha-protos/v5/go/onu_inter_adapter_service"
 	"google.golang.org/grpc"
+	"google.golang.org/protobuf/types/known/emptypb"
 )
 
 // NewMockChildAdapterClient create a mock child adapter client
@@ -39,28 +39,28 @@
 }
 
 // OnuIndication implements mock OnuIndication
-func (mos *MockOnuInterAdapterService) OnuIndication(ctx context.Context, in *ia.OnuIndicationMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mos *MockOnuInterAdapterService) OnuIndication(ctx context.Context, in *ia.OnuIndicationMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // OmciResponse implements mock OmciResponse
-func (mos *MockOnuInterAdapterService) OmciResponse(ctx context.Context, in *ia.OmciMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mos *MockOnuInterAdapterService) OmciResponse(ctx context.Context, in *ia.OmciMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // DownloadTechProfile implements mock DownloadTechProfile
-func (mos *MockOnuInterAdapterService) DownloadTechProfile(ctx context.Context, in *ia.TechProfileDownloadMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mos *MockOnuInterAdapterService) DownloadTechProfile(ctx context.Context, in *ia.TechProfileDownloadMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // DeleteGemPort implements mock DeleteGemPort
-func (mos *MockOnuInterAdapterService) DeleteGemPort(ctx context.Context, in *ia.DeleteGemPortMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mos *MockOnuInterAdapterService) DeleteGemPort(ctx context.Context, in *ia.DeleteGemPortMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // DeleteTCont implements mock DeleteTCont
-func (mos *MockOnuInterAdapterService) DeleteTCont(ctx context.Context, in *ia.DeleteTcontMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
-	return &empty.Empty{}, nil
+func (mos *MockOnuInterAdapterService) DeleteTCont(ctx context.Context, in *ia.DeleteTcontMessage, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	return &emptypb.Empty{}, nil
 }
 
 // GetHealthStatus implements mock GetHealthStatus