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

Uncompressed ordered map tests for ytypes #873

Merged
merged 49 commits into from
Jun 13, 2023
Merged

Uncompressed ordered map tests for ytypes #873

merged 49 commits into from
Jun 13, 2023

Conversation

wenovus
Copy link
Collaborator

@wenovus wenovus commented Jun 9, 2023

No description provided.

wenovus added 20 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.
* Simplified `UnmarshalSetRequest` to always unmarshal w/r to the root
  node. This allows atomic Notifications to be deleted correctly.
@wenovus wenovus requested a review from DanG100 June 9, 2023 22:29
@coveralls
Copy link

coveralls commented Jun 9, 2023

Coverage Status

coverage: 89.637% (+0.004%) from 89.633% when pulling 4e4663c on uom-3 into 7c99f87 on master.

ytypes/node_exported_test.go Outdated Show resolved Hide resolved
Base automatically changed from uom-2 to master June 13, 2023 17:33
wenovus added 3 commits June 13, 2023 10:33
…#875)

* Preserve some backward-compatibilities with certain render functions.

Unfortunately Hyrum's law applies to ygot. I am reverting the
normalizing behaviour for internal JSON generation.

* Fix test imports: we can't have exported test importing symbols from … (#876)

* Fix test imports: we can't have exported test importing symbols from unexported test files

* fix
* Enable ordered map generation for YANG `ordered-by user` lists

These satisfy the `ygot.OrderedList` interface.

This is a backwards-incompatible change, but is also a bug fix at the
same time.

* GoOrderedList -> GoOrderedMap

* Fix unkeyed list PopulateDefault generation (#877)

* Fix unkeyed list PopulateDefault generation

* Change interface{} -> any
@wenovus wenovus merged commit e9abcd4 into master Jun 13, 2023
@wenovus wenovus deleted the uom-3 branch June 13, 2023 18:25
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