Hi!
I have a use case where i am writing separate validation scripts for all the leafs in my yang file.
When i am trying to test the validation script on one of the leafs, the validation scripts for all other leafs are also getting triggered.
My understanding from confd documentation is that when you specify the dependency to be “.” , the validation for that leaf is done only when a commit to that leaf is done?
Please help me understand this behaviour and if you have a suggestion for my use-case, it will be helpful.
leaf a
{
type uint8
tailf:validate rule-a {
tailf:dependency '.';
}
}
leaf b
{
type uint8
tailf:validate rule-b {
tailf:dependency '.';
}
}
leaf c
{
type uint8
tailf:validate rule-c {
tailf:dependency '.';
}
}
Now, when there is a commit to leaf c, only rule-c should be triggered right?
In my system, i am noticing that rule-a, rule-b and rule-c is being triggered. Is this the expected behaviour?
yes, i am registering validationpoint callbacks to different callback functions.
from the above example:
rule-a is the callback function for leaf a
rule-b is the callback function for leaf b
rule-c is the callback function for leaf c
each function is getting called for its own key_path :
rule-a is getting called for leaf a
rule-b is getting called for leaf b
rule-c is getting called for leaf c
even when there is a commit only to leaf c.
Hello again, I have tried to create small example, but I was not able to reproduce the issue.
I have only one validation callback function, but I print keypath. The printout shows only modified keypath is
validated (you can see time gaps between my commits)