Announcing Code Generator For vSphere Java API
As I tweeted last week, there would be a big announcement when the open source VI Java API gets 20,000 downloads. It hit target yesterday. To celebrate it, I decide to release the code generator for the API, which William (@lamw) rated as “awesome.”
If you have used Onyx for generating PowerCLI code before, you can think it as Java version of Onyx. Even better, it generates complete Java code which is ready to run once you supply the URL, username, and password. It’s so easy that from now on, all the system administrators have no excuse for not trying open source vSphere Java API.
Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.
At its heart, the code generator is a reversed proxy which sits between a vSphere Client and vCenter or ESX(i) server, and intercepts the SOAP XML messages. With the XML messages, I designed the algorithm to automatically generate the Java code based on the open source Java API code.
Unlike Onyx, the Java code generator provides richer GUI which allows you to:
- Record both the requests and responses.
- Sort the recorded messages in any order.
- Generate complete code of any selected requests.
- Save recorded messages to a local file, and read it back later.
- Support raw HTTP data, XML, Java simultaneously in different tabs.
Although the generator supports only Java today, I did designed it to be extensible architecture for other languages like Jython, JRuby, Perl, etc. When I have time, I will continue to work on these in the future.
Too much talk? Let’s take a peek at a few screenshots in this page which includes download link and getting started tutorial. Shorter than my 5 minute VI Java API tutorial, it should be less than one minute this time.
Hope you enjoy the tool and let me how you like it.