Update the device discovery protos to include the core POD name.
Change-Id: I0d562487f5ea5ba5e5ccfbb89d276a254edc612c
diff --git a/kafka/kafka_inter_container_library.go b/kafka/kafka_inter_container_library.go
index 4a3ec92..2d2714f 100644
--- a/kafka/kafka_inter_container_library.go
+++ b/kafka/kafka_inter_container_library.go
@@ -26,6 +26,7 @@
"github.com/opencord/voltha-go/common/log"
ic "github.com/opencord/voltha-go/protos/inter_container"
"reflect"
+ "strings"
"sync"
"time"
)
@@ -178,7 +179,7 @@
}
// DeviceDiscovered publish the discovered device onto the kafka messaging bus
-func (kp *InterContainerProxy) DeviceDiscovered(deviceId string, deviceType string, parentId string) error {
+func (kp *InterContainerProxy) DeviceDiscovered(deviceId string, deviceType string, parentId string, publisher string) error {
log.Debugw("sending-device-discovery-msg", log.Fields{"deviceId": deviceId})
// Simple validation
if deviceId == "" || deviceType == "" {
@@ -197,6 +198,7 @@
Id: deviceId,
DeviceType: deviceType,
ParentId: parentId,
+ Publisher:publisher,
}
var marshalledData *any.Any
@@ -560,6 +562,9 @@
func CallFuncByName(myClass interface{}, funcName string, params ...interface{}) (out []reflect.Value, err error) {
myClassValue := reflect.ValueOf(myClass)
+ // Capitalize the first letter in the funcName to workaround the first capital letters required to
+ // invoke a function from a different package
+ funcName = strings.Title(funcName)
m := myClassValue.MethodByName(funcName)
if !m.IsValid() {
return make([]reflect.Value, 0), fmt.Errorf("method-not-found \"%s\"", funcName)