Usage of 'number_of_vms' option in MiqRequest

Am I able to use the ‘number_of_vms’ option in MiqRequest to specify the number of VMs to be provisioned?

I have the following in my openstack_CustomizeRequest method:

prov = $evm.root["miq_provision"]
prov.set_option(:number_of_vms, [3, "3"])

But I only see 1 vm provisioned in the OpenStack dashboard.

Am I misunderstanding the way that this works, or is there something else that needs to be done here?

The number_of_vms property is evaluated by the request and determines how many provision tasks are created. The options from the request are copied into each task so this value gets carried along but is not used by the tasks. If you want to modify the number_of_vms property you will need to update the request before it is approved.


Can you give any more details on this? What I’m trying to accomplish is to provision different number of items that make up a bundle - i.e. 2 of item1, 3 of item2 and maybe 0 of item3.