Closed temabeloglinski closed 7 months ago
Can you please complete your example with YANG rules for "flowers/name" and "fruits/name"? There are so many combinations of choice/leafref etc that my guess is that it is not covered by regressions.
Yes of course. I simplified the configuration:
list fruits { key "name"; leaf name { type string; } }
list flowers { key "name"; leaf name { type string; } }
choice myChoice {
description "Fruit or Flowers";
case fruit {
leaf fruit-name {
description "Fruit name";
type leafref {
path "../fruits/name";
}
}
}
case flower {
leaf flower-name {
description "Flower name";
type leafref {
path "../flowers/name";
}
}
}
}
root@cli/> show configuration cli set flowers 123 set flowers 2345
root@cli/> set flower-name ? 123 Flower name 2345 Flower name
Thanks, will have a look
Hi Olof! Did you manage to reproduce this error?
Hi, I have such a problem, is there a solution to it?
Sorry, been busy, will try to look at it tomorrow
Confirmed this issue
Should be fixed now. I dont think the combination of choice and leafref has ever worked. Added regression test. @temabeloglinski @khromenokroman please verify and if it works, close the issue
Hi Olof! Thank's a lot! Everything is working.
Hi Olof I have a question about choice function and leafref. For example I have this yang structure:
But if I call commit, clixon returns an error - Nov 30 22:01:44: Commit failed. Edit and try again or discard changes: application operation-failed No referred YANG node found for leafref path ../../flowers/name. In this case, the names of objects are called up when I click on the question mark, i.e. the paths are correct. What could be the problem?