VMware Cloud Community
anat_cohen
Contributor
Contributor

Business GroupID

Hi,

We have some users with more than one Business group. I Want them to choose the Business Group and request machine.

I'm trying to run a new request and add The provisioning group property to the blueprint.

When I'm running the WorkFlow, The blueprint running with other provisioning Group.

Is anyone know what can be the problem?

//Put the BGID and The Vlan on properties

var propCatItem = new Properties();

propCatItem.put("provider-VirtualMachine.Network0.Name",strVlan);

propCatItem.put("provider-provisioningGroupId",strBusinessGroupId);

var arrKeys = propCatItem.keys;

for each (var strKey in arrKeys){

  System.log(strKey + " : " + propCatItem.get(strKey));

}

//Set the form, request blueprint

System.getModule("com.vmware.library.vcaccafe.util").validateObject(objCatItem, "Catalog Item");

var objCatForm = vCACCAFERequestsHelper.getRequestFormForCatalogItem(objCatItem);

objCatForm = vCACCAFERequestsHelper.setFormValues(objCatForm, propCatItem);

var objCatRequest = vCACCAFERequestsHelper.requestCatalogItemOnBehalfOf(objCatItem, objCatForm, struser);

System.log("INFO - Catalog Item Request sent");

System.log("INFO - Catalog Item Request sent");

Reply
0 Kudos
3 Replies
anat_cohen
Contributor
Contributor

AnyOne?

Reply
0 Kudos
befreeman
Enthusiast
Enthusiast

I'm not sure I totally understand, but can you just create a Property Group with a Property Definition that lists the Business Groups and put it on the blueprint? If you're using vRA 6.2, this would be a build profile.

This should automatically put the property on the VM when it is provisioned.

Reply
0 Kudos
Dan_Linsley
VMware Employee
VMware Employee

In addition to the "provider-provisioningGroupId" property you have set, there is another place where the business group id is set.

The organization.subtenantRef on the catalog item also needs to be set with that business group ID.  This can be set using:

objCatItem.organization.setSubtenantRef(strBusinessGroupId);

Reply
0 Kudos