Skip to content
Snippets Groups Projects
Commit 86b4b7cd authored by Malte Bauch's avatar Malte Bauch
Browse files

Clean up

parent e06f342e
No related branches found
No related tags found
1 merge request!576Resolve "The key for more complex paths in the map containing information of update events should be improved"
Pipeline #164318 passed
......@@ -184,22 +184,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
pathsAndValues := make(map[string]string, len(resp.Update.Update))
for _, update := range resp.Update.Update {
//pathString := ""
pathString, err := ygot.PathToString(update.Path)
if err != nil {
log.Errorf("Error trying to create a string from path: %v", err)
}
log.Info("Generated path string, used as key in pathAndValues map: ", pathString)
//// go through elem to build full path
//for _, elem := range update.Path.Elem {
// // remove unwanted parts of path string example: "name:\"system\"" -> "system"
// filteredElem := elem.String()[strings.Index(elem.String(), ":\"")+2 : len(elem.String())-1]
// pathString += filteredElem + "/"
//}
pathsAndValues[pathString] = update.Val.GetStringVal()
}
......
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