Lock from Netconf client and external DB

The trans_init( ) callback will be invoked when ConfD enters into a transaction as depicted by the ConfD transaction state machine in Chapter 7.5 of the ConfD User Guide. The trans_lock( ) callback gets invoked by ConfD when a transaction is committed or when a transaction is validated through either NETCONF or CLI, and the transaction enters the VALIDATE state.

If you have chosen to implement the optional lock( ) callback which is only interesting if there exists additional locking mechanisms towards the external database - such as an external CLI which can lock the database, or if the external database owns the candidate. The lock( ) callback when implemented will be invoked to get a chance to refuse or accept the lock when a global lock on a datastore is being requested.