How to get vcac host using vro
get vcacHost
// catch first match
var vcacHost = Server.findAllForType("vCAC:VCACHost")[0];
System.log("vcacHost found by type: "+vcacHost.displayName);
// vcacHost = null;
// input var: vcacVm
var vcacHost = Server.findForType("vCAC:VCACHost", vcacVm.getEntity().hostId);
System.log("vcacHost found by vcacVm: "+vcacHost.displayName);
// vcacHost = null;
// input var: vcacVm
var vcacHost = Server.findForType("vCAC:VCACHost", vcacVm.getEntity().hostId);
System.log("vcacHost found by vcacVm: "+vcacHost.displayName);
// vcacHost = null;
Comments
Post a Comment