From 87f2384e9bda8700345156194eb046d9787174d7 Mon Sep 17 00:00:00 2001 From: jkilpatr Date: Tue, 2 Aug 2016 18:06:48 +0000 Subject: [PATCH] Correct template default values for Rally plugins These Rally plugins are designed to take num_networks as an optional argument, where num_networks=1 if not otherwise defined. https://github.com/openstack/browbeat/blob/master/rally/rally-plugins/netcreate-boot/netcreate_boot.py#L29 But when Rally takes the Browbeat config values and attempts to template the yml files in the plugin folders num_networks is not set to a default value in those template files, meaning Rally fails to generate the templates and to ever reach the plugin which wouldn't care anyways. This change adds a default value for num_networks to the plugin template files such that when Rally templates off of these files it will run successfully regardless of if num_networks is defined. Note that from the perspective of the Rally plugin it will now always recieve a value for num_networks even if that value is 1, the same thing it would be if it had not recieved a value at all. Change-Id: I4313aaed963be1689be91bbd180a046e70f987b3 --- rally/rally-plugins/netcreate-boot/netcreate_boot.yml | 1 + .../rally-plugins/subnet-router-create/subnet-router-create.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/rally/rally-plugins/netcreate-boot/netcreate_boot.yml b/rally/rally-plugins/netcreate-boot/netcreate_boot.yml index fa608b117..a63dce93e 100644 --- a/rally/rally-plugins/netcreate-boot/netcreate_boot.yml +++ b/rally/rally-plugins/netcreate-boot/netcreate_boot.yml @@ -1,6 +1,7 @@ {% 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 %} +{% set num_networks = num_networks or 1 %} --- BrowbeatPlugin.create_network_nova_boot: - diff --git a/rally/rally-plugins/subnet-router-create/subnet-router-create.yml b/rally/rally-plugins/subnet-router-create/subnet-router-create.yml index ef2c45074..d4d1b80df 100644 --- a/rally/rally-plugins/subnet-router-create/subnet-router-create.yml +++ b/rally/rally-plugins/subnet-router-create/subnet-router-create.yml @@ -1,6 +1,7 @@ {% 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 %} +{% set num_networks = num_networks or 1 %} --- NeutronPlugin.create_router_and_net: -