Getting Started with the f5-common-python SDK
If you have dabbled with python and iControl over the years, you might be familiar with some of my other “Getting Stared with …” articles on python libraries. I started my last, on Bigsuds, this way:...
Updated Jun 06, 2023
Version 2.0JRahm
Admin
Joined January 20, 2005
JRahm
Jul 08, 2019Admin
Hi @admafitz, I don't think so directly, the rest interface provides "sanitized" data as json objects, not the raw tmsh output. However, you could use the bash util via rest to get raw input.
x = b.tm.util.bash.exec_cmd('run', utilCmdArgs='-c "tmsh list ltm pool testpool"')
print(x.commandResult)
ltm pool testpool {
description "This pool is for test purposes only"
members {
192.168.103.20:http {
address 192.168.103.20
session monitor-enabled
state down
}
192.168.103.21:http {
address 192.168.103.21
session monitor-enabled
state down
}
192.168.103.22:http {
address 192.168.103.22
session monitor-enabled
state down
}
}