Skip to content
Snippets Groups Projects

Fix access to value of var in gNMI Update

Merged Fabian Seidl requested to merge hotfix-var-access into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -247,11 +247,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
switch v := update.GetVal().GetValue().(type) {
case *gpb.TypedValue_StringVal:
pathsAndValues[pathString] = update.Val.GetStringVal()
pathsAndValues[pathString] = update.GetVal().GetStringVal()
case *gpb.TypedValue_JsonIetfVal:
pathsAndValues[pathString] = string(update.GetVal().GetJsonIetfVal())
case *gpb.TypedValue_UintVal:
pathsAndValues[pathString] = fmt.Sprintf("%d", update.Val.GetUintVal())
pathsAndValues[pathString] = fmt.Sprintf("%d", update.GetVal().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
Loading