I have a customer who has an automation platform written in Perl. This tool has a web front end that serves as a self-service portal for operations folks to perform some tasks on back end systems in a controlled, automated manner. The customer wanted a way to make iControl REST calls without a tremendous amount of effort, so we came up with the idea of having him call a Python script, along with command line arguments, that would be passed to the BIG-IP and responses handed back. This is the script I gave him to do so.
How to use this snippet:
Run the command with no arguments from the command line to access the help section of the code.