Nov 04

I’m a huge fan of open source. Here at VMware there are several open source projects. One such project that I recently ran across is the VMware Virtual Infrastructure Java APIs (that’s a mouthful). Basically this is a set of APIs that makes it easier for Java programmers to write to the standard VMware SDK. The VMware SDK is based on web services and if you’ve ever tried to do anything web services oriented you know it’s a pain (at least I think so). I’ve been working a lot in Cocoa on my Mac building a Mac based Virtual Center client as well as an iPhone Virtual Center client. All I can tell you is I was a fan of web services until I started these projects. Of course Coca and web services together is just plain horrible. Enough of a rant and back to the Java API.

Let’s say you wanted to programmatically list all of the events inside of Virtual Center. With regular old web services it would look something like this:

 

 

Using the new Java API the same thing would look like this:

 

 

Things are a lot cleaner, a lot easier, and a lot shorter with the Java API. The API provides the following benefits:

 

  • Enables OO programming with a well defined managed object model 
  • Reduces the need to use ManagedObjectReference and makes possible compile time type checking
  • Hides the complexity of the PropertyCollector
  • Provides necessary utility classes to simplify VI SDK web interfaces
  • Leverages current VI SDK web services interface while keeping it intact

As a by-product, you can easily support Jython (Python) scripting with the VI Java API. The instructions are described in details here at this presentation.

The VI Java was open sourced under the BSD license in May 2008, and is currently in its version 1.0. Please feel free to download it from the project download page. The 300k+ package includes binary, source and many samples.

For more information, please visit the open source project home.

VN:F [1.9.3_1094]
Rating: 3.0/5 (2 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
VMware Virtual Infrastructure Java API, 3.0 out of 5 based on 2 ratings

Leave a Reply

blog comments powered by Disqus