ConfD User Community

If-feature for mutually exclusive nodes

hi i want to include
say node A when if-feature A is enabled and show node-B when if-feature A is not present
Is there a equivalent of if-not-feature ???

is the below one right ?
container A {
if-feature “A”;
container B {
if-feature “not A”;
Many Thanks

What you have is correct for YANG 1.1, see (you need to use ASCII double-quotes though). In a YANG 1 module, you would have to use two features, e.g. “A” and “not-A”, and make sure to always enable one but not the other.