vrealize/Orchestrator/Workflows/Generate Unique Hostname/Tasks/a01_conflict_encountered.js

13 lines
409 B
JavaScript
Raw Permalink Normal View History

2022-06-15 18:25:07 +00:00
/* JavaScript: conflict encountered
Resets the conflict flag and passes control back to the 'generate candidateVmName'
Inputs: digits (number)
Outputs: conflict (boolean)
Exception binding: errMsg (string)
*/
if (digits) {
errMsg = 'User-specified name is not available, aborting...';
throw(errMsg);
} else {
System.log("Conflict encountered, trying a new name...")
conflict = false
}