VMware Cloud Community
michael_stefani
Enthusiast
Enthusiast

XAAS and machine_prefix property

We're using XAAS and Orchestrator to do some stuff you just can't do with the out of the box blueprints.  We're using the JSON parse functionality and then setting things like reservation policies, clonefrom, cluster size, etc.  I've seen references to a property called "machine_prefix" which supposedly will should let us adjust the prefix the blueprint is using.  I tried putting in the name of the prefix and the request errrors out.  Does anyone know how to make use of that property? 

json.RHEL.data.machine_prefix = "prefixA";

Reply
0 Kudos
1 Reply
parmarr
VMware Employee
VMware Employee

Machine Prefix is not applicable to XaaS requests, please refer to the documentation

https://docs.vmware.com/en/vRealize-Automation/7.3/com.vmware.vra.prepare.use.doc/GUID-CDB547F8-0529...

Alternative method:

Using XaaS form to pull the prefix off the Business Group that submits the request. Here are the details:

1. Call the "getProvisioningGroupEntityByName" method in the "com.vmware.library.vcac" module, pass in a vCACHost and Business Group name (obtained from request properties). This returns an "Entity" object.

2. Call the "vCACCAFEEntitiesFinder.getBusinessGroup" function, passing in a CAFEHost and the id of the Business Group Entity object (group.getProperty("GroupID")). This returns a vCACCAFEBusionessGroup.

3. Call the "vCACCAFEEntitiesFinder.getMachinePrefix" function, again passing the CAFEHost and the Machine Prefix ID (cafegroup.getMachinePrefixId().toString()).

Then you can use the vCACCAFEMachinePrefix object returned in step 3 to obtain the prefix... "objPrefix.prefix". Sorry if this is off base and doesn't apply to your situation.

Sincerely, Rahul Parmar VMware Support Moderator
Reply
0 Kudos