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

Popular posts from this blog

CSP-102547 Patch Upgrade Experience VMware Identity Manager 3.3.7 & Aria Suite Lifecycle 8.18.0 (Patch 5 → 7)

Bulk Import DFW Rules to NSX-T using Aria Automation

VCF 9 Automation vs Aria Automation 8.x (Part 1)