09-22-2020 01:50 AM
Hi all,
can any one tell me / point me in the direction of how to get the commit_ID/Rollback ID number when applying and trans.apply() in python
Thanks
Regards
Yale
09-22-2020 02:58 AM
The C language MAAPI contains maapi_get_rollback_id
, see also man confd_lib_maapi
. Most, hopefully all C functions are available to the low-level Python binding, but obviously not all of them make it to the high-level binding that you are using, so you need to resort to the low-level API like this:
>>> trans.apply()
>>> import _ncs
>>> rollback_id = _ncs.maapi.get_rollback_id(trans.maapi.msock, trans.th)
>>> rollback_id
10001
>>>
09-23-2020 09:33 AM
Answered in another thread as the API is pretty new (5.4)
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: