I'm trying build a simple action to query vCAC for all VMs within a given vCAC tenant whose output will populate a drop-down list for use in an ASD blueprint. I'm able to return all VMs, including VMs that have not been deployed by vCAC using the script below.
var arrVCACVirtualMachines = Server.findAllForType("vCAC:VirtualMachine");
System.log("Found " + arrVCACVirtualMachines.length + " VMs");
for (var i = 0; i < arrVCACVirtualMachines.length; i++){
System.log("Found - " + arrVCACVirtualMachines[i].virtualMachineName);
}
Two questions, first, is this normal to receive all managed vCAC VMs and unmanaged vCenter VMs? Second, is filtering for VMs from a single tenant supported? I can't find a connection in the data model. TIA.