Skip to content
Snippets Groups Projects
Commit 5f98b0ad authored by Fabian Seidl's avatar Fabian Seidl Committed by Malte Bauch
Browse files

fix access to value of var

parent 1bd69576
No related branches found
No related tags found
1 merge request!1219Fix access to value of var in gNMI Update
Pipeline #262625 passed
...@@ -247,11 +247,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib ...@@ -247,11 +247,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
switch v := update.GetVal().GetValue().(type) { switch v := update.GetVal().GetValue().(type) {
case *gpb.TypedValue_StringVal: case *gpb.TypedValue_StringVal:
pathsAndValues[pathString] = update.Val.GetStringVal() pathsAndValues[pathString] = update.GetVal().GetStringVal()
case *gpb.TypedValue_JsonIetfVal: case *gpb.TypedValue_JsonIetfVal:
pathsAndValues[pathString] = string(update.GetVal().GetJsonIetfVal()) pathsAndValues[pathString] = string(update.GetVal().GetJsonIetfVal())
case *gpb.TypedValue_UintVal: case *gpb.TypedValue_UintVal:
pathsAndValues[pathString] = fmt.Sprintf("%d", update.Val.GetUintVal()) pathsAndValues[pathString] = fmt.Sprintf("%d", update.GetVal().GetUintVal())
default: 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) 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 return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment