kindly asking for help as I couldn’t figure it out for myself based on ConfD User’s Guide. I’m using 188.8.131.52.
I have a hook (actually multiple hooks) in place in order to supplement user’s commit with additional configuration.
Some of the hooks may fail. In that case I’m setting an informative error message with confd_trans_seterr_extended and I get corresponding “Aborted:” message in CLI.
Unfortutely my hooks are stateful: I need to maintain state from one callback to another… I reset that state in init callback.
But in case of CLI if user does ‘commit’ again there’s no new init callback and the hooks are replayed…
So I desperately need to know if:
1/ is there a working method to distinguish between subsequent ‘commit’ request from user in order to reset state of my hooks? Is it another callback I can use? But In that case will all of my hook callbacks be replayed as on first commit (+/- any changes user made in between)?
or 2/ can I abort the transaction completely from hook code in order to get that new init callback?
and 3/ Is CLI different than NETCONF in this respect?
Thank you in advance for help!