Pool member status on F5 DNS objects via iControl REST
I can't seem to get that JSON data from your instructions above.
I get the expected results from running the script from bash on the BIG-IP:
[me@BIGIPDNS1:Active:Standalone] ~ tmsh run cli script BIGIPDNSpoolmemberstatus.tcl a MY_POOL VIRTUAL_SERVER_1_443:LTMSFRML1ab,available,enabled VIRTUAL_SERVER_2_443:LTMSFRML1ab,available,enabled
However, calling it from a Python file that I created didn't give me the JSON results like what you were able to demonstrate above. Below is my code in my Python file:
…
mgmt = ManagementRoot( mydevice, myuser, mypassword) ps = mgmt.tm.util.bash.exec_cmd('run', utilCmdArgs='-c "tmsh run cli script BIGIPDNSpoolmemberstatus.tcl a MY_POOL"')
ps.commandResult
No errors are shown when executing the above but I am unable to print the JSON data. For example, it would result in an error if I do a "print ps.commandResult". The errors I always get say that "The requested shell script (/Common/BIGIPDNSpoolmemberstatus.tcl) was not found". Again, I am able to run this TMSH script from the BIG-IP in success.
Not sure what I am missing or doing wrong.