vrealize/Orchestrator/Workflows/VM Provision/Tasks/04_apply_hostnames.js

10 lines
464 B
JavaScript
Raw Permalink Normal View History

2022-06-15 21:34:37 +00:00
/* JavaScript: apply hostnames
Iterates through the resourceNames array and replaces the original name with the new one.
Inputs: newNames (Array/string), inputProperties (Properties)
Outputs: resourceNames (Array/string)
*/
resourceNames = inputProperties.get("resourceNames");
for (var i=0; i<newNames.length; i++) {
System.log("Replacing resourceName [" + resourceNames[i] + "] with [" + newNames[i] + "]");
resourceNames[i] = newNames[i];
}