Hey guys,
I'm using vRO 7.1 vRA plug-in to provision a blueprint in a particular business group.
I'm retrieving the catalog items for that particular blueprint here:
catalogItems = vCACCAFEEntitiesFinder.findCatalogItems(vCACHost, "Someblueprint")
And then i'm searching for the one entitled to the current business group:
for each(var cat in catalogItems)
if ((cat.organization.getSubtenantLabel().toLowerCase() == targetBG.toLowerCase()))
catalogItem = cat;
When printing the returned catalog item, I can clearly see that this is the correct catalog item.
I then provision the blueprint with a provisioning template here:
ar vmProvisioningRequest = vCACCAFERequestsHelper.getProvisioningRequestForCatalogItem(catalogItem)
var getProvisioningRequestData = vCACCAFERequestsHelper.getProvisioningRequestData(vmProvisioningRequest);
var setRequestData = JSON.parse(getProvisioningRequestData);
//Update provision request with source VM properties
setRequestData.vSphere_Machine_1.data.cpu = srcVmProps.cpu;
setRequestData.vSphere_Machine_1.data.memory = srcVmProps.memory;
//Sends the request to the CAFE host
vCACCAFERequestsHelper.setProvisioningRequestData(vmProvisioningRequest, JSON.stringify(setRequestData));
request = System.getModule("com.vmware.library.vcaccafe.request").requestCatalogItemWithProvisioningRequest(catalogItem,vmProvisioningRequest)
Everything is working fine except the blueprint is being provisioned to the wrong business group.
I'm going insane here trying to figure out what's wrong.
I'd really appreciate your assistance