Skip to content

Instantly share code, notes, and snippets.

@trisharia
Created August 25, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trisharia/8bc718a0a8fbe629e50c026716792fae to your computer and use it in GitHub Desktop.
Save trisharia/8bc718a0a8fbe629e50c026716792fae to your computer and use it in GitHub Desktop.
Get parent Catalog Resource in vRA
// VMware vRealize Orchestrator action sample
//
// Returns the parent of a given vCACCAFE:CatalogResource
// For example, find the Deployment resource of a Machine
//
// For vRA 7.0+/vRO 7.0+
//
// Action Inputs:
// childCatalogResource - vCACCAFE:CatalogResource - catalog resource for which to get the parent
// cafeHost - vCACCAFE:VCACHost - vRA CAFE host
//
// Return type: Any - the value for the given key
var parentId = childCatalogResource.parentResourceRef.getId();
return vCACCAFEEntitiesFinder.getCatalogResource(cafeHost, parentId) ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment