It's not the Network! Ok, maybe it's the network...

Jason Rahm

Subscribe to Jason Rahm: eMailAlertsEmail Alerts
Get Jason Rahm: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Ubuntu Linux Journal, Microsoft Developer, CIO/CTO Update, VITO Report

Blog Feed Post

pyControl Just as Happy on Linux

There have been several questions over the past month in the iControl forum as to whether or not pyControl works on linux.  In the pyControl labs information, there are instructions for install on Microsoft Windows based systems, but not for linux, so maybe this is the source of confusion.  This is not so much that pyControl isn't linux compatible as it is that the installation instructions on the many flavors of linux vary.  In reality, the only step that should be different between the distributions is the first step: installing python.  Now, on my flavor of choice, Ubuntu, python 2.6 is the default version, which doesn't work so well with the ZSI soap library utilized by pyControl.  So I installed python 2.5 alongside 2.6.  This works fine as long as you keep in mind that running python from the command line will actually run the python2.6 binary.  So when you install the python packages necessary for pyControl to work, just remember to either update the symlink (/usr/bin/python on my Ubuntu 9.10 system) or call the python2.5 binary.  Here's the steps I took to get pyControl prepared on my system.

  1. Install python2.5 - sudo apt-get install python2.5
  2. Download the necessary packages (I threw them in /var/tmp/)
    1. Easy Setup - http://peak.telecommunity.com/dist/ez_setup.py
    2. ZSI - http://sourceforge.net/projects/pywebsvcs/files/ZSI/ZSI-2.1_a1/ZSI-2.1_a1-py2.5.egg/download
    3. pyControl - http://devcentral.f5.com/LinkClick.aspx?link=http%3a%2f%2fdevcentral.f5.com%2flabs%2fpyControl%2fpyControl-1.3.0_beta-py2.5.egg&tabid=73&mid=433
  3. Install the packages
    1. sudo python2.5 /var/tmp/ez_setup.py
    2. sudo easy_install-2.5 /var/tmp/ZSI-2.1_a1-py2.5.egg
    3. sudo easy_install-2.5 /var/tmp/pyControl-1.3.0_beta-py2.5.egg

 

Now that the environment is prepared, we can test it out to make sure all is well in the pyControl world.

vadmin@vadmin:~$ sudo python2.5

Python 2.5.4 (r254:67916, Apr 4 2009, 17:55:16)

[GCC 4.3.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import pycontrol.pyControl as pc

>>> b = pc.BIGIP(

... hostname = '10.10.10.10',

... username = 'admin',

... password = 'admin',

... wsdl_files = ['GlobalLB.WideIP']

... )

Loading WSDL: GlobalLB.WideIP.wsdl

>>> w = b.GlobalLB_WideIP

>>> w.get_list()['return']

['test.wip.com']

>>>

 

The install document on the pyControl page has been updated to reflect the Ubuntu linux distribution.  Happy coding!

 

Read the original blog entry...

More Stories By Jason Rahm

Experienced predominantly in the networking realm over the last dozen or so years, Jason is expanding his horizons towards systems management and even trying his hand at python.

Jason assists in the maintenance duties for http://devcentral.f5.com, contributes frequently in the forums, and writes weekly on some cool geekery in the F5 product lines. When not working, Jason enjoys spending time with his beautiful wife Michelle and his four children. He is active and volunteers network administration duties at his church and if there are any remaining minutes in the week, he enjoys Wii & XBOX, tennis, racquetball, softball, etc. He does not enjoy running, but does (scratch that, thinks about doing) it anyway to recover his youthful appearance.