1
我无法弄清楚如何创建一个叶的“必须”,使其在列表中唯一。杨,叶必须在列表中是唯一的
这是带有叶子的列表,该叶子可能与此列表中的任何其他叶子的值不同。的代码
实施例:
list myList {
key name;
leaf name {
type uint32;
}
container myContainer {
leaf myLeaf {
type uint32;
}
must "count(/myList/myContainer/myLeaf = .) > 1" { //Dont know how to create this must function.
error-message "myLeaf needs to be unique in the myList list";
}
}
}
所以我想myLeaf到,如果有已经在myList中以电流值存在的元件触发差错消息。