-
Notifications
You must be signed in to change notification settings - Fork 118
Add OverrideLeafList support in ygot diff. #1046
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
Conversation
Implemented handling for DeleteWithUpdateLeafList operation in diff.go Added corresponding test cases in diff_test.go Tested locally to ensure correct functionality and pushed the generated Diff config in Arista FakeFabric (Google Internal Tool). Details: Explicitly delete and then update leaf-list, which is different and exists in both orig and modified. For example, if the original path is x/y/[a, b] and the modified leaf-list is x/y/[b, c], Then resulting notification will contain: Delete x/y/[a, b] Update x/y/[b, c] If this is false, then the leaf-list will be updated directly to the new value without the delete step. This is required because if the leaf-list is updated directly, the resulting notification will be: Update x/y/[b, c] This will cause the new value to be appended in the OC, but the original value will still be present in the OC. Resultant OC in the device will be x/y/[a, b, c].
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.
The general shape of this code LGTM. I have a couple of editorial, and one functional thing that I think we need to address before submitting.
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.
Thanks for the change and iteration!
Implemented handling for OverrideLeafList operation in diff.go Added corresponding test cases in diff_test.go
Tested locally to ensure correct functionality and pushed the generated Diff config in Arista FakeFabric (Google Internal Tool).
Details:
Explicitly delete and then update leaf-list, which is different and exists in both orig and modified. For example, if the original path is x/y/[a, b] and the modified leaf-list is x/y/[b, c], Then resulting notification will contain:
Delete x/y
Update x/y/[b, c]
If this is false, then the leaf-list will be updated directly to the new value without the delete step.