I have followed the transaction hook from the below path of example confd codes,
. /examples.confd/intro/python/11-hooks
While the execution I was able to add values to an empty leaf.
The commands as follows.
Here I have given only Ip and Netmask where the gateway have been configured automatically by the “hooks.py” script using transaction hook
Finally, I was getting Confd_Ok from CDB.
I had modified the script accordingly
Before modification :
After modification:
Here I have changed in path into ip in place of gw(gateway).
During the time of execution, there is no response for few moments later an error encountered as displayed below.
On the whole I want to know how to update the value of a same leaf.
your modified code in there tries to modify “ip” leaf
ConfD tries to invoke to modify the “ip”, which invokes hook code
Python daemon with set-hook callback is blocked by still processing 1)…
which leads to deadlock, and subsequently timeout…
Are you sure you want to modify “ip” when processing “ip”? This feels like wrong mapping of data. Maybe if you specify why you need different value (use-case), we may identify proper approach -> it feels strange to do something else on direct CDB data when what users tells CLI to do…