Hello All,
I have my simple yang module ,having one leaf(uint8 type) . I Want to register a simple callback for that whenever any changes happens in that leaf my callback should be invoke ,
Please provide me the steps to do that.
Thanks in advance
You do not use callbacks for getting config change updates unless you implement an external database.
You typically utilize ConfD’s built in configuration data base (CDB) and use CDB subscriptions to get the config changes.
See ConfD UG chapter “CDB subscriptions” and the ConfD examples under examples.confd/cdb_subscription
Hi @cohult
Thanks for quick response.So where Should we write application code (in which directory) and how to compile the code (containing all API related to CDB)
you can use “oldv” argument of your CDB change iteration procedure… see existing examples in confd that use “cdb_diff_iterate(...)” to obtain leaf value that is being changed…
e.g. in examples.confd/cdb_subscription/twophase/twophase.c you can see old/new value being printed on line 53 (same principle applies to simple subscriber.
In other example examples.confd/cdb_subscription/iter_c/cdbl.c, oldv it is just ignored/not used, but can be utilized in same way, inside iter(...) procedure starting at line 121.
Perhaps there are some members of this forum that are both netopeer2 and ConfD experts that can answer your question (I do not have enough netopeer2 experience).
But if you are choosing between solutions for enabling NETCONF only with your project, I suggest you try both solutions and make the “differ/better” comparison yourself to enable an intelligent decision for what is best for you. Feel free to add your findings here.
Tail-f welcomes other NETCONF enabling projects such as netopeer2 that enhances the NETCONF community support as that is one of the main goals of the Tail-f ConfD Basic project and ConfD product.
Is there any ways to use callback function created using yumapro sdk(SIL development ) in confd ?
OR
confd can generate user callback function using Yang module?
Hi All
Please answer my below question who has worked on both netopeer2 and confd
what is basic difference between confd and netopeer2 ,which is better ?