Created
November 15, 2018 18:07
-
-
Save ej-github/283b95f8d2501df0bbadcb1e46490f42 to your computer and use it in GitHub Desktop.
Get Configuration Element by Name and Path
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
// VMware vRealize Orchestrator action sample | |
// | |
// Search for Configuration Element by name and category path | |
// | |
// For vRO 7.0+ | |
// | |
// Action Inputs: | |
// categoryPath - string - Path to the configuration element category (folder) | |
// configName - string - Name of configuration element | |
// | |
// Return type: ConfigurationElement | |
if (!categoryPath || !configName) { throw "Missing inputs"; } | |
var category = Server.getConfigurationElementCategoryWithPath(categoryPath); | |
for each (var c in category.configurationElements) { | |
if (c.name == configName) { | |
return c; | |
} | |
} | |
return null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment