VOL-2135 - update to voltha-lib-go@v2.2.5
Change-Id: I0602eb56d33380a09abf7fa1d38d7937c075ba03
diff --git a/go.mod b/go.mod
index 9444358..0e4adda 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@
require (
github.com/gogo/protobuf v1.3.0
- github.com/opencord/voltha-lib-go v0.0.0-20191017201200-e73f91e306e9
+ github.com/opencord/voltha-lib-go v0.0.0-20191023185531-80258b36a64b
github.com/opencord/voltha-protos v1.0.3
github.com/stretchr/testify v1.4.0
)
diff --git a/go.sum b/go.sum
index e8dcc5a..8367f2f 100644
--- a/go.sum
+++ b/go.sum
@@ -196,8 +196,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 v0.0.0-20191017201200-e73f91e306e9 h1:/CA9esQ/L41vhvwCIDI+cLjrawry5+1fQWt/O91KFXU=
-github.com/opencord/voltha-lib-go v0.0.0-20191017201200-e73f91e306e9/go.mod h1:+bjwfm5bbP1j6liscpn3UFqbh6hHDkmLDWU3AdYLDY4=
+github.com/opencord/voltha-lib-go v0.0.0-20191023185531-80258b36a64b h1:s3zvCa27RhpVy+wCk5R4iKa9H61B1MzbSL2164B1w68=
+github.com/opencord/voltha-lib-go v0.0.0-20191023185531-80258b36a64b/go.mod h1:+bjwfm5bbP1j6liscpn3UFqbh6hHDkmLDWU3AdYLDY4=
github.com/opencord/voltha-protos v1.0.3 h1:9v+R/QGF1xK+HKTqFM0IqCABoGCAxC8iKH4VzNBJDto=
github.com/opencord/voltha-protos v1.0.3/go.mod h1:myfFIkJdA+rCXmKdLImhh79MfabN4ZOKQ4grk32DnPQ=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
diff --git a/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/adapterif/core_proxy_if.go b/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/adapterif/core_proxy_if.go
index 26d021f..196f356 100644
--- a/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/adapterif/core_proxy_if.go
+++ b/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/adapterif/core_proxy_if.go
@@ -46,4 +46,5 @@
GetChildDevice(ctx context.Context, parentDeviceID string, kwargs map[string]interface{}) (*voltha.Device, error)
GetChildDevices(ctx context.Context, parentDeviceID string) (*voltha.Devices, error)
SendPacketIn(ctx context.Context, deviceID string, port uint32, pktPayload []byte) error
+ DeviceReasonUpdate(ctx context.Context, deviceID string, deviceReason string) error
}
diff --git a/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/common/core_proxy.go b/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/common/core_proxy.go
index 30117ca..1daeacb 100644
--- a/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/common/core_proxy.go
+++ b/vendor/github.com/opencord/voltha-lib-go/pkg/adapters/common/core_proxy.go
@@ -500,6 +500,30 @@
return unPackResponse(rpc, deviceId, success, result)
}
+func (ap *CoreProxy) DeviceReasonUpdate(ctx context.Context, deviceId string, deviceReason string) error {
+ log.Debugw("DeviceReasonUpdate", log.Fields{"deviceId": deviceId, "deviceReason": deviceReason})
+ rpc := "DeviceReasonUpdate"
+ // Use a device specific topic to send the request. The adapter handling the device creates a device
+ // specific topic
+ toTopic := ap.getCoreTopic(deviceId)
+ replyToTopic := ap.getAdapterTopic()
+
+ args := make([]*kafka.KVArg, 2)
+ id := &voltha.ID{Id: deviceId}
+ args[0] = &kafka.KVArg{
+ Key: "device_id",
+ Value: id,
+ }
+ reason := &ic.StrType{Val: deviceReason}
+ args[1] = &kafka.KVArg{
+ Key: "device_reason",
+ Value: reason,
+ }
+ success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, deviceId, args...)
+ log.Debugw("DeviceReason-response", log.Fields{"pDeviceId": deviceId, "success": success})
+ return unPackResponse(rpc, deviceId, success, result)
+}
+
func (ap *CoreProxy) DevicePMConfigUpdate(ctx context.Context, pmConfigs *voltha.PmConfigs) error {
log.Debugw("DevicePMConfigUpdate", log.Fields{"pmConfigs": pmConfigs})
rpc := "DevicePMConfigUpdate"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 550eb4a..19ebf51 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -55,7 +55,7 @@
github.com/mitchellh/go-homedir
# github.com/mitchellh/mapstructure v1.1.2
github.com/mitchellh/mapstructure
-# github.com/opencord/voltha-lib-go v0.0.0-20191017201200-e73f91e306e9
+# github.com/opencord/voltha-lib-go v0.0.0-20191023185531-80258b36a64b
github.com/opencord/voltha-lib-go/pkg/adapters
github.com/opencord/voltha-lib-go/pkg/adapters/common
github.com/opencord/voltha-lib-go/pkg/db/kvstore