Change VM provisioning state machine based on criteria

Greetings,

I would like to have several VM provisioning state machines. And my goal is to choose one I need before the actual service provisioning kicks off. So my question is if there is any way to control what VM provisioning state machines will be executed while I’m in Service provisioning state machine /ManageIQ/Service/Provisioning/StateMachines/ServiceProvision_Template?

Anyone?

The selection of VM provisioning state machine class is made using a combination of the contents of the /Infrastructure/VM/Lifecycle/Provisioning instance, along with the value of the entry for get_state_machine in the provisioning user’s group profile (under /Infrastructure/VM/Provisioning/Profile/).

The default state machine for a clone from template provision is:

/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/template

but you could have alternative classes such as:

/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM_Custom1/template
/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM_Custom2/template

It should be feasible to manipulate either the contents of /Infrastructure/VM/Lifecycle/Provisioning, or to create custom group profiles that select the appropriate state machine class. You’d need to find a way of creatively setting the provisioning user/group to match the desired profile if you took the latter approach - maybe by making a custom call to $evm.execute(‘create_provision_request’,…) specifying the appropriate user.

Hope this helps,
pemcg