ygot icon indicating copy to clipboard operation
ygot copied to clipboard

New DiffOpts

Open ccakes opened this issue 2 years ago • 1 comments

This PR adds new DiffOpt types to change how diffs are generated.

  • PrependModuleNames does the same as RFC7951JSONConfig.AppendModuleNames but for the paths created in the diff notifications
  • RFC7951Diff encodes the value in the gnmipb.Update as an IETF-JSON value instead of a proto value

First PR on this project so open to feedback. I looked at how the AppendModuleNames works for EmitJSON() to see if I could re-use any machinery but it didn't seem doable without a lot of work. If you have ideas on how to refactor that to share some infrastructure I'm open to doing it.

ccakes avatar Jul 13 '22 05:07 ccakes

Also the test for the JSON encoding is failing but I can't figure out why. NotificationSetEqual() thinks they're different but cmp.Diff() disagrees so the output looks a little wonky.

ccakes avatar Jul 13 '22 05:07 ccakes