Skip to content
Permalink
Browse files

Merge "Allow multiple VMs per network"

  • Loading branch information
Zuul authored and openstack-gerrit committed Mar 17, 2020
2 parents 88cf6fc + 37196ba commit 51882f8a072b20775be78ca58aabda62b19ea4b3
@@ -287,6 +287,7 @@ workloads:
file: rally/rally-plugins/netcreate-boot/netcreate_nova_boot_vms_on_single_network.yml
- name: netcreate-boot-ping
enabled: true
num_vms: 4
image_name: cirros
flavor_name: m1.xtiny
ext_net_id:
@@ -29,7 +29,7 @@
class CreateNetworkNovaBootPing(vm_utils.VMScenario,
neutron_utils.NeutronScenario):

def run(self, image, flavor, ext_net_id, router_create_args=None,
def run(self, image, flavor, ext_net_id, num_vms=1, router_create_args=None,
network_create_args=None, subnet_create_args=None, **kwargs):
ext_net_name = None
if ext_net_id:
@@ -44,10 +44,11 @@ def run(self, image, flavor, ext_net_id, router_create_args=None,
network = self._create_network(network_create_args or {})
subnet = self._create_subnet(network, subnet_create_args or {})
self._add_interface_router(subnet['subnet'], router['router'])
kwargs["nics"] = [{'net-id': network['network']['id']}]
guest = self._boot_server_with_fip(image, flavor, True,
ext_net_name, **kwargs)
self._wait_for_ping(guest[1]['ip'])
for i in range(num_vms):
kwargs["nics"] = [{'net-id': network['network']['id']}]
guest = self._boot_server_with_fip(image, flavor, True,
ext_net_name, **kwargs)
self._wait_for_ping(guest[1]['ip'])

@atomic.action_timer("neutron.create_router")
def _create_router(self, router_create_args):
@@ -1,5 +1,6 @@
{% set image_name = image_name or 'cirros' %}
{% set flavor_name = flavor_name or 'm1.xtiny' %}
{% set num_vms = num_vms or 1 %}
{% set sla_max_avg_duration = sla_max_avg_duration or 60 %}
{% set sla_max_failure = sla_max_failure or 0 %}
{% set sla_max_seconds = sla_max_seconds or 60 %}
@@ -12,6 +13,7 @@ BrowbeatPlugin.create_network_nova_boot_ping:
name: '{{flavor_name}}'
image:
name: '{{image_name}}'
num_vms: {{num_vms}}
ext_net_id: '{{ext_net_id}}'
network_create_args: {}
router_create_args: {}

0 comments on commit 51882f8

Please sign in to comment.
You can’t perform that action at this time.