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

Clean up

parent e06f342e
Branches
Tags
1 merge request!576Resolve "The key for more complex paths in the map containing information of update events should be improved"
Pipeline #164318 passed
This commit is part of merge request !576. Comments created here will be created in the context of that merge request.
...@@ -184,22 +184,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib ...@@ -184,22 +184,11 @@ func (n *NetworkElementWatcher) handleSubscribeResponseUpdate(resp *gpb.Subscrib
pathsAndValues := make(map[string]string, len(resp.Update.Update)) pathsAndValues := make(map[string]string, len(resp.Update.Update))
for _, update := range resp.Update.Update { for _, update := range resp.Update.Update {
//pathString := ""
pathString, err := ygot.PathToString(update.Path) pathString, err := ygot.PathToString(update.Path)
if err != nil { if err != nil {
log.Errorf("Error trying to create a string from path: %v", err) 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() pathsAndValues[pathString] = update.Val.GetStringVal()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment