Question on handling Dependent leafs

An alternative would be to use a couple of “when” statements.
(if the model actually would look like this you would obviously move the when statements up to the container confgA/confgB level)

container confgA {
    leaf-list A {
        type inet:ipv6-address;
        tailf:cli-list-syntax;
        when "not(../../confgB/confgB1/B)"
    }
}
container confgB {
   container confgB1 {
        leaf B {
            type empty;
            when "not(../../../confgA/A)";
        }
   }
}

If you want to customize the error message of the when statement:

1 Like