- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-06-2015 10:39 AM
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!
10-06-2015 11:35 AM
if you wan to check commit in progress:
type=op&cmd=<show><jobs><all></all></jobs></show>
10-06-2015 01:26 PM
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
10-06-2015 11:29 AM
type=op&cmd=<show><commit-locks><%2Fcommit-locks><%2Fshow>
10-06-2015 11:35 AM
if you wan to check commit in progress:
type=op&cmd=<show><jobs><all></all></jobs></show>
10-06-2015 01:16 PM
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!!!
10-06-2015 01:26 PM
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
10-06-2015 05:03 PM
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 ?
10-07-2015 01:38 AM
look at the HTTP answer, it's not just one element, it can be several ones.
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!