Steve_Brown_882
Jul 01, 2009Historic F5 Account
pycontrol help
Hi Guys,
I am pretty new to python and pycontrol and need a little help with a script I am working on. I think I am missibng something obvious and this may even be more a case of me not fully understanding pyton yet. Any how I would like to have my script return a list of virtual servers, destination IP and destination port. Here is a snippet of my current code which works, but does not return exactly what I am lookign for.
virtual = b.LocalLB_VirtualServer
for vName in virtual.get_list()['return']:
vDest = virtual.get_destination(virtual_servers = [vName])['return']
print vName, vDest
The output looks like this....
vipname [{'port': 443, 'address': '10.1.2.3'}
And I want it to look like...I assume I need to pull the port: and address out of the return, but I have not been able to figure out how.
vipname 443 10.1.2.3