The following is my test yang model for “must” statement.
grouping test_group {
container test {
leaf test_paramater {
type empty;
}
}
}
list test {
key name;
leaf name {
tailf:info "Unique service id";
tailf:cli-allow-range;
type string;
}
uses ncs:service-data;
ncs:servicepoint test-servicepoint;
leaf flag {
type boolean;
}
uses test_group {
must "../flag = 'true'"; //it works fine with "when" statement
}
}
}
I want to use the “must” condition for the grouping using. But it throws the compile error with “yang/test.yang:48: error: unexpected keyword ‘must’”.
It works fine when I change the statement to “when”, but I want to know is there any particular limitation can not use “must” for grouping?