Created
December 24, 2021 06:22
-
-
Save YagmurOzden/32ad4985ad280fd0a3f7992799836a42 to your computer and use it in GitHub Desktop.
Get configuration element whose type is properties (VMware vRO action, Configuration Element)
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 | |
// vRA 8.4 | |
//action input type: configurationElementName (string), attributeElement(string) | |
//action return type: Properties | |
var configurationElementPath = "web-root"; | |
// var configurationElementName = "Catalog Item Credentials"; | |
// var attributeElement="deployment" | |
try{ | |
var category = Server.getConfigurationElementCategoryWithPath(configurationElementPath); | |
} | |
catch(e){ | |
System.log(e); | |
} | |
for each ( var element in category.configurationElements) { | |
if (element.name == configurationElementName) { | |
var configurationElement = element; | |
} | |
} | |
var deployment =new Properties(); | |
var deployment=configurationElement.getAttributeWithKey(attributeElement).value; | |
return deployment; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment