Need to deviate this standard yang. In the standard yang there is a choice.
choice ace-ip-version {
description
"IP version used in this Acess List Entry.";
case ace-ipv4 {
uses packet-fields:acl-ipv4-header-fields;
}
}
case ace-ipv6 {
uses packet-fields:acl-ipv6-header-fields;
}
}
}
Need to apply a must rule for each case statement ace-ipv4 and ace-ipv6. I need to calculate the number of instances of these cases
I get the the error “error: unknown error code: YANG_BAD_DEVIATION [must,‘case’]” when I deviate add like below,
deviation /iacl:access-lists/iacl:acl/iacl:access-list-entries/iacl:ace/iacl:matches/iacl:ace-type/iacl:ace-ip/iacl:ace-ip-version/iacl:ace-ipv4 {
deviate add {
must “count(*) < 100” {
tailf:dependency “.”;
error-message “Ipv4 rules should be only 1000”;
}
}
}