Forum Discussion
Andy_McGrath
Jul 19, 2018Cumulonimbus
Look at the F5-SDK for python. It is a simple module that uses iControl REST to get and set F5 configuration.
Good article to get you started is F5 Friday Python SDK for BIG-IP.
Not tested but something like the following as a very basic script (you would need to update the 'listOfBipIPs' to pull from your data base:
from f5.bigip import BigIP
listOfBigIPs = ["bigip1.example.com", "bigip2.example.com"]
for bigIP in listOfBigIPs:
bigip = BigIP("bigip.example.com", "admin", "somepassword")
virtuals = bigip.tm.ltm.virtual.get_collection()
for virtual in virtuals:
print ("VS: {}, Dest: {}".format(virtual.name, virtual.destination))
print (" Pool: {}".format(virtual.pool))