Forum Discussion
BlurredVision_1
Nimbostratus
Jan 05, 2009PyControl driving me round the bend!!
All,
Disclaimer first - I am an iControl n00b. Total hours messing with iControl is ~8.
Status: ran through the pyControl setup doc but did the Mac OSX equivalents to get it up and running.
Tried to use the sample apps, which have run once or twice, but refuse now to run, with no change that I am aware of having taken place between the run that worked, and the run that did not. obviously I have modified the section of the system_quick_audit.py script to make sure my bigip's IP/username/password combo is set.
Current status:
0 ~/python/pycontrol/samples $ python system_quick_audit.py
Loading WSDL: System.Syst`emInfo.wsdl
Traceback (most recent call last):
File "system_quick_audit.py", line 70, in
wsdl_files = ['System.Syst`emInfo'])
File "/Library/Python/2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg/pycontrol/pyControl.py", line 195, in __init__
self._buildServices()
File "/Library/Python/2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg/pycontrol/pyControl.py", line 223, in _buildServices
setattr(self,attribute_name,Service(name=w, bigip=self, tracefile=self.tracefile))
File "/Library/Python/2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg/pycontrol/pyControl.py", line 87, in __init__
cachedir = self.bigip_cache_dir_stubs,
File "/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/ServiceProxy.py", line 60, in __init__
File "/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/wstools/WSDLTools.py", line 39, in loadFromURL
File "/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/wstools/Utility.py", line 642, in loadFromURL
File "/Library/Python/2.5/site-packages/ZSI-2.1_a1-py2.5.egg/ZSI/wstools/Utility.py", line 153, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 82, in urlopen
return opener.open(url)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 190, in open
return getattr(self, name)(url)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 459, in open_file
return self.open_local_file(url)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 473, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: '/Library/Python/2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg/pycontrol/BIGIP_WSDL_CACHE_DIR/wsdl/System.Syst`emInfo.wsdl'
4 Replies
Sort By
- Stan_Chan_87542
Nimbostratus
Based the exception being thrown, looks like the path/file changed or something related that caused the script to not be able to find the wsdl. - BlurredVision_1
Nimbostratus
hmm.. is there a way to instruct pyControl to ignore it's cache? I assume the WSDL is exposed on the BigIP? (showing my ignorance here I am sure...) - L4L7_53191
Nimbostratus
Odd. It may be worth poking around a bit more to see if there's not a path issue. Could you print out your sys.path and compare it to your WSDL_CACHE dir?In: import sys In: sys.path Out: ['', '/usr/bin', '/usr/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg', '/usr/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg', '/usr/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-i686.egg', '/usr/lib/python2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg', '/usr/lib/python2.5/site-packages/ZSI-2.1_a1-py2.5.egg', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/ipython-0.9.1-py2.5.egg/IPython/Extensions'] In: import pycontrol.pyControl as pc In: pc.WSDL_CACHE Out: '/usr/lib/python2.5/site-packages/pyControl-1.3.0_beta-py2.5.egg/pycontrol/BIGIP_WSDL_CACHE_DIR/wsdl'
- L4L7_53191
Nimbostratus
Upon a closer look, it appears that you may have a typo in the demo script. From a python command prompt, try and simply load the WSDL:In: b = pc.BIGIP(hostname = '192.168.1.245', username='admin', password='admin', wsdl_files = ['System.SystemInfo']) Loading WSDL: System.SystemInfo.wsdl In: b.System_SystemInfo.get_version() Out: {'return': 'BIG-IP_v9.4.5'}
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