How do I check the commit lock status using the XML API ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I check the commit lock status using the XML API ?

L1 Bithead

I am looking for help with how I can use the XML API to check a firewall commit status prior to invoking changes.

My script (using wget) needs to determine if a commit lock is already outstanding prior to making changes.

Thanks!

 

3 ACCEPTED SOLUTIONS

Accepted Solutions

L4 Transporter

type=op&cmd=<show><commit-locks><%2Fcommit-locks><%2Fshow>

 

View solution in original post

if you wan to check commit in progress:
type=op&cmd=<show><jobs><all></all></jobs></show>

View solution in original post

it's an XML-API reply. 

 

a bash script is not ideal for what you are looking for. You should do python/php/perl script instead so you can parse XML replies propery and fairly easily

View solution in original post

6 REPLIES 6

L4 Transporter

type=op&cmd=<show><commit-locks><%2Fcommit-locks><%2Fshow>

 

View solution in original post

if you wan to check commit in progress:
type=op&cmd=<show><jobs><all></all></jobs></show>

View solution in original post

Wow -thanks for the help cpainchaud!

 

I got a huge reply - when I grepped "commit" the only element I see is <auto-acquire-commit-lock>no ...

I think that is the radio button on the web broswer window, but I am not sure that this is the xml element

I should be looking at.

 

Do you know what the name of the element is I should be looking for ?

 

Thanks!!!

it's an XML-API reply. 

 

a bash script is not ideal for what you are looking for. You should do python/php/perl script instead so you can parse XML replies propery and fairly easily

View solution in original post

I am going to use a Perl script - I am just using wget/bash to find out how the command works

 

Do you know the name of the XML element which designates that commit lock status ?

look at the HTTP answer, it's not just one element, it can be several ones.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!