Skip to content
Permalink
Browse files

Allow multiple VMs per network

Ping floating ip test is creating one network and
one vm per network for the ping. One VM per network
is not realistic scenario. This patch allows users
to spawn multiple vms per network for the ping test.

Change-Id: Ic18f37a2fb978047252b6e2f33f80b18cc27ce7b
  • Loading branch information
venkataanil committed Mar 4, 2020
1 parent d6bba83 commit 37196babc46edd6dbb4052d7499881ad629d4f27
@@ -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 37196ba

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