diff --git a/controller/nucleus/networkElementWatcher.go b/controller/nucleus/networkElementWatcher.go index 07ad775f253c361a7921c6699d95b2681c1e7002..a81fd7a9c4d5aeb5023aab7df5b2f29507b5c2da 100644 --- a/controller/nucleus/networkElementWatcher.go +++ b/controller/nucleus/networkElementWatcher.go @@ -245,7 +245,17 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib log.Errorf("Error trying to create a string from path: %v", err) } - pathsAndValues[pathString] = update.Val.GetStringVal() + switch v := update.GetVal().GetValue().(type) { + case *gpb.TypedValue_StringVal: + pathsAndValues[pathString] = update.Val.GetStringVal() + case *gpb.TypedValue_JsonIetfVal: + pathsAndValues[pathString] = string(update.GetVal().GetJsonIetfVal()) + case *gpb.TypedValue_UintVal: + pathsAndValues[pathString] = fmt.Sprintf("%d", update.Val.GetUintVal()) + default: + log.Errorf("The given value of type: %T, provided by a SubResponse from network element with ID: %s is not supported", v, subscriptionInfo.NetworkElementID) + return + } } mneID, err := uuid.Parse(subscriptionInfo.NetworkElementID)