Automate import of SSL Certificate, Key & CRL from BIG-IP to BIG-IQ
I have a procedure that might get the script working on hardware, but it's only partially tested so far. This would work for the new version or the previous version using argparse (which is probably a little better because argparse is more advanced and easier to use, making the script code in that version a bit better).
The steps are 1) use the pip command to install the missing packages in a temporary location, then 2) run the script using python2.7 and directing it to the temporary package location. Optionally the package directory can be removed at the end. python2.7 is required here because pip is built to use it, so the packages it installs will use Python 2.7 features and will not work in the default Python 2.6. I'm not sure what BIG-IQ version added Python 2.7, but I've tested this on BIG-IQ 6.1.
Step 1: Install packages using pip, targeting a location of your choice:
mkdir py-modules
pip install --target py-modules requests argparse
Step 2: Run using python2.7, and adding py-modules to the python path:
PYTHONPATH=py-modules python2.7 import-bigip-cert-key-crl.py --help
This will show the help message if everything is working. From there I'd expect the script to work, just continue to run it with the PYTHONPATH environment variable and using python2.7.