Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
86b4b7cd
Commit
86b4b7cd
authored
1 year ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
Clean up
parent
e06f342e
No related branches found
No related tags found
1 merge request
!576
Resolve "The key for more complex paths in the map containing information of update events should be improved"
Pipeline
#164318
passed
1 year ago
Stage: build
Stage: test
Stage: analyze
Stage: integration-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controller/nucleus/networkElementWatcher.go
+0
-11
0 additions, 11 deletions
controller/nucleus/networkElementWatcher.go
with
0 additions
and
11 deletions
controller/nucleus/networkElementWatcher.go
+
0
−
11
View file @
86b4b7cd
...
...
@@ -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
()
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment