input {
leaf interface-id {
type uint16;
}
leaf ipv4 {
type inet:ipv4-address;
}
choice direction-choice {
case ingress-case {
leaf ingress {
type empty;
}
}
case egress-case {
leaf egress {
type empty;
}
}
}
}
Now, I want to have a restriction that if an interface is configured then direction should not be listed in possible completions.
Valid: ipv4 and direction, ipv4 only, interface only
Invalid: interface and direction, interface and ipv4 and direction
great! i’m implicitly used to use --fail-on-warnings for confdc, and wrote first comment only from memory…
Fun with the choice/case statements is that they are not reflected into xpath data nodes and this can cause confusion/errors with some paths/api calls etc.