Releases: openconfig/ygot
Releases · openconfig/ygot
v0.8.6
v0.8.5
v0.8.4
- Add options to
MergeStruct
andMergeStructInto
. This release adds aMergeOpt
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 theygen
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
- 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 atypedef
that contains aunion
,
the enumerated language type that is generated is named according to the name
of thetypedef
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.
- This flag's behaviour is intended to be the default behaviour. Its release
- Add
DefiningType
Helper toutil
package.
v0.8.2
v0.8.1
- 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
v0.7.6
v0.7.5
v0.7.4
Bug fix when unmarshalling Annotation
s, add new generator flag -skip_enum_deduplication
, and other improvements.
- Fix bug where if a concrete
Annotation
type'sUnmarshalJSON
behaviour deviated from the defaultjson.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 anenumeration
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 withingenerator.go
overrides this behaviour and generates different enumerations in the generated code as if there were no re-use of theseenumeration
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.