How to get property of vcacVm properties from Payload
get vcacVm properties from Payload
Create the vRO workflow with a single input name(Payload) with a type Properties.
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Requested
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.MachineProvisioned
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.BuildingMachine
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.Disposing
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.MachineActivated
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.UnprovisionMachine
Make the value __*,Virtual* (two underscore) for each of the properties.
var executionContext = System.getContext();
var owner = executionContext.getParameter("__asd_requestedBy");
var requestFor = executionContext.getParameter("__asd_requestedFor");
var machine = payload.get("machine") ;
var computerName = machine.get("name");
var vRAVmProperties = machine.get("properties") ;
if (vRAVmProperties != null) {
var log = "";
log += "New VM properties :\n";
var array = new Array();
for each (var key in vRAVmProperties.keys) {
array.push(key + “: " + vRAVmProperties.get(key));
}
array.sort();
for each (var line in array) {
log += "\t" + line + "\n";
}
System.log(log);
}
Comments
Post a Comment