VOL-2135 - update to voltha-lib-go@v2.2.5
Change-Id: I0602eb56d33380a09abf7fa1d38d7937c075ba03
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"