03-31-2021 05:22 AM - edited 03-31-2021 05:28 AM
Hello
We have to do "commit reconcile" on a set of NSO services from python. We are using:
1) We open a write transaction "t"
2) We do touch in one or several service instances:
root.services.xxx.touch()
3) We do commit reconcile:
cp = ncs.maapi.CommitParams()
cp.reconcile_keep_non_service_config()
t.apply_params(True, cp)
However, config reference counts do not change.
If we do the same from the CLI, works perfectly:
admin@ncs(config)# services xxx touch
admin@ncs(config)# commit reconcile keep-non-service-config
Any ideas?
Regards
03-31-2021 07:39 AM
03-31-2021 07:54 AM
Thanks for your answer.
Tried with
t.apply_params(False, cp)
a didn't work again....si really weird.
Regards
03-31-2021 08:38 AM
03-31-2021 08:54 AM
no errors apparently. devel.log and python service log show cb_create() runs...so the touch+commit works, but is not doing the reconcile stuff. Will open a TAC case. In case you have any other suggestion, it will be welcome!
09-15-2023 08:31 AM
Hi, I know this topic is very old and you probably found the issue. Anyway, I wanted to add an answer for those who end up in this post.
From the yang file where the "touch" action is defined, description says: Executing the action touch followed by a commit is the same as executing the action 're-deploy shallow'.
So, if your service is a stacked service, you won't see any reconciliation happening between the lowermost service and the device configuration.
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: