You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add skip_deprecated and skip_obsolete flags to ygot (#1037)
* Add SkipDeprecated and SkipObsolete flags to ygot/ygen
* Extend to individual deprecated/obsolete leaf fields within containers
* Add helper functions isDeprecated(yang.Node) and isObsolete(yang.Node)
Copy file name to clipboardExpand all lines: generator/generator.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ var (
80
80
enumOrgPrefixesToTrim []string
81
81
ignoreUnsupportedStatements=flag.Bool("ignore_unsupported", false, "If set to true, unsupported YANG statements are ignored.")
82
82
ignoreDeviateNotsupported=flag.Bool("ignore_deviate_notsupported", false, "If set to true, 'deviate not-supported' YANG statements are ignored, thus target nodes are retained in the generated code.")
83
+
skipDeprecated=flag.Bool("skip_deprecated", false, "If set to true, YANG fields with status 'deprecated' are excluded from the generated code.")
84
+
skipObsolete=flag.Bool("skip_obsolete", false, "If set to true, YANG fields with status 'obsolete' are excluded from the generated code.")
83
85
84
86
// Flags used for GoStruct generation only.
85
87
generateFakeRoot=flag.Bool("generate_fakeroot", false, "If set to true, a fake element at the root of the data tree is generated. By default the fake root entity is named Device, its name can be controlled with the fakeroot_name flag.")
0 commit comments