Forum Discussion
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 u...
Steve_Brown_882
Jul 02, 2009Historic F5 Account
Just wanted to add the solution since I just figured it out.
The code now looks like this...
import pycontrol.pyControl as pyControl
host = 'x.x.x.x'
uname = 'username'
upass = 'password'
b = pyControl.BIGIP(
hostname = host,
username = uname,
password = upass,
wsdl_files = ['LocalLB.VirtualServer']
)
virtual = b.LocalLB_VirtualServer
for vName in virtual.get_list()['return']:
vDest = virtual.get_destination(virtual_servers = [vName])['return']
vPort = vDest[0]['port']
vIP = vDest[0]['address']
vPool = virtual.
print vName,",",vIP,",",vPort
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
