Forum Discussion
what is in pycontrol?
for example, all the code samples initiate a connection to the BigIp with a call similar to this:
b = pc.BIGIP(hostname='192.168.1.245', username='admin', password='admin', fromurl=True, wsdls = ['LocalLB.Pool'])
how would I know that "BIGIP" is a method inside of pycontrol?
thanks!
andy
3 Replies
- L4L7_53191
Nimbostratus
Andy: BIGIP is actually a *class* inside of pycontrol. The methods are actually bound to objects inside that class. If you're interested, you can go into your site-packages directory and look at the actual source of pycontrol.py. There you will see the class BIGIP() stuff where all the magic happens. - yes, that makes sense. I apologize for my butchering of OO vocabulary.
so the question I should have asked is, how can I tell what classes are available in pycontrol? and it sounds like the answer is to browse the source of the pycontrol.py file. np, i can do that.
I was asking mostly because I wasn't sure how I was supposed to know to call the BIGIP class in order to set up the connection parameters needed to communicate with my BIGIP aside from the fact that every example/sample code uses it. is there a 'man pycontrol' or 'pycontrol --help'? or is there a way from a python interactive shell to dump out the class(es) in pycontrol like you can with the other WSDLs once you've loaded them?
- L4L7_53191
Nimbostratus
You can peek at the classes by firing up iPython (I use this and vim as my IDE), and doing this:
Recent Discussions
Related Content
* 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