From 56cc23958f869cb968f40a02ce22c92057ff6764 Mon Sep 17 00:00:00 2001 From: panageo2 Date: Tue, 1 Aug 2017 08:57:05 +0000 Subject: Add/Remove testcase This testcase investigates if communication between a group of VMs is interupted upon deleteon and creation of VMs inside this group. Test case flow: 3 vms: [1] on compute 1, [2] on compute 1, [3] on compute 2, all vms ping each other. vm [2] is deleted. Traffic is still flying between [1] and [3]. A new [4] vm is added to compute 1. Traffic is not interrupted and [4] can be reached as well. JIRA: SDNVPN-105 Change-Id: I93a65de2a5df83551e3115fd20b60241cd460e97 Signed-off-by: panageo2 --- sdnvpn/lib/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sdnvpn/lib/utils.py') diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py index a7aa991..994c3bb 100644 --- a/sdnvpn/lib/utils.py +++ b/sdnvpn/lib/utils.py @@ -143,7 +143,7 @@ def create_instance(nova_client, return instance -def generate_ping_userdata(ips_array): +def generate_ping_userdata(ips_array, ping_count=10): ips = "" for ip in ips_array: ips = ("%s %s" % (ips, ip)) @@ -154,7 +154,7 @@ def generate_ping_userdata(ips_array): "while true; do\n" " for i do\n" " ip=$i\n" - " ping -c 10 $ip 2>&1 >/dev/null\n" + " ping -c %s $ip 2>&1 >/dev/null\n" " RES=$?\n" " if [ \"Z$RES\" = \"Z0\" ] ; then\n" " echo ping $ip OK\n" @@ -163,7 +163,7 @@ def generate_ping_userdata(ips_array): " done\n" " sleep 1\n" "done\n" - % ips) + % (ips, ping_count)) def generate_userdata_common(): -- cgit 1.2.3-korg