[VOL-3287] Updating voltha-lib-go dependecy to fix GPON constant issue
Change-Id: I6b7a054dc2e1acd610a8940f05fcecbaaf680346
diff --git a/go.mod b/go.mod
index dd9b888..606a766 100755
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@
github.com/cenkalti/backoff/v3 v3.1.1
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.3.2
- github.com/opencord/voltha-lib-go/v3 v3.1.20
+ github.com/opencord/voltha-lib-go/v3 v3.1.22
github.com/opencord/voltha-protos/v3 v3.3.9
go.etcd.io/etcd v0.0.0-20190930204107-236ac2a90522
google.golang.org/grpc v1.25.1
diff --git a/go.sum b/go.sum
index a1dbbd9..a8ec1c8 100644
--- a/go.sum
+++ b/go.sum
@@ -204,8 +204,8 @@
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/opencord/voltha-lib-go/v3 v3.1.20 h1:TXSz3mivOShau8YkKvXOQrWMWyjqZTnzG/+1U6+2r5Y=
-github.com/opencord/voltha-lib-go/v3 v3.1.20/go.mod h1:sa508HZ5vlOauh0i+WC0XFX1JZnfHtJqNIms5XBT/Z0=
+github.com/opencord/voltha-lib-go/v3 v3.1.22 h1:ZiM1yGjDKggKy1KXavtH3xuQpAc/gP4sV4/3mvfrL58=
+github.com/opencord/voltha-lib-go/v3 v3.1.22/go.mod h1:sa508HZ5vlOauh0i+WC0XFX1JZnfHtJqNIms5XBT/Z0=
github.com/opencord/voltha-protos/v3 v3.3.9 h1:BnfDN9oaRBgyAiH9ZN7LpBpEJYxjX/ZS7R4OT2hDrtY=
github.com/opencord/voltha-protos/v3 v3.3.9/go.mod h1:nl1ETp5Iw3avxOaKD8BJlYY5wYI4KeV95aT1pL63nto=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/kafka/kafka_inter_container_library.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/kafka/kafka_inter_container_library.go
index 9f9fbfc..cbde834 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/kafka/kafka_inter_container_library.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/kafka/kafka_inter_container_library.go
@@ -19,13 +19,14 @@
"context"
"errors"
"fmt"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
"reflect"
"strings"
"sync"
"time"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/any"
@@ -66,7 +67,6 @@
Start() error
Stop()
GetDefaultTopic() *Topic
- DeviceDiscovered(deviceId string, deviceType string, parentId string, publisher string) error
InvokeRPC(ctx context.Context, rpc string, toTopic *Topic, replyToTopic *Topic, waitForResponse bool, key string, kvArgs ...*KVArg) (bool, *any.Any)
InvokeAsyncRPC(ctx context.Context, rpc string, toTopic *Topic, replyToTopic *Topic, waitForResponse bool, key string, kvArgs ...*KVArg) chan *RpcResponse
SubscribeWithRequestHandlerInterface(topic Topic, handler interface{}) error
@@ -82,7 +82,6 @@
kafkaAddress string
defaultTopic *Topic
defaultRequestHandlerInterface interface{}
- deviceDiscoveryTopic *Topic
kafkaClient Client
doneCh chan struct{}
doneOnce sync.Once
@@ -118,12 +117,6 @@
}
}
-func DeviceDiscoveryTopic(topic *Topic) InterContainerProxyOption {
- return func(args *interContainerProxy) {
- args.deviceDiscoveryTopic = topic
- }
-}
-
func RequestHandlerInterface(handler interface{}) InterContainerProxyOption {
return func(args *interContainerProxy) {
args.defaultRequestHandlerInterface = handler
@@ -199,48 +192,6 @@
return kp.defaultTopic
}
-// DeviceDiscovered publish the discovered device onto the kafka messaging bus
-func (kp *interContainerProxy) DeviceDiscovered(deviceId string, deviceType string, parentId string, publisher string) error {
- logger.Debugw("sending-device-discovery-msg", log.Fields{"deviceId": deviceId})
- // Simple validation
- if deviceId == "" || deviceType == "" {
- logger.Errorw("invalid-parameters", log.Fields{"id": deviceId, "type": deviceType})
- return errors.New("invalid-parameters")
- }
- // Create the device discovery message
- header := &ic.Header{
- Id: uuid.New().String(),
- Type: ic.MessageType_DEVICE_DISCOVERED,
- FromTopic: kp.defaultTopic.Name,
- ToTopic: kp.deviceDiscoveryTopic.Name,
- Timestamp: ptypes.TimestampNow(),
- }
- body := &ic.DeviceDiscovered{
- Id: deviceId,
- DeviceType: deviceType,
- ParentId: parentId,
- Publisher: publisher,
- }
-
- var marshalledData *any.Any
- var err error
- if marshalledData, err = ptypes.MarshalAny(body); err != nil {
- logger.Errorw("cannot-marshal-request", log.Fields{"error": err})
- return err
- }
- msg := &ic.InterContainerMessage{
- Header: header,
- Body: marshalledData,
- }
-
- // Send the message
- if err := kp.kafkaClient.Send(msg, kp.deviceDiscoveryTopic); err != nil {
- logger.Errorw("cannot-send-device-discovery-message", log.Fields{"error": err})
- return err
- }
- return nil
-}
-
// InvokeAsyncRPC is used to make an RPC request asynchronously
func (kp *interContainerProxy) InvokeAsyncRPC(ctx context.Context, rpc string, toTopic *Topic, replyToTopic *Topic,
waitForResponse bool, key string, kvArgs ...*KVArg) chan *RpcResponse {
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/techprofile/tech_profile.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/techprofile/tech_profile.go
index 492c9e8..ff37326 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/techprofile/tech_profile.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/techprofile/tech_profile.go
@@ -374,10 +374,9 @@
}
const (
- xgspon = "xgspon"
- xgsponBbsim = "XGS-PON"
- gpon = "gpon"
- epon = "EPON"
+ xgspon = "XGS-PON"
+ gpon = "GPON"
+ epon = "EPON"
)
func (t *TechProfileMgr) SetKVClient() *db.Backend {
@@ -450,7 +449,7 @@
// is broken into ["XGS-PON" "64" ...]
pathSlice := regexp.MustCompile(`/`).Split(path, -1)
switch pathSlice[0] {
- case xgspon, xgsponBbsim, gpon:
+ case xgspon, gpon:
resPtr = &KvTpIns
case epon:
resPtr = &KvEponIns
@@ -1367,7 +1366,7 @@
for kvPath, kvPair := range kvPairs {
if value, err := kvstore.ToByte(kvPair.Value); err == nil {
- if tech == xgspon || tech == xgsponBbsim || tech == gpon {
+ if tech == xgspon || tech == gpon {
if err = json.Unmarshal(value, &tpTech); err != nil {
logger.Errorw("error-unmarshal-kv-pair", log.Fields{"kvPath": kvPath, "value": value})
continue
@@ -1386,7 +1385,7 @@
}
switch tech {
- case xgspon, xgsponBbsim, gpon:
+ case xgspon, gpon:
return tpInstancesTech
case epon:
return tpInstancesEpon
diff --git a/vendor/modules.txt b/vendor/modules.txt
index af2b034..d08179a 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -67,7 +67,7 @@
github.com/mitchellh/go-homedir
# github.com/mitchellh/mapstructure v1.1.2
github.com/mitchellh/mapstructure
-# github.com/opencord/voltha-lib-go/v3 v3.1.20
+# github.com/opencord/voltha-lib-go/v3 v3.1.22
github.com/opencord/voltha-lib-go/v3/pkg/adapters
github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif
github.com/opencord/voltha-lib-go/v3/pkg/adapters/common