VMware

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

3 Posts tagged with the virtualization tag
0

I presented the Java API for VI SDK at VMware Technology Exchange in San Jose yesterday and got very positive feedbacks.

Here are two UML diagrams I used in my presentation. I think they are very helpful to understand the API and the design thoughts behind it.

1. The overall object model

overall.JPG

It can be inferred from our VI SDK API reference. Please note that we don't have a managed object type called ManagedObject in our reference. This is a type defined to capture all the common properties and behaviors of all managed objects. Given the limited size, I only show the names of the types, not properties and methods.

To better group these managed object types, I used colors. On the right most side of the diagram are the ServiceInstance class and various "manager" classes like AuthorizationManager. From the ServiceInstance, you can get any object of these types with single call, for example getAuthorizationManager().

In the middle of left side, you can find ManagedEntity class and its sub-classes like HostSystem, VirtualMachine. These classes represent all the items you could find in the inventory tree from VI client. They are the most important managed objects in the whole model, and all tagged with orange color except the HostSystem.

The HostSystem is very much like ServiceInstance in that it has many "System" or "Manager" types closely attached to it, for example, HostDatastoreSystem. You can get hold of these objects with a single method call from a HostSystem object. For this reason, both HostSystem and all the attached classes are tagged the same color.

2. A detailed partial UML diagram

detail.JPG

This UML diagram is extracted from the overall model but adds much more details with properties and methods. If you can understand this diagram, you can then easily understand all the other managed object types.

The ManagedObject class holds three properties:

1. mor of type ManagedObjectReference -- pointing to the ManagedObjectReference object that is used to represent a managed object in VI SDK.

2. serverConnection of type ServerConnection -- pointing to the ServerConnection object I will cover later.

3. objectContent of type ObjectContent -- used for local caching for better performance.

Besides accessors, the class has getCurrentProperty() method defined to encapsulate the PropertyCollector. This method gets called in subclasses to get a property. For example, the getName() in ManagedEntity called it like (String) getCurrentProperty("name"); In most of cases, you don't need to use it at all, I already provide explicit getter methods in concrete subclasses. I may change its visibility to protected later. The other two methods, "getCachedProperty() and refreshPropertyCache()" are designed for caching.

The ServerConnection is used to represent a connection to the server under a specific login user. It holds information like url to the server, the userSession with username etc., and vimService which is the JUMBO interfaces with 300+ methods. For convenience, ServerConnection also has a reference to a ServiceInstance object.

Now let us take a look at the ServiceInstance type. It's a special managed object and the first managed object you will have in a typical application logic flow. You can create a new ServiceInstance object by providing url/username/password, or url/sessionID combination. The later is not used as much as the first constructor, but very helpful when you develop a VI client plugin in Java. I will talk more about it later blogs.

According to the API reference, the ServiceInstance has a ServiceContent object, which holds all the ManagedObjectReferences to various "manager" attached to it, and an AboutInfo object. You can get any of them in a single call. ServiceContent object is, therefore, no long needed, and I don't even provide a getter to it.

The right side of the diagram are the ExtensibleManagedObject and its subclass ManagedEnity. E.M.O doesn't have methods defined at all, but three properties. Therefore it only has three corresponding getters.

ManagedEntity is one of the most important class given that VirtualMachine, HostSystem etc. are all inherited from it. Besides accessors and several methods, I provides some methods to retrieve items in the inventory tree. For example, you can easily find all the Virtual in one single call. Property is used within these methods, but you don't see it.

The above two ML diagrams should have given you a big picture about the object model and how key types are related to each other. If you really need to know more details. Please click into my May 8 posting and read the source code there. For sure, it will give you much more details than I can cover in these two ML diagrams.

0 Comments Permalink
1

The open source client side Java API for VI can now be found at

http://sourceforge.net/projects/vijava

Thanks!

1 Comments Permalink
0

The VMware Technology Exchange Event..

I have been recently involved with helping put together the VMware Technology Exchange event and wanted to share some insight on what the event is about and why an ISV / IHV might be interested in attending..

Event goals: The goal of the VMware Technology Exchange event is to get our partners and product teams together to share product directions, understand integration points, and learn how VMware can help you go to market with your solution.

About the sessions: We are planning on 70% percent deep technical content and 30% business topics making this ideal for Product Managers, Software Developers, Development Managers and Business types. If I were to recommend sessions for folks out there interested in VI integration I would suggest Power Shell for Partners, VI Performance Monitoring and the VC Client Plug-ins. I tend to lean in favor of the VI oriented sessions but there are plenty of other sessions discussing Security, Storage and Applications.

Who can attend ? We are limiting this to our Technical Alliance Partners (TAP) members so if you are not a TAP member you might be interested in joining the program... For folks on a budget the Access level is no charge and you can apply at: http://www.vmware.com/partners/alliances/programs/

Please note there is a Event Fee of $725 and it also includes a 1 year license for VMware Infrastructure and VMware Workstation.

So if we see you there be sure to say hello, and if we meet during the reception I would be more than happy to purchase you a refreshment of your choice.

Regards,
Pablo Roesch
SDK Product Marketing Manager

Event Details:

When: May 13, 14, 2008 San Jose Convention Center, CA

Registration Website, more information: http://vmwaretechnologyexchange.com

0 Comments Permalink

Developer Center Blog

VMware Developer Blog provides content for the VMware Developer Community.

Communities