Hi
I see in vRA 7 the items now appears as 'Deployment' (for single machine item and for multi machine)
Any idea how to create a vRO workflow that will get this deployment and get the members of the deployment ? what is the object type and what action retrives the children ?
I couldn't find any documentation or blogs on that
Thanks a lot!
Hi
For single machine blueprint if you read properties build machine state if you see the property’s value is below.
Single machine
VirtualMachine.Cafe.Blueprint.Component.Cluster.Index = 0
Multi machine
Machine1: VirtualMachine.Cafe.Blueprint.Component.Cluster.Index = 0
Machine2: VirtualMachine.Cafe.Blueprint.Component.Cluster.Index = 1
Machine3: VirtualMachine.Cafe.Blueprint.Component.Cluster.Index = 3
Here is the code to collect VM's name associated with particular deployment. Every deployment has ID, so in Day-2 operations you just need to pass Deployment ID to your Workflow/Action/whatever. At least you got an idea how to work with vCAFE Filter.
var filter = new Array();
var vCACCAFEHost_host = vCACCAFEEntitiesFinder.getHost("vcafe_host_id_bla-bla");
var catalogClient = vCACCAFEHost_host.createCatalogClient();
var catalogConsumerResourceService = catalogClient.getCatalogConsumerResourceService();
filter[0] = vCACCAFEFilterParam.equal("parentResource", vCACCAFEFilterParam.string(Deployment_id)); //here Deployment_id came from Day-2 action form
var query = vCACCAFEOdataQuery.query().addFilter(filter);
var resources = catalogConsumerResourceService.getResourcesList(new vCACCAFEPageOdataRequest(query)); //here you get array of your VM's
var vm_list = new Array();
//code below will create a new array of strings, each element of which - VM'm name and Description
if (resources != null )
{
for (var i = 0; i < resources.length; i++ )
{
vm_list[i] = resources[i].name + "\t" + resources[i].description;
}
return vm_list;
}
VMware dev team, why the heck is this stuff so complicated???