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

getEntity() problems

$
0
0

Long story short, I need to get the entity for a VM.  I went through my books(which did not contain anything) and have been looking online.  Still missing something.

 

I am pulling in payload as I need it for additional stuff later in the script. Line 7 seems to run fine but I get an error in line 8.   Here is my error:  TypeError: Cannot find function getEntity in object . The only thing I can think of is that I am not getting the VC:VirtualMachine correct.  Any assistance would be greatly appreciated.

 

 

var executionContext = System.getContext();

var machine = payload.get("machine") ;

var vCACProps = machine.get("properties") ;

 

var vCACVmName = machine.get("name");

 

var vCACVms = Server.findAllForType("VC:VirtualMachine", "VirtualMachineName eq '" + vCACVmName + "'");

var vmEntity = vCACVms.getEntity();


Viewing all articles
Browse latest Browse all 6251

Trending Articles



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