Forum Discussion
Jos_Backus_4637
Nimbostratus
Jun 01, 2009Small Ruby code example
http://www.catnook.com/programs/f5-icontrol/ contains a small SOAP4R wrapper plus an application which shows how to list the nodes in a pool. The wrapper library expects to be able to access the WSDL data. Feedback welcome. Enjoy!
Jos
- Jos_Backus_4637
Nimbostratus
I just updated the code to be smaller and more dynamic, changing the API a little in the process. - JRahm
Admin
I know there are several individuals who've been waiting for movement on ruby, thanks! - Jos_Backus_4637
Nimbostratus
You're welcome. - JRahm
Admin
Where do you put the library file? I installed the ruby oneclick installer for windows. - Jos_Backus_4637
Nimbostratus
Wherever Kernel.require can find it, so somewhere in $RUBYLIB (or $LOAD_PATH / $: in the Ruby language). If you put all the files in a single directory, edit config.yaml to match your site and make sure you have the soap4r gem installed it should work. Mind you, I have not tested this on Windows. - JRahm
Admin
It's working now. fxri couldn't find the directory, but using komodo edit, I was able to run your scripts. nice work! I'm not at familiar with Ruby, but those that are should benefit from your contribution...thanks! - Jos_Backus_4637
Nimbostratus
Glad you got it to work. I'm still working on improving the code, and will post an update in a while. - Jos_Backus_4637
Nimbostratus
Okay, I put up a new version which fixes excess F5::IControl::Module instance creation and a few other tweaks. I also added another example: toggle-pool-member. This is a Ruby port of a Perl script I found on the F5 website. - JRahm
Admin
nice work! The more of these utility scripts you can pre-can, the more likely others will pick it up and start contributing as well. Feel free (read...please do!) to post your scripts on the codeshare. - Jos_Backus_4637
Nimbostratus
Thanks! I just posted another script, node-monitor-state, on my site.
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