Skip to content

Conversation

aayueshbarui
Copy link
Contributor

@aayueshbarui aayueshbarui commented Aug 15, 2025

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.

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].
@coveralls
Copy link

coveralls commented Aug 15, 2025

Coverage Status

coverage: 88.728% (-0.02%) from 88.744%
when pulling 9bd8a7f on aayueshbarui:master
into 07135be on openconfig:master.

@aayueshbarui aayueshbarui changed the title Add DeleteWithUpdateLeafList support in ygot diff. Add OverrideLeafList support in ygot diff. Aug 18, 2025
@robshakir robshakir self-requested a review August 18, 2025 15:43
Copy link
Member

@robshakir robshakir left a 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.

@aayueshbarui aayueshbarui requested a review from robshakir August 31, 2025 11:10
Copy link
Member

@robshakir robshakir left a 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!

@robshakir robshakir merged commit 0f8499b into openconfig:master Sep 3, 2025
6 checks passed
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.

3 participants