Why this yang schema from one device can not be supported by ODL's yang tools
The schema is below. Look at the "element-name" leaf. It is declared as a key in a grouping and its definition will be provided in the following augment.
I tested this yang schema. This schema works well on a device box, but can not be accepted by ODL's yangtools generator. When I removed the declaring line:"key element-name;", the yangtools could build it and generate java codes successfully.
I'd like to know why this yang schema can not be accepted by yangtools. Please give me a point or is there any better way to change this schema. Any help or suggestions are really appreciated. Thank you!!!
grouping test-profile {
list bin-data {
/* Each will augment this list to define element-name*/
key element-name;
leaf threshold {
type exa:UINT32;
default 0;
}
leaf t-name {
type TCA_NAME_STRING;
default "";
}
}
augment '/config/profile/test-service' {
list test-service-profile {
key name;
leaf name {
type PROFILE_NAME;
}
uses test-profile {
augment bin-data {
leaf element-name {
description "Name of the counter";
type counters-type;
}
}
}
}
Look