cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
413
Views
0
Helpful
1
Replies

Distinguish service re-deploy from reactive-re-deploy in Python

ygorelik
Cisco Employee
Cisco Employee

In my application, which is based on nano-service, the service can be re-deployed by user or reactive-re-deployed by a kicker, which is watching service status. The cb_pre_modification service method need to know what was the source of the call (user vs kicker, re-deploy vs reactive-re-deploy command) and act accordingly. How can I distinguish them?  

1 Reply 1

huayyang
Cisco Employee
Cisco Employee

no, the transaction exposes information to the service callbacks via transaction context(refer to description of struct confd_trans_ctx in https://developer.cisco.com/docs/nso/guides/#!ncs-man-pages-volume-3/confd_lib_dp) and ncs.maapi.get_params(), which is about what the callback can know about the transaction.