- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
12-30-2020 12:08 PM
I am trying to use a Python AWS Lamdba function to commit/commit-all changes after the lambda function has made the appropriate updates to the Panorama. My problem is that the commit-all API call happens too soon after the commit API call and the commit-all does not have any committed changes to process.
How can I wait for the commit job to complete prior to issuing the commit-all API?
Code I am using....
How do I tell the Python API to wait on the successful COMMIT prior to executing the CommitAll?
Thanks, Bobby
01-05-2021 06:04 AM
Thanks. My Palo Alto SE was able to point me in the right direction to use the PanDevice Operations framework to accomplish this check as well. Here is a working snippet of code for future reference. If you do not put the double-quotes around the job-id number you will get a 400 error, invalid request.
01-04-2021 04:05 PM
All you have to do is check the status of the job ID that you are getting as part of your Python script. I do all of that directly through the XMLAPI and not through pandevice, so I can't tell you if pandevice supports checking the job status or not. If it doesn't, that's a really easy thing to do directly through the API without any issue.
01-05-2021 06:04 AM
Thanks. My Palo Alto SE was able to point me in the right direction to use the PanDevice Operations framework to accomplish this check as well. Here is a working snippet of code for future reference. If you do not put the double-quotes around the job-id number you will get a 400 error, invalid request.
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!