Hi All!
We are using confd_load for a cli routine, the problem we are facing is the behavior with load merge is different from confd_load.
Following is what we are trying to do:
- Add an entry when the validation routine is hit {If already entry present throw error}
- When add is hit we make additional changes into the added entry during validation
When we did load merge 1 -> 2 and everything works fine…
When we did confd_load we see 1 -> 1 -> 2, i.e validation routine is called twice because of which validation fails and config fails. Please let us know why this difference in behaviour ?
What I could see is this validate routine is inside a list. and we do diff_iterate inside the validate routine. Btw I made one change added call-once after which it started working…
_tailf:call-once This optional_
statement can be used only if the parent statement is a list. If ‘call-once’ is ‘true’. the validation callback is only called once even though there exists many list entries in the data store. This is useful if we have a huge amount of instances or if values assigned to each instance have to be validated in comparison with its siblings.
I saw above from the doc and hence used the same, please let me know if my list entries are spread across in the config will it be able to accumulate all and call in one shot ?. Or will it accumulate the consecutive entries and then call ?. Please note this is for confd_load. Since I don’t see much queries on the same. I have made a detailed posting of my observation.
rgds
Balaji