-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add delete field to On change response when key is deleted #139
Conversation
fd73da5
to
b84845e
Compare
gnmi_server/server_test.go
Outdated
q.NotificationHandler = func(n client.Notification) error { | ||
if nn, ok := n.(client.Update); ok { | ||
nn.TS = time.Unix(0, 200) | ||
mutexNoti.Lock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](http://example.com/codeflow?start=0&length=6)
Mix tabs and spaces #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
gnmi_server/server_test.go
Outdated
mutexNoti.Unlock() | ||
|
||
mutexNoti.RLock() | ||
gotNoti = append(currentNoti, nn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](http://example.com/codeflow?start=0&length=6)
The same #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
// Delete to be used to indicate that node was deleted | ||
[]gnmi.Path delete = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an incorrect syntax. It should have been repeated gnmi.Path delete = 8
. I opened PR #157 to fix.
Please do not update the sonic_internal.pb.go file manually when the proto file was modified. Run make proto/sonic_internal.pb.go
to re-generate it, which will report all syntax errors in the proto file.
Why I did it
Currently when node is deleted, we do not send a delete field which should be the case according to gnmi specification:
https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md#21-reusable-notification-message-format
How I did it
Added delete field
How to verify it
UT
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)