vrealize/Orchestrator/Actions/com.virtuallypotato.utility/getConfigValue.js

12 lines
515 B
JavaScript

/* JavaScript: getConfigValue action
Retrieves the configuration element attribute value for a given key.
Inputs: path (string), configurationName (string), variableName (string)
Return type: string
*/
var configElement = null;
for each (configElement in Server.getConfigurationElementCategoryWithPath(path).configurationElements) {
if (configElement.name.indexOf(configurationName) === 0) { break; };
}
var attribValue = configElement.getAttributeWithKey(variableName).value;
return attribValue;