Forum Discussion
Justin_Adrian_3
Nimbostratus
Jul 20, 2011pyControl 2, differnet port
I am creating an application where I need to create a distributed deployment.
Right now I am using the socks.py library and forcing everything through a socks proxy, which works very well. But I have need during this application to contact multiple F5's on different ports.
import socks
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5,"127.0.0.1",6666)
socket.socket = socks.socksocket
This works great, in that all my traffic goes to the socks proxy tunnel that I setup with ssh, but it redirects all traffic toward that tunnel.
I am wanting to setup the following:
ssh -N -f -L 4444:10.10.10.10:443
ssh -N -f L 5555:192.168.10.10:443
And then have my instance of pycontrol based on which F5 i need use 4444 or 5555 respectively. This would use a straight tunnel, not the socks functionality.
I saw some reference to options for suds where you could change the URI that is called with pycontrol, but didnt quite know how to wrap that together to use a port.
uri = "https://127.0.0.1:4444/iControl/iControlPortal.cgi?WSDL=LocalLB.VirtualServer"
This appears messy, and not sure how it would work with, or even compatiable with b = pc.BIGIP().
Thanks
- L4L7_53191
Nimbostratus
This will work - just change the suds client object's "location" attribute to reflect whatever port you want. Inside your instantiated client object you'll see a 'suds' attribute with all the relevant options, as well as a set_options() method. Have a look here for an example of using this:
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