Skip to content

Releases: openconfig/ygot

v0.8.6

11 Aug 19:21
b9d3c8f
Compare
Choose a tag to compare
  • Fix bug in stringToKeyType where key fields that were themselves leafrefs were unable to be unmarshalled.

v0.8.5

10 Aug 23:48
2670e49
Compare
Choose a tag to compare
  • Allow leafref keys to be unmarshalled when prefer_operational_state is set.
  • Allow gNMI paths with union keys embedded to be unmarshalled.

v0.8.4

04 Aug 20:28
6c6d7de
Compare
Choose a tag to compare
  • Add options to MergeStruct and MergeStructInto. This release adds a MergeOpt to both of these functions which can be used to control the merging behaviour. The initial option allows for overwriting fields that are populated in both the source and destination struct. Without the option, this case would result in an error if the two structs were populated and their values were unequal - now the destination is overwritten with the source's value.
  • Initial implementation stages for ygen intermediate representation (IR). This release includes some template code (not yet currently being executed) and a design document for the restructuring of the ygen library to use an IR from which code is generated. This eventually will allow for the protobuf and Go struct rendering functions to move out of ygen into their own packages - and allow for easier extension of the library to new formats.

v0.8.3

24 Jul 23:42
3599517
Compare
Choose a tag to compare
  • Add bool flag typedef_enum_with_defmod (default false)
    • This flag's behaviour is intended to be the default behaviour. Its release
      starts a transition period for users to begin enabling this flag.
    • This flag causes typedef enumeration/identity names to be prefixed with
      its defining module name, per docs/design.md, instead of the current
      behaviour of using the residing module.
    • Using this flag also fixes a related bug. Namely, if a collision of a
      typedef name occurred, behaviour with flag set to false silently ignores
      this fact, and uses one of the enums in place of all conflicting enums.
      Turning on this flag would now cause a code generation error to be
      raised when this conflict occurs.
    • where an enumeration is defined within a typedef that contains a union,
      the enumerated language type that is generated is named according to the name
      of the typedef with _Enum appended to the name. This improves upon the
      present behaviour (which duplicates the definition for every place of usage) by
      giving a name to such enumerations, thus de-duping them.
    • Enabling this flag also partially fixes #245, including the sid-id case in the
      real OpenConfig schema.
  • Add DefiningType Helper to util package.

v0.8.2

23 Jul 21:45
0e7fa46
Compare
Choose a tag to compare
  • Reduced memory usage of EmitJSON() by optimizing ygot.Validate.
  • Mechanical change: move ygot/proto -> protomap.
  • Add support for lists to protomap.

v0.8.1

01 Jul 00:10
7b2d049
Compare
Choose a tag to compare
  • ypathgen generation now can generate PathStructs whose names don't conflict with GoStructs.
  • ypathgen's generator is deleted and merged with the primary ygot generator. This generator is capable of generating either or both types of structs.
  • exampleoc now contains the generated path structs alongside the generated GoStructs.
  • generator's ability to split the structs by the leading letter is changed in behaviour to be split via a pre-determined number of files as a generation parameter instead.
  • ypathgen's generated code is slightly simplified.

v0.8.0

22 Jun 18:28
718c902
Compare
Choose a tag to compare

Add new options for shortening enumeration names in ygot's generated Go output.
Add a new marshalling function for RFC7951.

v0.7.6

04 Jun 21:14
d9fb96d
Compare
Choose a tag to compare
  • Use new goyang dependency that parses typedef decimal64 ranges correctly.
  • Internal refactoring.

v0.7.5

21 May 18:20
32b56b7
Compare
Choose a tag to compare
  • Fix a bug in marshalling annotations that was introduced in v0.7.4.
  • Fix a long standing bug in unmarshalling annotations that was missed previously

v0.7.4

19 May 00:47
12e41ab
Compare
Choose a tag to compare

Bug fix when unmarshalling Annotations, add new generator flag -skip_enum_deduplication, and other improvements.

  • Fix bug where if a concrete Annotation type's UnmarshalJSON behaviour deviated from the default json.Unmarshal behaviour, it would cause invalid or incorrect JSON to be generated and possibly fail during JSON construction.
  • Add -skip_enum_deduplication flag. There are occasions where an enumeration leaf is used in multiple places due to re-use of a grouping. In such cases, the leaf whose path is lexicographically earlier will by default determine the name of the enumeration in the generated code. While this may work well for some YANG schemas, it essentially requires knowledge of the other parts of the schema and may not suit others. The -skip_enum_deduplication flag within generator.go overrides this behaviour and generates different enumerations in the generated code as if there were no re-use of these enumeration leaves (unless their generated names were to be the same anyways).
  • Support multiple GOPATHs being set in the calling environment by not using this variable in scripts called by go generate.
  • Change CI to GitHub actions.