I have below yang models
container PORT {
description "PORT part of config_db.json";
list PORT_LIST {
key "name";
leaf name {
type string {
length 1..128;
}
}
leaf-list lanes {
type string {
length 1..128;
}
}
}
}
And below config
PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"lanes": ["65", "66"]
},
{
"name": "Ethernet9",
"lanes": ["65", "67"]
}
]
}
How to add a constraint, 'must' or 'unique' such that elements of leaf-list 'lanes' are unique across all nodes in PORT_LIST. In above example value '65' in 'lanes' field should be allowed only in one node.