User Tools

Site Tools


Action unknown: export_xhtml
vrealize:managmentmodelentities:all

Secrets of ManagmentModelEntities

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:

  • Agent
  • AgentCapabilities
  • AgentCapabilityTypes
  • AlertEmailAddresses
  • AlertItems
  • Alerts (Send Email alert on Host Reservation etc)
  • Announcements
  • AppAppearances
  • ApprovalDefinitions
  • ApprovalInstanceItems
  • ApprovalInstances
  • ApprovalPolicies
  • AppServiceComponents
  • AppServiceComponentTemplateProperties
  • AppServiceComponentTemplates
  • AppServiceTemplates
  • ChangeStateRequests
  • ComponentStatus
  • ConnectionCredentials
  • ControlInstances
  • ControlLayouts
  • ControlTypes
  • CostProfiles
  • DataCollectionStatuses
  • DisplayIcons
  • EmailProfiles
  • EndpointTypeCategories
  • EndpointUsageHistory
  • EnterpriseAdminGroups
  • Files
  • FilterSpecGroups
  • FilterSpecs
  • GlobalProfileProperties
  • GlobalProfiles
  • GroupStats
  • HostDiscoveries
  • HostExts
  • HostInstanceTypes
  • HostNamePrefixes
  • HostNics
  • HostNicToReservations (Network Reservations in VRA (Except the IP ranges allocated))
  • HostProperties (Custom Properties of Hosts objects)
  • HostReservationPolicies
  • HostReservationProperties (Custom Properties in Reservations)
  • HostReservations (Reservations in vRA)
  • HostReservationStats (Nr of machines/cpu/memory and Disk Allocaed and used)
  • HostReservationToStorages
  • HostReservationToStorageStats
  • Hosts (Info about vCenter/Esxi and Compute Resource (Yes, internally in vRA this is a Host!))
  • HostStats
  • HostStorageReservationPolicies
  • HostStorageReservationPolicies
  • HostToIsoes
  • HostToStorage
  • InterfaceTypePageProperties
  • InterfaceTypeProperties
  • InterfaceTypes
  • Isoes
  • KeyPairCommons
  • LicenseKeys
  • MachineCostViews
  • MachineOperations
  • MachineStateHistories
  • MachineUsageByStates
  • MachineUsageHistories
  • ManagedMachines
  • ManagementEndpointInfoes
  • ManagementEndpointProperties
  • ManagementEndpoints (vCenter Connections)
  • PhysicalControllers
  • PhysicalMachineProperties
  • PhysicalMachines
  • PhysicalNetworks
  • PhysicalStorages
  • PropertyAttributes
  • PropertyAttributeTypes
  • PropertyDefinitions
  • PropertyDefinitionSets
  • PropertyGroups
  • PropertySetXml
  • PropertyValues
  • ProvisioningGroupProperties
  • ProvisioningGroups (Business Group in VRA, And Logs files of last failed provisioning.. And info about nr of machines deployed etc..)
  • RequestAudits
  • RequestProperties
  • Requests
  • ResourcePools (Resource Pools as fetched from the Vcenter. note: Contains username/password for the connection)
  • SourceMachines
  • StateOperationDefinitionProperties
  • StateOperationDefinitions
  • StateOperationExecutionStates
  • StateOperationProperties
  • StateOperations
  • StaticIPv4Addresses
  • StaticIPv4NetworkProfiles
  • StaticIPv4Ranges
  • StaticIPv4RangeSummaries
  • Storage
  • StorageCostProfiles
  • UICustomizations
  • UserFilterExclusions
  • UserFilters
  • UserLogs
  • Users
  • VirtualMachineExts
  • VirtualMachineHistories
  • VirtualMachineHistoryProperties
  • VirtualMachineProperties
  • VirtualMachines (Info about each virtual Machine)
  • VirtualMachineTemplateProperties
  • VirtualMachineTemplates
  • VMDiskHardwares
  • VMPerformances
  • VMSnapshots
  • VMToNetwork
  • WorkflowInfoes
  • WorkflowMaps
  • WorkflowOperationArguments
  • WorkflowOperations
  • WorkflowStateEvents
  • WorkItem

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));
}
vrealize/managmentmodelentities/all.txt · Last modified: 2018/11/29 12:25 by admin