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
15 Replies
- Jos_Backus_4637
Nimbostratus
I just updated the code to be smaller and more dynamic, changing the API a little in the process.
Jos - JRahm
Admin
I know there are several individuals who've been waiting for movement on ruby, thanks!
I hope to get time to play with this later this week, I'll reach out for sure. - Jos_Backus_4637
Nimbostratus
You're welcome.
I just updated the code at the URL above again. Notable changes: I added an extra module layer and some embryonic helper classes for use in the examples. Let me know what you think.
Jos - 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.
Jos - 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 - 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.
Jos - 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.
Not sure how to post scripts on the codeshare; also, they are bound to change some in the near future as I'm still tinkering with the API.
Jos
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
