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

Export ConstructJSON ordered map test #868

Merged
merged 16 commits into from
Jun 12, 2023
Merged

Export ConstructJSON ordered map test #868

merged 16 commits into from
Jun 12, 2023

Conversation

wenovus
Copy link
Collaborator

@wenovus wenovus commented Jun 9, 2023

YANG file was restructured to allow for namespace changing.

wenovus added 10 commits June 6, 2023 19:15
When comparing two GoStructs where a YANG `ordered-by user` list is
involved, it is not possible using a single Notification to represent
the diff such that the Notification can do the following:
1. update a gNMI cache correctly with the atomic notification.
2. unmarshal the notification to the `orig` to get back the `modified`
   GoStruct.

This function achieves this functionality, sharing the underlying
implementation with Diff, where a disclaimer has been added to the doc
comment.

Other helpers have been created as well to be shared with
`TogNMINotifications`.

Other changes:
- `TogNMINotifications` has been changed to follow the same convention of
  putting the non-atomic Notification as the first message instead of
  the last. The reason is that current code MAY be using `notifs[0]` and
  I don't want to break that, and this also seems slightly better from a
  usability perspective.
@wenovus wenovus requested a review from DanG100 June 9, 2023 01:03
@coveralls
Copy link

coveralls commented Jun 9, 2023

Coverage Status

coverage: 89.65%. remained the same when pulling 9186a5e on export-constructjson into 55341c1 on master.

Base automatically changed from export-tognmi-tests to populatedef-om June 12, 2023 20:53
Base automatically changed from populatedef-om to master June 12, 2023 21:39
@wenovus wenovus merged commit 22c243c into master Jun 12, 2023
@wenovus wenovus deleted the export-constructjson branch June 12, 2023 22:01
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