Forum Discussion
crosson_16669
Nimbostratus
May 20, 2013Sticky icontrol authentication
Consider the following script
--------------------------------
ltm_auth.py
import pycontrol.pycontrol as pc
import sys
host = sys.argv[1]
user = sys...
JH_124575
Nimbostratus
May 30, 2013I haven't looked at the pycontrol code, but I assume it is somewhat similar to bigsuds. In the initial BIGIP object creation you are not actually creating the ZSI soap client until you call a service. If you add a arbitrary service call inside of your try/except you will get the 401 error you are looking for.
import bigsuds b = bigsuds.BIGIP(hostname = '7.200.68.5', username='admin', password='this is wrong') """ This will return a BIGIP Object """ print b """This will error due to an invalid password """ try: print b.LocalLB.Pool.get_list() except bigsuds.ConnectionError: raise
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