Add ovs logging in sfc_colorado1
[functest.git] / testcases / features / sfc / correct_classifier.bash
1 #!/bin/bash
2
3 #This scripts correct the current ODL bug which does not detect
4 #when SFF and classifier are in the same swtich
5
6 nsp=`ovs-ofctl -O Openflow13 dump-flows br-int table=11 | \
7 grep "NXM_NX_NSP" | head -1 | cut -d',' -f13 | cut -d':' -f2 \
8 | cut -d'-' -f1`
9
10 ip=`ovs-ofctl -O Openflow13 dump-flows br-int table=11 | \
11 grep NXM_NX_NSH_C1 | head -1 | cut -d':' -f5 | cut -d'-' -f1`
12
13 output_port=`ovs-ofctl -O Openflow13 show br-int | \
14 grep vxgpe | cut -d'(' -f1`
15
16 output_port2=`echo $output_port`
17
18 echo "This is the nsp =$(($nsp))"
19 echo "This is the ip=$ip"
20 echo "This is the vxlan-gpe port=$output_port2"
21
22 ovs-ofctl -O Openflow13 del-flows br-int "table=11,tcp,reg0=0x1,tp_dst=80"
23 ovs-ofctl -O Openflow13 del-flows br-int "table=11,tcp,reg0=0x1,tp_dst=22"
24
25 ovs-ofctl -O Openflow13 add-flow br-int "table=11,tcp,reg0=0x1,tp_dst=80 \
26 actions=move:NXM_NX_TUN_ID[0..31]->NXM_NX_NSH_C2[],push_nsh,\
27 load:0x1->NXM_NX_NSH_MDTYPE[],load:0x3->NXM_NX_NSH_NP[],\
28 load:$ip->NXM_NX_NSH_C1[],load:$nsp->NXM_NX_NSP[0..23],\
29 load:0xff->NXM_NX_NSI[],load:$ip->NXM_NX_TUN_IPV4_DST[],\
30 load:$nsp->NXM_NX_TUN_ID[0..31],resubmit($output_port,0)"
31
32 ovs-ofctl -O Openflow13 add-flow br-int "table=11,tcp,reg0=0x1,tp_dst=22\
33  actions=move:NXM_NX_TUN_ID[0..31]->NXM_NX_NSH_C2[],push_nsh,\
34 load:0x1->NXM_NX_NSH_MDTYPE[],load:0x3->NXM_NX_NSH_NP[],\
35 load:$ip->NXM_NX_NSH_C1[],load:$nsp->NXM_NX_NSP[0..23],\
36 load:0xff->NXM_NX_NSI[],load:$ip->NXM_NX_TUN_IPV4_DST[],\
37 load:$nsp->NXM_NX_TUN_ID[0..31],resubmit($output_port,0)"