Skip to content

Releases: openconfig/ygot

v0.10.2

24 Mar 23:22
25f3c35
Compare
Choose a tag to compare
  • Fix default value generation for non-singleton unions in leaf getters when -generate_simple_unions=true. Errors out for -generate_simple_unions=false.
  • ygot now checks that the default statement's value conforms to the type's restrictions. However, note there is a goyang bug with respect to the inheritance of max and min values that makes the check overly-lenient in some cases: openconfig/goyang#128.
    • NOTE: Previously passing generation will now fail if there is a default statement that doesn't conform to the type restrictions. Notably, pyang did not catch this error for leafref statements.
  • Generate default values for decimal64 and unions correctly.
    • NOTE: Previously passing generation will now fail if there is a default statement for a YANG typedef decimal64 or typedef union statement that's used as a leaf type in the compiled YANG models and -generate_simple_unions=false.
  • Fix where unsupported types were producing non-compilable code when -generate_simple_unions=true.
  • Improve inclusiveness of codebase terminology.

v0.10.1

15 Mar 21:30
bbb5053
Compare
Choose a tag to compare
  • [ygot merge] copyMapField and copySliceField updates dst in place instead of creating a new one. This change also fixes a bug that copyMapField is not overwriting dst (credits @chentianheng604).
  • Correct a number of typos in the codebase.

v0.10.0

13 Jan 20:07
527b804
Compare
Choose a tag to compare
  • ygot.MergeStruct* will now skip merging identical slices instead of throwing an error.
  • Handle absolute leafrefs being used as keys for a list.
  • Fix bug with AppendErr statements.

v0.9.0

09 Dec 17:18
ce23376
Compare
Choose a tag to compare
  • Add Go generator flag ignore_shadowed_schema_paths. When turned on, the generated Go code will ignore shadow-path values during unmarshalling of JSON or gNMI values.
  • Add Go generator flag enum_suffix_for_simple_union_enums. When turned on, inlined enumerations within non-typedef unions will have an "Enum" suffix appended. This flag will be turned on by default, and deprecated in v1.0.0.
  • Add protogenerator flag consistent_union_enum_names. When turned on, enumerations used within unions will have their names changed into a consistent form that is used by the current Go code. This flag will be turned on by default, and deprecated in v1.0.0.
  • Fix unmarshal's detection of invalid fields in JSON input.
  • Treat ListAttr.MaxElements=0 as "unbounded" during validation.

v0.8.12

24 Nov 22:56
db98071
Compare
Choose a tag to compare
  • Add util.PathElemSlicesEqual to compare slices of *gpb.PathElem.
  • Remove experimental directory from ygot.
  • Improve Error Message for findMappableEntities.
  • Ignore default data values in findSetLeaves (fixes YANGEmpty comparison when using ygot.Diff)

v0.8.11

20 Oct 19:05
00a6fee
Compare
Choose a tag to compare
  • Update goyang dependency to v0.2.1
  • [ypathgen]: Add docstring on valid types for list keys for list constructors

v0.8.10

13 Oct 15:17
50b44fc
Compare
Choose a tag to compare
  • Add oc-ext:posix-pattern Support.
  • Add Flag -trim_enum_openconfig_prefix to Trim Enumerated Names.

v0.8.9

30 Sep 15:31
fc02f43
Compare
Choose a tag to compare
  • Fix bug where simple union enums causes panic within ygot.Diff.

v0.8.8

29 Sep 19:33
003238b
Compare
Choose a tag to compare

Add -generate_simple_unions flag for Go generation. When this flag is set, generated Go code uses a new simplified union API that makes unions much easier to work with. Instead of having to construct a unique wrapper struct or calling the To_xxx_Union("foo") method for each union leaf, oc.UnionString("foo") and other simple typedefs can be used to represent the union type for any union leaf that includes a string. This is now the recommended way to represent unions, and exampleoc and uexampleoc have been updated to reflect this.

Also in this release, the YANG binary type can no longer be used as part of a list key in generated Go code. Any YANG list with a binary key or a union key containing a binary will no longer compile.

v0.8.7

01 Sep 23:27
dc7c9e6
Compare
Choose a tag to compare
  • CustomValidationOptions added to ytypes.Validate