Last active
March 28, 2017 16:11
-
-
Save trisharia/6f4c914d3602771241457c10e3376c71 to your computer and use it in GitHub Desktop.
Get the entitied actions of a vRA Catalog Resource
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 | |
// | |
// Gets the entitied actions of a vRA Catalog Resource | |
// | |
// For vRO/vRA 7.0+ | |
// | |
// Action Inputs: | |
// catalogResource - VCACCAFE:CatalogResource - catalog resource | |
// | |
// Return type: Array/VCACCAFE:CatalogResourceActions - actions of the catalog resource | |
var actions = new Array(); | |
var operations = catalogResource.operations; | |
var action; | |
// Traverse all operations of the catalog resource and get each corresponding action: | |
if (operations) { | |
for each (op in operations) { | |
try { | |
action = vCACCAFEEntitiesFinder.getCatalogResourceAction(catalogResource, op.Id); | |
System.debug("Action available on this catalog resource: "+ action.name + " (" + action.id + ")"); | |
actions.push(action); | |
} catch (e) { | |
System.warn("No catalog resource action found for operation "+ op.name); | |
} | |
} | |
} else { | |
System.warn("No actions available for catalog resource."); | |
} | |
return actions; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment