vRO - Update VM Property

vcac = Server.findAllForType("vCAC:VCACHost")[0];
var machine = payload.get("machine");
nodeName = machine.get("name")

var vCACVms = Server.findAllForType("vCAC:VirtualMachine", "VirtualMachineName eq '" + nodeName + "'");
System.log(vCACVms[0])
var virtualMachineEntity = vCACVms[0].getEntity();
var propertyIsHidden = false;
var propertyIsRuntime = false;
var propertyIsEncrypted = false;
var doNotUpdate = false;
var propertyName = "<PropertyName>";
var propertyValue = "<PropertyValue>";
vcacEntity=System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vcac,virtualMachineEntity,propertyName,propertyValue,propertyIsHidden,propertyIsRuntime,propertyIsEncrypted,doNotUpdate)
Post a Comment (0)
Previous Post Next Post