When I start to use a new API/SDK, I always look for the object model diagram before digging into the API Reference. With that, I can have a good overview of the API, from the concepts to the structure. This can save a lot of time.
Unfortunately, we don’t find such a object model diagram in any official document. The following is the UML diagram from my book VMware VI and vSphere SDK.
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.
The UML diagram can be inferred from VI SDK API Reference. Please note that there is NOT a managed object type called ManagedObject in the API Reference. This is a type I add to make the object model complete. Given the limited size, I only show the names of the types, not properties and methods.
To better group these managed object types, I use different 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 in VI Java API, for example getAuthorizationManager().
In the middle of left side, you can find ManagedEntity class and its sub-classes like HostSystem, VirtualMachine. These types represent all the items you could find in the inventory tree from VI Clients. 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 in vSphere(VI) Java API. For this reason, both HostSystem and all the attached classes are tagged the same color.
The diagram shows the object model of VI SDK 2.5. vSphere 4 adds 20+ managed object types. It also changes a few inheritance relationships. Network, for example, becomes a subtype of ManagedEntity in vSphere. Other than these changes, the overall structure and the way how it works are the same.