ManagementModelEntities is something I strugled to get information about, I never found any good documentation of “options” for this. After some debugging of the IaaS WebService, I was atleast able to get most (if not all?) entity sets.
Note that some of these require special access, and some fill fail if there is no data.
This is a list of entity types I found:
To fetch data from these models, I've created a small script that dump data into json format.
As always, notice that only one vRA instance is supported (Server.findAllForType(“vCAC:vCACHost”)[0];)
var entitySetName = "VirtualMachines"; // Put any value from the list above here, to list... var host = Server.findAllForType("vCAC:vCACHost")[0]; var model = "ManagementModelEntities.svc"; function JsonIt(Props) { var Obj = new Object(); for each (P in Props.keys) { Obj[P] = Props.get(P); } return Obj; } function JsonItAdd(Obj,Props,Name) { if (Obj[Name] == null) { // First Entry Obj[Name] = new Array(); } var Size = Obj[Name].length; Obj[Name][Size] = new Object() for each (P in Props.keys) { Obj[Name][Size][P] = Props.get(P); } return Obj; } var property = new Properties(); var computeResources = vCACEntityManager.readModelEntitiesByCustomFilter(host.id, model, entitySetName, property, null); for each (var Element in computeResources) { var Props = Element.getProperties(); var Links = Element.getLinks(host); var E = JsonIt(Props) for each (L in Links.keys) { var LinkItems = Links.get(L); if (LinkItems) { for each (LinkItem in LinkItems) { var PropLink = LinkItem.getProperties(); E = JsonItAdd(E,PropLink,L) } } } System.log(JSON.stringify(E)); }