ConfD User Community

Query about XPATH presence in subscription callback

Hi,

I am trying to find a way to determine if a specific XPATH exists in the Candidate running config when the subscription callback for a different XPATH is called.

The points I am stuck at:
i) Is there a way to get the current transaction handle in the subscription point callback?
ii) Can maapi_start_trans be used or maapi_start_trans_in_trans be used to check if the XPATH of interest exists in the subscription point callback?

Hi,

If your subscriber is an ordinary commit phase subscriber, the transaction with the configuration change has passed “the point of no return” so that it has been committed to CDB and is visible to the northbound APIs, including MAAPI. You can then just start a normal MAAPI read transaction and call for example maapi_xpath_eval_expr() from your subscriber.

1 Like

Thanks. yes eventually figure it out as you indicated above.