Skip to content
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

Merged
merged 30 commits into from
Aug 1, 2023

Conversation

zbud-msft
Copy link
Contributor

@zbud-msft zbud-msft commented Jul 21, 2023

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)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@zbud-msft zbud-msft marked this pull request as ready for review July 24, 2023 16:22
@zbud-msft zbud-msft requested a review from qiluo-msft July 27, 2023 22:39
@zbud-msft zbud-msft requested a review from FengPan-Frank July 27, 2023 22:39
qiluo-msft
qiluo-msft previously approved these changes Jul 28, 2023
FengPan-Frank
FengPan-Frank previously approved these changes Jul 28, 2023
@zbud-msft zbud-msft dismissed stale reviews from FengPan-Frank and qiluo-msft via d0d1555 July 31, 2023 19:35
q.NotificationHandler = func(n client.Notification) error {
if nn, ok := n.(client.Update); ok {
nn.TS = time.Unix(0, 200)
mutexNoti.Lock()
Copy link
Collaborator

@qiluo-msft qiluo-msft Aug 1, 2023

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

mutexNoti.Unlock()

mutexNoti.RLock()
gotNoti = append(currentNoti, nn)
Copy link
Collaborator

@qiluo-msft qiluo-msft Aug 1, 2023

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@zbud-msft zbud-msft requested a review from qiluo-msft August 1, 2023 18:45

// Delete to be used to indicate that node was deleted
[]gnmi.Path delete = 8;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants