So this is one way we have been doing it... and I think it might be the equivalent of painting ourselves into a corner. More machines means a much longer process to find a matching VCAC:VirtualMachine.
Have you guys come up with a quicker, better, smarter mechanism?
Action
VCAC:VirtualMachine getvcacvm (VC:VirtualMachine vcvm)
{
var vcacvms = Server.findAllForType("VCAC:VirtualMachine");
for each (var vcacvm in vcacvms){
if (vcvm.name == vcacvm.virtualMachineName){
return vcacvm;
}
}
}