Hi,
I am looking for ways of restricting a leafref type particularly using regular expression for a leafref node/element. looks like patter statement don't work with leafref. The idea is to narrow down list of devices being displayed by putting some kind of restriction on the name key element:
leaf-list leafs {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
pattern "[a-lA-L-_]*(Leaf|LEAF)[0-9]+";
}
}
error message:
yang/dcrouting.yang:36: error: restriction 'pattern' is not valid for the base type
any suggestion?
Thanks,
Kerim