You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sysrepo supports modifying data that is about to be committed by setting the SR_SUBSCR_UPDATE flag when registering the callback using sr_module_change_subscribe. That way, when someone commits something to the observed nodes, the registered callback will run with with the SR_EV_UPDATE event before all other callbacks are triggered. In that you are allowed to modify the data behind the incoming session using regular sysrepo functions.
This is not possible with the Python wrapper because the callback session is not provided.
Here somebody else also asked for access to the callback session but his use case was different and it was solved only for this specific use case, unfortunately.
Note that this is not the only use case for accessing the callback session. Imagine there's an atomic commit to different Yang modules. In general they may depend on each other and in order to validate or apply the changes you may require the entire running datastore, the way it would look like after the commit. This data superset can only be acquired by querying the data from the callback's session. In fact we have such a use case but implemented that using the C++ wrapper instead.
Is there a chance to add support for the providing the callback-specific session?
The text was updated successfully, but these errors were encountered:
Sysrepo supports modifying data that is about to be committed by setting the SR_SUBSCR_UPDATE flag when registering the callback using sr_module_change_subscribe. That way, when someone commits something to the observed nodes, the registered callback will run with with the SR_EV_UPDATE event before all other callbacks are triggered. In that you are allowed to modify the data behind the incoming session using regular sysrepo functions.
This is not possible with the Python wrapper because the callback session is not provided.
Here somebody else also asked for access to the callback session but his use case was different and it was solved only for this specific use case, unfortunately.
Note that this is not the only use case for accessing the callback session. Imagine there's an atomic commit to different Yang modules. In general they may depend on each other and in order to validate or apply the changes you may require the entire running datastore, the way it would look like after the commit. This data superset can only be acquired by querying the data from the callback's session. In fact we have such a use case but implemented that using the C++ wrapper instead.
Is there a chance to add support for the providing the callback-specific session?
The text was updated successfully, but these errors were encountered: