Created
February 14, 2021 12:58
-
-
Save mpoore/571f02d5e671f04d6865819d116cb44e to your computer and use it in GitHub Desktop.
vRO action - createDeploymentNameFromCatalogItemNameAndEnv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------------------------------------------------------------- | |
Name: createDeploymentNameFromCatalogItemNameAndEnv | |
Description: Creates a unique vRA deployment name based on the | |
Catalog Item name and a date/time | |
Author: Michael Poore (@mpoore) | |
URL: https://github.com/v12n-io/vro-repository | |
Date: 14/02/2021 | |
Version: 0.0.1 | |
Changes: | |
0.0.1 - Initial version | |
---------------------------------------------------------------------------- */ | |
var itemName = catalogItemName || ""; | |
var envName = environment || ""; | |
var deploymentName = ""; | |
if (itemName != "" && itemName != null && envName != null && envName != "") { | |
var date = new Date(); | |
deploymentName = itemName + " -" + envName.toUpperCase() + "- (" + date.toISOString() + ")"; | |
System.debug("Returning deploymentName: " + deploymentName); | |
} | |
return deploymentName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment