We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29aeec1 commit 13a6771Copy full SHA for 13a6771
util/yang.go
@@ -303,18 +303,7 @@ func fixYangRegexp(pattern string) string {
303
// the state. If the element at the top of the tree does not have config set, then config
304
// is true. See https://tools.ietf.org/html/rfc6020#section-7.19.1.
305
func IsConfig(e *yang.Entry) bool {
306
- for ; e.Parent != nil; e = e.Parent {
307
- switch e.Config {
308
- case yang.TSTrue:
309
- return true
310
- case yang.TSFalse:
311
- return false
312
- }
313
314
-
315
- // Reached the last element in the tree without explicit configuration
316
- // being set.
317
- return e.Config != yang.TSFalse
+ return !e.ReadOnly()
318
}
319
320
// isPathChild takes an input slice of strings representing a path and determines
0 commit comments