gRPC migration

Change-Id: Ib390f6dde0d5a8d6db12ccd7da41135570ad1354
diff --git a/internal/bbr/devices/olt.go b/internal/bbr/devices/olt.go
index 39ce70b..5a1ed19 100644
--- a/internal/bbr/devices/olt.go
+++ b/internal/bbr/devices/olt.go
@@ -30,7 +30,7 @@
 	"github.com/opencord/bbsim/internal/bbsim/devices"
 	"github.com/opencord/bbsim/internal/bbsim/packetHandlers"
 	"github.com/opencord/bbsim/internal/common"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 	"google.golang.org/grpc"
 )
diff --git a/internal/bbsim/alarmsim/alarmsim.go b/internal/bbsim/alarmsim/alarmsim.go
index 6c6a290..828992a 100644
--- a/internal/bbsim/alarmsim/alarmsim.go
+++ b/internal/bbsim/alarmsim/alarmsim.go
@@ -24,7 +24,7 @@
 	"github.com/opencord/bbsim/internal/common"
 
 	"github.com/opencord/bbsim/api/bbsim"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 )
 
 func AlarmNameToEnum(name string) (bbsim.AlarmType_Types, error) {
diff --git a/internal/bbsim/api/onus_handler.go b/internal/bbsim/api/onus_handler.go
index 91a107d..8aef5e9 100644
--- a/internal/bbsim/api/onus_handler.go
+++ b/internal/bbsim/api/onus_handler.go
@@ -20,7 +20,7 @@
 	"context"
 	"fmt"
 	"github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"strconv"
 
 	"github.com/opencord/bbsim/api/bbsim"
diff --git a/internal/bbsim/devices/helpers.go b/internal/bbsim/devices/helpers.go
index 0d793d8..1389162 100644
--- a/internal/bbsim/devices/helpers.go
+++ b/internal/bbsim/devices/helpers.go
@@ -22,7 +22,7 @@
 
 	"github.com/looplab/fsm"
 	"github.com/opencord/bbsim/internal/common"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 )
 
 type mode int
diff --git a/internal/bbsim/devices/nni.go b/internal/bbsim/devices/nni.go
index 32fffaa..2159f6d 100644
--- a/internal/bbsim/devices/nni.go
+++ b/internal/bbsim/devices/nni.go
@@ -21,7 +21,7 @@
 	"github.com/google/gopacket"
 	"github.com/looplab/fsm"
 	"github.com/opencord/bbsim/internal/bbsim/packetHandlers"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/internal/bbsim/devices/nni_test.go b/internal/bbsim/devices/nni_test.go
index 4f93bb8..75ac039 100644
--- a/internal/bbsim/devices/nni_test.go
+++ b/internal/bbsim/devices/nni_test.go
@@ -21,7 +21,7 @@
 	"errors"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"testing"
 )
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 0f21845..6fb3226 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -28,16 +28,16 @@
 	"github.com/opencord/bbsim/internal/bbsim/responders/dhcp"
 	"github.com/opencord/bbsim/internal/bbsim/types"
 	omcilib "github.com/opencord/bbsim/internal/common/omci"
-	"github.com/opencord/voltha-protos/v4/go/ext/config"
+	"github.com/opencord/voltha-protos/v5/go/ext/config"
 
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	"github.com/looplab/fsm"
 	"github.com/opencord/bbsim/internal/bbsim/packetHandlers"
 	"github.com/opencord/bbsim/internal/common"
-	common_protos "github.com/opencord/voltha-protos/v4/go/common"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
-	"github.com/opencord/voltha-protos/v4/go/tech_profile"
+	common_protos "github.com/opencord/voltha-protos/v5/go/common"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/tech_profile"
 	log "github.com/sirupsen/logrus"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
diff --git a/internal/bbsim/devices/olt_test.go b/internal/bbsim/devices/olt_test.go
index 65b4e86..4b046a6 100644
--- a/internal/bbsim/devices/olt_test.go
+++ b/internal/bbsim/devices/olt_test.go
@@ -23,7 +23,7 @@
 	"github.com/opencord/bbsim/internal/bbsim/types"
 	bbsim "github.com/opencord/bbsim/internal/bbsim/types"
 	"github.com/opencord/bbsim/internal/common"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"net"
 	"sync"
diff --git a/internal/bbsim/devices/onu.go b/internal/bbsim/devices/onu.go
index 7de3cc3..438993c 100644
--- a/internal/bbsim/devices/onu.go
+++ b/internal/bbsim/devices/onu.go
@@ -42,8 +42,8 @@
 	"github.com/opencord/bbsim/internal/common"
 	omcilib "github.com/opencord/bbsim/internal/common/omci"
 	"github.com/opencord/omci-lib-go"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
-	"github.com/opencord/voltha-protos/v4/go/tech_profile"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/tech_profile"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/internal/bbsim/devices/onu_flow_test.go b/internal/bbsim/devices/onu_flow_test.go
index 1220f7d..66a775f 100644
--- a/internal/bbsim/devices/onu_flow_test.go
+++ b/internal/bbsim/devices/onu_flow_test.go
@@ -20,7 +20,7 @@
 	"github.com/google/gopacket/layers"
 	"github.com/looplab/fsm"
 	"github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"gotest.tools/assert"
 	"testing"
 )
diff --git a/internal/bbsim/devices/onu_indications_test.go b/internal/bbsim/devices/onu_indications_test.go
index 5cc3533..fb7c611 100644
--- a/internal/bbsim/devices/onu_indications_test.go
+++ b/internal/bbsim/devices/onu_indications_test.go
@@ -22,7 +22,7 @@
 	"testing"
 	"time"
 
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"google.golang.org/grpc"
 	"gotest.tools/assert"
 )
diff --git a/internal/bbsim/devices/onu_omci_test.go b/internal/bbsim/devices/onu_omci_test.go
index 50a3fa5..ea66a15 100644
--- a/internal/bbsim/devices/onu_omci_test.go
+++ b/internal/bbsim/devices/onu_omci_test.go
@@ -22,7 +22,7 @@
 	omcilib "github.com/opencord/bbsim/internal/common/omci"
 	"github.com/opencord/omci-lib-go"
 	me "github.com/opencord/omci-lib-go/generated"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"gotest.tools/assert"
 	"testing"
 )
diff --git a/internal/bbsim/devices/onu_test_helpers.go b/internal/bbsim/devices/onu_test_helpers.go
index 9d6b977..5fd1043 100644
--- a/internal/bbsim/devices/onu_test_helpers.go
+++ b/internal/bbsim/devices/onu_test_helpers.go
@@ -25,11 +25,11 @@
 	"time"
 
 	"github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/common"
-	"github.com/opencord/voltha-protos/v4/go/ext/config"
+	"github.com/opencord/voltha-protos/v5/go/common"
+	"github.com/opencord/voltha-protos/v5/go/ext/config"
 
-	"github.com/opencord/voltha-protos/v4/go/openolt"
-	"github.com/opencord/voltha-protos/v4/go/tech_profile"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/tech_profile"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/bbsim/devices/pon.go b/internal/bbsim/devices/pon.go
index e351d00..4db0e09 100644
--- a/internal/bbsim/devices/pon.go
+++ b/internal/bbsim/devices/pon.go
@@ -22,7 +22,7 @@
 	"sync"
 
 	"github.com/looplab/fsm"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/internal/bbsim/devices/pon_test.go b/internal/bbsim/devices/pon_test.go
index 45e1861..5467413 100644
--- a/internal/bbsim/devices/pon_test.go
+++ b/internal/bbsim/devices/pon_test.go
@@ -17,7 +17,7 @@
 package devices
 
 import (
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"sync"
 	"testing"
diff --git a/internal/bbsim/devices/service_test.go b/internal/bbsim/devices/service_test.go
index 1636e2f..3285021 100644
--- a/internal/bbsim/devices/service_test.go
+++ b/internal/bbsim/devices/service_test.go
@@ -20,7 +20,7 @@
 	"context"
 	"github.com/opencord/bbsim/internal/bbsim/types"
 	"github.com/opencord/bbsim/internal/common"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"net"
 	"testing"
diff --git a/internal/bbsim/dmiserver/dmi_event_generator.go b/internal/bbsim/dmiserver/dmi_event_generator.go
index 6baf0d8..2a9073e 100644
--- a/internal/bbsim/dmiserver/dmi_event_generator.go
+++ b/internal/bbsim/dmiserver/dmi_event_generator.go
@@ -21,11 +21,11 @@
 	"fmt"
 	"sync"
 
-	"github.com/golang/protobuf/ptypes"
 	"github.com/opencord/bbsim/api/bbsim"
 	"github.com/opencord/device-management-interface/go/dmi"
 	log "github.com/sirupsen/logrus"
 	"google.golang.org/grpc/codes"
+	"google.golang.org/protobuf/types/known/timestamppb"
 )
 
 //DmiEventsGenerator has the attributes for generating events
@@ -168,7 +168,7 @@
 		var evnt dmi.Event
 		evnt.EventId = eventID
 		evnt = *updateEventMetaData(comp, dmiEG.apiSrv, &evnt)
-		evnt.RaisedTs = ptypes.TimestampNow()
+		evnt.RaisedTs = timestamppb.Now()
 		logger.Debugf("Got a No Threshold event %+v", evnt)
 		sendOutEventOnKafka(evnt, dmiEG.apiSrv)
 		break
@@ -181,7 +181,7 @@
 		var evnt dmi.Event
 		evnt.EventId = eventID
 		evnt = *updateEventMetaData(comp, dmiEG.apiSrv, &evnt)
-		evnt.RaisedTs = ptypes.TimestampNow()
+		evnt.RaisedTs = timestamppb.Now()
 		configuredEvents := make(map[dmi.EventIds]dmi.EventCfg)
 
 		dmiEG.access.Lock()
diff --git a/internal/bbsim/dmiserver/dmi_metrics_generator.go b/internal/bbsim/dmiserver/dmi_metrics_generator.go
index fd17ea8..fdb5bb4 100755
--- a/internal/bbsim/dmiserver/dmi_metrics_generator.go
+++ b/internal/bbsim/dmiserver/dmi_metrics_generator.go
@@ -18,12 +18,13 @@
 
 import (
 	"context"
-	log "github.com/sirupsen/logrus"
 	"math/rand"
 	"sync"
 	"time"
 
-	"github.com/golang/protobuf/ptypes"
+	log "github.com/sirupsen/logrus"
+	"google.golang.org/protobuf/types/known/timestamppb"
+
 	dmi "github.com/opencord/device-management-interface/go/dmi"
 )
 
@@ -253,7 +254,7 @@
 		Value:     generateRand(1, 20),
 		Type:      dmi.DataValueType_VALUE_TYPE_OTHER,
 		Scale:     dmi.ValueScale_VALUE_SCALE_UNITS,
-		Timestamp: ptypes.TimestampNow(),
+		Timestamp: timestamppb.Now(),
 	}
 	return &met
 }
@@ -265,7 +266,7 @@
 		Value:     generateRand(3000, 4000),
 		Type:      dmi.DataValueType_VALUE_TYPE_RPM,
 		Scale:     dmi.ValueScale_VALUE_SCALE_UNITS,
-		Timestamp: ptypes.TimestampNow(),
+		Timestamp: timestamppb.Now(),
 	}
 	return &met
 }
@@ -301,7 +302,7 @@
 		Value:     generateRand(1, 8),
 		Type:      dmi.DataValueType_VALUE_TYPE_OTHER,
 		Scale:     dmi.ValueScale_VALUE_SCALE_GIGA,
-		Timestamp: ptypes.TimestampNow(),
+		Timestamp: timestamppb.Now(),
 	}
 	return &met
 }
@@ -313,7 +314,7 @@
 		Value:     generateRand(50, 500),
 		Type:      dmi.DataValueType_VALUE_TYPE_OTHER,
 		Scale:     dmi.ValueScale_VALUE_SCALE_GIGA,
-		Timestamp: ptypes.TimestampNow(),
+		Timestamp: timestamppb.Now(),
 	}
 	return &met
 }
@@ -325,7 +326,7 @@
 		Value:     generateRand(30, 40),
 		Type:      dmi.DataValueType_VALUE_TYPE_CELSIUS,
 		Scale:     dmi.ValueScale_VALUE_SCALE_UNITS,
-		Timestamp: ptypes.TimestampNow(),
+		Timestamp: timestamppb.Now(),
 	}
 	return &met
 }
diff --git a/internal/bbsim/responders/dhcp/dhcp.go b/internal/bbsim/responders/dhcp/dhcp.go
index 0916421..8adb65e 100644
--- a/internal/bbsim/responders/dhcp/dhcp.go
+++ b/internal/bbsim/responders/dhcp/dhcp.go
@@ -26,7 +26,7 @@
 	"github.com/looplab/fsm"
 	"github.com/opencord/bbsim/internal/bbsim/packetHandlers"
 	bbsim "github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 	"net"
 	"reflect"
diff --git a/internal/bbsim/responders/dhcp/dhcp_test.go b/internal/bbsim/responders/dhcp/dhcp_test.go
index f567e94..c9b7f24 100644
--- a/internal/bbsim/responders/dhcp/dhcp_test.go
+++ b/internal/bbsim/responders/dhcp/dhcp_test.go
@@ -22,7 +22,7 @@
 	"testing"
 
 	"github.com/looplab/fsm"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"google.golang.org/grpc"
 )
diff --git a/internal/bbsim/responders/eapol/eapol.go b/internal/bbsim/responders/eapol/eapol.go
index cd0f4a3..e341cef 100644
--- a/internal/bbsim/responders/eapol/eapol.go
+++ b/internal/bbsim/responders/eapol/eapol.go
@@ -26,7 +26,7 @@
 	"github.com/google/gopacket/layers"
 	"github.com/looplab/fsm"
 	bbsim "github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/internal/bbsim/responders/eapol/eapol_test.go b/internal/bbsim/responders/eapol/eapol_test.go
index 55c4294..21ca86b 100644
--- a/internal/bbsim/responders/eapol/eapol_test.go
+++ b/internal/bbsim/responders/eapol/eapol_test.go
@@ -22,7 +22,7 @@
 	"testing"
 
 	"github.com/looplab/fsm"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"google.golang.org/grpc"
 	"gotest.tools/assert"
 )
diff --git a/internal/bbsim/responders/igmp/igmp.go b/internal/bbsim/responders/igmp/igmp.go
index 1e58fb3..4dd007b 100644
--- a/internal/bbsim/responders/igmp/igmp.go
+++ b/internal/bbsim/responders/igmp/igmp.go
@@ -24,7 +24,7 @@
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	bbsim "github.com/opencord/bbsim/internal/bbsim/types"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/internal/bbsim/responders/igmp/igmp_test.go b/internal/bbsim/responders/igmp/igmp_test.go
index 8037869..5eb2f62 100644
--- a/internal/bbsim/responders/igmp/igmp_test.go
+++ b/internal/bbsim/responders/igmp/igmp_test.go
@@ -21,7 +21,7 @@
 	"fmt"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"github.com/stretchr/testify/assert"
 	"google.golang.org/grpc"
 	"net"
diff --git a/internal/bbsim/types/interfaces.go b/internal/bbsim/types/interfaces.go
index 946d507..ff6997e 100644
--- a/internal/bbsim/types/interfaces.go
+++ b/internal/bbsim/types/interfaces.go
@@ -17,7 +17,7 @@
 package types
 
 import (
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"google.golang.org/grpc"
 )
 
diff --git a/internal/bbsim/types/messageTypes.go b/internal/bbsim/types/messageTypes.go
index e8f367a..361142c 100644
--- a/internal/bbsim/types/messageTypes.go
+++ b/internal/bbsim/types/messageTypes.go
@@ -20,7 +20,7 @@
 	"github.com/google/gopacket"
 	"github.com/opencord/bbsim/internal/bbsim/packetHandlers"
 	"github.com/opencord/omci-lib-go"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"net"
 )
 
diff --git a/internal/common/helpers.go b/internal/common/helpers.go
index 6153283..d0d3cf1 100644
--- a/internal/common/helpers.go
+++ b/internal/common/helpers.go
@@ -20,7 +20,7 @@
 	"net"
 	"strconv"
 
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 )
 
 func OnuSnToString(sn *openolt.SerialNumber) string {
diff --git a/internal/common/omci/get.go b/internal/common/omci/get.go
index d988b97..0cdb2c4 100644
--- a/internal/common/omci/get.go
+++ b/internal/common/omci/get.go
@@ -23,7 +23,7 @@
 	"github.com/google/gopacket"
 	"github.com/opencord/omci-lib-go"
 	me "github.com/opencord/omci-lib-go/generated"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	log "github.com/sirupsen/logrus"
 	"math/rand"
 	"strconv"
diff --git a/internal/common/omci/get_test.go b/internal/common/omci/get_test.go
index f9cdac4..cffb80d 100644
--- a/internal/common/omci/get_test.go
+++ b/internal/common/omci/get_test.go
@@ -22,7 +22,7 @@
 	"github.com/google/gopacket"
 	"github.com/opencord/omci-lib-go"
 	me "github.com/opencord/omci-lib-go/generated"
-	"github.com/opencord/voltha-protos/v4/go/openolt"
+	"github.com/opencord/voltha-protos/v5/go/openolt"
 	"gotest.tools/assert"
 	"reflect"
 	"testing"