As in RFC 7950 section 6.2.1:
o All leafs, leaf-lists, lists, containers, choices, rpcs, actions,
notifications, anydatas, and anyxmls defined (directly or through
a "uses" statement) within a parent node or at the top level of
the module or its submodules share the same identifier namespace.
This namespace is scoped to the parent node or module, unless the
parent node is a case node. In that case, the namespace is scoped
to the closest ancestor node that is not a case or choice node.
We should take into consideration the following 3 models:
module bar { yang-version 1.1; namespace bar; prefix bar; revision "2018-02-11"; grouping foo { container bar { } } container cont { choice bar { case foo { uses foo; } } } augment "/cont" { choice foo { case foo { uses foo; } } } } module baz { yang-version 1.1; namespace baz; prefix baz; revision "2018-02-28"; grouping foo { container bar { } } container cont { choice bar { case foo { uses foo; } } container bar { } } } module foo { yang-version 1.1; namespace foo; prefix foo; revision "2018-02-11"; grouping foo { container bar { } } container cont { choice bar { case foo { uses foo; } } } augment "/cont/bar" { case foo2 { uses foo; } } }
- is duplicated by
-
YANGTOOLS-1026 Choice/Case children conflict does not seem to be detected
- Resolved
- relates to
-
YANGTOOLS-853 Fix EffectiveStatement namespace implementation
- Confirmed
-
BGPCEP-880 Fix usage of duplicate child element in choice case statement in bgpcep yang files
- Resolved
-
YANGTOOLS-883 YANG parser fails to detect duplicate nodes in cases
- Resolved