Skip to content
Snippets Groups Projects
Commit edc55a3b authored by Fabian Seidl's avatar Fabian Seidl
Browse files

fix not being able to deal with uints

parent eb785f99
No related branches found
No related tags found
1 merge request!1218Fix not being able to deal with uints from subscribers
Pipeline #262465 passed
...@@ -245,7 +245,19 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib ...@@ -245,7 +245,19 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
log.Errorf("Error trying to create a string from path: %v", err) 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
}
update.Val.GetUintVal()
} }
mneID, err := uuid.Parse(subscriptionInfo.NetworkElementID) mneID, err := uuid.Parse(subscriptionInfo.NetworkElementID)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment