It’s been two months since I announced beta of VI Java API 5.1 supporting vSphere 5.1 on September 23. I got many emails asking for the GA date from ISVs and IHVs as the API is now a corner stone in their products. With the long (could be longer, BTW) Thanksgiving holidays, I got some time to review the fixes and release the GA version. I intended to announce it yesterday but somehow extra spam comments pushed the database behind over 100MB limit thus I could not post any new article.
There were two regressions in the beta of 5.1. One regression was caused by the missing of the hashCode() and equals() methods in the ManagedObjectReference class. It’s not a problem unless you compare two managed objects, or use the caching framework which relies on the hashCode() and equals() methods to determine whether a managed object is already in the cache (essentially hash tables in implementation).
Bothered by SLOW Web UI to manage vSphere? Want to manage ALL your VMware vCenters, AWS, Azure, Openstack, container behind a SINGLE pane of glass? Want to search, analyze, report, visualize VMs, hosts, networks, datastores, events as easily as Google the Web? Find out more about vSearch 3.0: the search engine for all your private and public clouds.
The other regression manifested itself in the queryVmfsDatastoreCreateOptions() method defined in HostDatastoreSystem. Somehow I forgot to change the array size from 3 to 2, therefore the 3rd element in the array caused NullPointerException during execution. From this, you know manual process can be error prone no matter how careful I was.
Another bug fix is the missing getSummary() method on VirtualApp which is a sub type of ResourcePool type. There was a method defined on the parent type ResourcePool already but the return type is ResourcePoolSummary. While calling the inherited getSummary() with a VirtualApp object, you want to case the ResourcePoolSummary type down to its sub type VirtualAppSummary if you want to access VirtualApp specific properties. It’s doable but not quite convenient, therefore I added an overridden method getSummary() in the VirtualApp class. Given how vSphere API is designed there may be several other similar cases. Please feel free to file a bug.
In the beta announcement post, I mentioned the new base64Binary type sneaking into the vSphere API 5.1. It can definitely be supported, but need quite some effort to make it work. Luckily it’s pretty much isolated to very small part of the API. This buys me some time to do it right in the future.
Enough being said. It’s time to give it a try. To download the jar files, please click here.