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

Reply
L1 Bithead

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

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!

 

L4 Transporter

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

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

 

L4 Transporter

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

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

L1 Bithead

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

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!!!

L4 Transporter

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

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

L1 Bithead

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

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 ?

L4 Transporter

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

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 Live Community as a whole!

The Live Community thanks you for your participation!