Skip to content

Instantly share code, notes, and snippets.

@vmwarecode
Created November 28, 2015 21:54
Show Gist options
  • Save vmwarecode/4c72f8122ef6a0109bce to your computer and use it in GitHub Desktop.
Save vmwarecode/4c72f8122ef6a0109bce to your computer and use it in GitHub Desktop.
Get IaaS VirtualMachineID from Cafe ResourceID
//Action Inputs:
// resourceId - string
//
//Return Type: string
var hosts = Server.findAllForType("vCACCAFE:VCACHost");
var cafehost = hosts[0];
var catalogResource = vCACCAFEEntitiesFinder.getCatalogResource(cafehost, resourceId);
return catalogResource.providerBinding.getBindingId();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment