Last active
March 25, 2017 01:25
-
-
Save trisharia/b115731412ad8307a997f4c2ef774d69 to your computer and use it in GitHub Desktop.
Get all Catalog Resources associated with a vRA Catalog Item Request
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 all Catalog Resources (deployments, machines, etc.) for the given catalog item request | |
// | |
// For vRO/VRA 7.0+ | |
// | |
// Action Inputs: | |
// host - vCACCAFE:VCACHost - vRA CAFE Host | |
// request - vCACCAFE:CatalogItemRequest - vRA Catalog Item Request | |
// | |
// Return type: Array/vCACCAFE:CatalogResource - the vRA Catalog Resources for the catalog item request | |
var requestId = request.id; | |
var resources = vCACCAFEEntitiesFinder.findCatalogResources(host); | |
var catalogResources = new Array(); | |
for each (var resource in resources) { | |
if (resource.requestId === requestId) { | |
catalogResources.push(resource); | |
} | |
} | |
if (catalogResources.length === 0) { | |
System.warn("Catalog Resource not found for the given Request."); | |
} | |
return catalogResources; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment