Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Determine Business Group VM belongs to

$
0
0

There are multiple entities in vRA data model that the business group (aka provisioning group) can be determined from, such as Owner, VirtualMachineTemplate, etc. But when I try to get a link to the Business Group I always get an empty array.

 

Can you see anything wrong with the code below?

 

var model = "ManagementModelEntities.svc";

var entitySetName = "VirtualMachines";

var virtualMachines = vCACEntityManager.readModelEntitiesByCustomFilter(vcacHost.id, model, entitySetName, null, null);

 

for each (var vm in virtualMachines) {

     var owner = vm.getLink(vcacHost, "Owner");

     var provisioningGroup = owner[0].getLink(vcacHost, "ProvisioningGroup");

     System.log(provisioningGroup);

}


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>