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

NSO - How to get the information in Java that the user performed a "commit dry-run"

FlavioA
Level 1
Level 1

Hello everyone,

 

hope this is the right place to make this question.

I would like my service to execute some specific lines of Java code if the user running the service performs a "commit dry-run", otherwise if the user performs a "commit" I would like him to do other ones, and if he performs a "commit dry-run" followed but a "commit", I want my code to execute other lines of code.
How can these pieces of information be obtained in the Java code?

I am probably wrong (because I'm new with NSO and Java coding) but I was thinking to use the method "confirmedCommitInProgress()" for"Maapi" class:

Socket s = new Socket("localhost", Conf.CONF_PORT);
Maapi maapi = new Maapi(s);
int commitInProgress = maapi.confirmedCommitInProgress();

// other lines here

 

Even if this is right, I still don't know how to discriminate between "commit" and "commit dry-run".

Thank you in advance for any help!

 

0 Replies 0
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: