diff options
author | George Paraskevopoulos <geopar@intracom-telecom.com> | 2016-11-11 11:05:07 +0200 |
---|---|---|
committer | George Paraskevopoulos <geopar@intracom-telecom.com> | 2016-11-15 10:19:47 +0200 |
commit | 45e3e5662af2997d633bd02a2eb0c7553f442e6e (patch) | |
tree | e938c410c58e0d43b37e4bd0d618df21c2245bed /tests/functest/odl-sfc/correct_classifier.bash | |
parent | 73c4d745bf2bba060dc8301a9127482f01318de1 (diff) |
Copy odl-sfc test from functest to the sfc repo
Migrate odl-sfc testcase from functest repo
First related functest commit: 65a5f65fa06c97456f37ca2434cf9e6fc9b758aa
Last related functest commit: caa06d8d7b55a1c0608a72f809785d8f418cf541
Change-Id: I206f25d6fb44564b8b163ebb9c43e038851bea71
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
Diffstat (limited to 'tests/functest/odl-sfc/correct_classifier.bash')
-rwxr-xr-x | tests/functest/odl-sfc/correct_classifier.bash | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/correct_classifier.bash b/tests/functest/odl-sfc/correct_classifier.bash new file mode 100755 index 00000000..fb08af5c --- /dev/null +++ b/tests/functest/odl-sfc/correct_classifier.bash @@ -0,0 +1,37 @@ +#!/bin/bash + +#This scripts correct the current ODL bug which does not detect +#when SFF and classifier are in the same swtich + +nsp=`ovs-ofctl -O Openflow13 dump-flows br-int table=11 | \ +grep "NXM_NX_NSP" | head -1 | cut -d',' -f13 | cut -d':' -f2 \ +| cut -d'-' -f1` + +ip=`ovs-ofctl -O Openflow13 dump-flows br-int table=11 | \ +grep NXM_NX_NSH_C1 | head -1 | cut -d':' -f5 | cut -d'-' -f1` + +output_port=`ovs-ofctl -O Openflow13 show br-int | \ +grep vxgpe | cut -d'(' -f1` + +output_port2=`echo $output_port` + +echo "This is the nsp =$(($nsp))" +echo "This is the ip=$ip" +echo "This is the vxlan-gpe port=$output_port2" + +ovs-ofctl -O Openflow13 del-flows br-int "table=11,tcp,reg0=0x1,tp_dst=80" +ovs-ofctl -O Openflow13 del-flows br-int "table=11,tcp,reg0=0x1,tp_dst=22" + +ovs-ofctl -O Openflow13 add-flow br-int "table=11,tcp,reg0=0x1,tp_dst=80 \ +actions=move:NXM_NX_TUN_ID[0..31]->NXM_NX_NSH_C2[],push_nsh,\ +load:0x1->NXM_NX_NSH_MDTYPE[],load:0x3->NXM_NX_NSH_NP[],\ +load:$ip->NXM_NX_NSH_C1[],load:$nsp->NXM_NX_NSP[0..23],\ +load:0xff->NXM_NX_NSI[],load:$ip->NXM_NX_TUN_IPV4_DST[],\ +load:$nsp->NXM_NX_TUN_ID[0..31],resubmit($output_port,0)" + +ovs-ofctl -O Openflow13 add-flow br-int "table=11,tcp,reg0=0x1,tp_dst=22\ + actions=move:NXM_NX_TUN_ID[0..31]->NXM_NX_NSH_C2[],push_nsh,\ +load:0x1->NXM_NX_NSH_MDTYPE[],load:0x3->NXM_NX_NSH_NP[],\ +load:$ip->NXM_NX_NSH_C1[],load:$nsp->NXM_NX_NSP[0..23],\ +load:0xff->NXM_NX_NSI[],load:$ip->NXM_NX_TUN_IPV4_DST[],\ +load:$nsp->NXM_NX_TUN_ID[0..31],resubmit($output_port,0)" |