Improve test runtime 58/6258/1
authorFilip Tehlar <ftehlar@cisco.com>
Wed, 19 Apr 2017 10:00:24 +0000 (12:00 +0200)
committerFilip Tehlar <ftehlar@cisco.com>
Wed, 19 Apr 2017 10:00:24 +0000 (12:00 +0200)
Change-Id: I77366de42ac07b65c6fa71bd21034913d1d9b4b1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
tests/data_plane/vpp_lite_topo/topologies/2_node_topo.sh
tests/data_plane/vpp_lite_topo/topologies/3_node_star.sh
tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh

index c882c0e..ee2bb31 100644 (file)
 
 function set_arp
 {
+  odl_mac=`ip a show dev odl | grep "link/ether" | awk '{print $2}'`
+  echo "set ip arp host-xtr1 6.0.3.100 $odl_mac" | nc 0 5002
+  echo "set ip arp host-xtr2 6.0.3.100 $odl_mac" | nc 0 5003
+  echo "set ip arp host-xtr3 6.0.3.100 $odl_mac" | nc 0 5004
+
   mac=`ip netns exec vppns1 ip a show dev veth_vpp1  | grep "link/ether" | awk '{print $2}'`
   echo "set ip arp host-vpp1 6.0.1.2 $mac" | nc 0 5002
   echo "set ip6 neighbor host-vpp1 6:0:1::2 $mac" | nc 0 5002
index 9f23315..82dc734 100644 (file)
@@ -65,6 +65,11 @@ function 3_node_star_topo_clean
 
 function set_arp
 {
+  odl_mac=`ip a show dev odl | grep "link/ether" | awk '{print $2}'`
+  echo "set ip arp host-xtr1 6.0.3.100 $odl_mac" | nc 0 5002
+  echo "set ip arp host-xtr2 6.0.3.100 $odl_mac" | nc 0 5003
+  echo "set ip arp host-xtr3 6.0.3.100 $odl_mac" | nc 0 5004
+
   mac1=`ip netns exec vpp-ns5 ip a show dev veth_vpp5  | grep "link/ether" | awk '{print $2}'`
   ip netns exec vpp-ns6 arp -s 6.0.10.21 $mac1
 
index f4210fe..e46354d 100644 (file)
@@ -1,5 +1,20 @@
 #!/usr/bin/env bash
 
+function set_arp
+{
+  odl_mac1=`ip a show dev odl_vpp1 | grep "link/ether" | awk '{print $2}'`
+  echo "set ip arp host-vpp1_rtr 6.0.3.100 $odl_mac1" | nc 0 5002
+
+  odl_mac2=`ip a show dev odl_vpp2 | grep "link/ether" | awk '{print $2}'`
+  echo "set ip arp host-vpp2_rtr 6.0.3.100 $odl_mac1" | nc 0 5003
+
+  mac=`echo "sh hard host-rtr_vpp1" | nc 0 5004 | grep 'Ethernet address' | awk '{print $3}'`
+  echo "set ip arp host-vpp1_rtr 6.0.3.2 $mac" | nc 0 5002
+
+  mac=`echo "sh hard host-vpp2_rtr" | nc 0 5003 | grep 'Ethernet address' | awk '{print $3}'`
+  echo "set ip arp host-rtr_vpp2 6.0.5.1 $mac" | nc 0 5004
+}
+
 function rtr_two_iface_clean {
   echo "Clearing all VPP instances.."
   pkill vpp --signal 9
@@ -136,4 +151,6 @@ function rtr_two_iface_setup {
   fi
   post_curl "add-mapping" ${ODL_CONFIG_FILE1}
   post_curl "add-mapping" ${ODL_CONFIG_FILE2}
+
+  set_arp
 }