cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
112
Views
0
Helpful
3
Replies

How to know that its commit dry run and not actual commit inside service class ?

aparp
Cisco Employee
Cisco Employee

Hi,

We are using NSO 4.2.1.1 in our project. We have defined service point inside yang model container and has written the call back methods with call back type = PRE_MODIFICATION and CREATE. These methods are triggered for any commit or commit-dry run to this container.

Inside the call back methods, is there a way to differentiate between the commit and commit-dry run commands. We need to take different actions inside the PRE_MODIFICATION call back method if it is commit-dry run.

Kindly advice and please let me know if you need more information. 

3 REPLIES 3

khgrant
Cisco Employee
Cisco Employee

 

Hi All,

 

Currently its not possible to tell if its a commit dry-run or a commit inside of the transaction

 


Thanks,

 

-Dan

 

khgrant
Cisco Employee
Cisco Employee

 

Thanks Dan for the response. Thanks Khara.

 

 

If we wrap the action that needs to be taken during commit dry run as a part of Generic ned code, will it be possible. Will a class part of Generic Ned gets to know if it is a commit or commit dry-run.

 

 

Thanks much,

 

-Aparna

 

khgrant
Cisco Employee
Cisco Employee

 

No, you're going to have to rethink what you're designing now. And the problem is actually worse, a transaction may get restarted during certain lock scenarios. I.e your create() code might run twice for the same transaction !!

 

 

So, no non-transactional side effects or dirty tricks are allowed in the create() code.

 

 

/klacke

 

Getting Started

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 community: