Bug fix in functest ODL-SFC 15/18215/3
authorManuel Buil <manuel.buil@ericsson.com>
Tue, 9 Aug 2016 12:05:47 +0000 (14:05 +0200)
committerManuel Buil <manuel.buil@ericsson.com>
Wed, 10 Aug 2016 07:32:33 +0000 (09:32 +0200)
Change-Id: I496ade3ea5888967e933231f515a340369bffe8f
Signed-off-by: Manuel Buil <manuel.buil@ericsson.com>
testcases/features/sfc/correct_classifier.bash
testcases/features/sfc/sfc.py

index ba34d7f..fb08af5 100755 (executable)
@@ -4,8 +4,8 @@
 #when SFF and classifier are in the same swtich
 
 nsp=`ovs-ofctl -O Openflow13 dump-flows br-int table=11 | \
-grep "nsp=" | awk '{print $6}' | awk -F ',' '{print $2}' | \
-awk -F '=' '{print $2}'`
+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`
index 0073cc9..17ab386 100755 (executable)
@@ -8,7 +8,6 @@ import functest.utils.functest_utils as ft_utils
 import functest.utils.openstack_utils as os_utils
 import paramiko
 
-
 parser = argparse.ArgumentParser()
 
 parser.add_argument("-r", "--report",
@@ -247,7 +246,7 @@ def main():
         ssh.connect(ips[0], username="root",
                     password="opnfv", timeout=2)
         command = ("nohup python vxlan_tool.py -i eth0 "
-                   "-d forward -v off -f -b 80 &")
+                   "-d forward -v off -b 80 > /dev/null 2>&1 &")
         (stdin, stdout, stderr) = ssh.exec_command(command)
     except:
         logger.debug("Waiting for %s..." % ips[0])
@@ -271,7 +270,7 @@ def main():
         ssh.connect(ips[1], username="root",
                     password="opnfv", timeout=2)
         command = ("nohup python vxlan_tool.py -i eth0 "
-                   "-d forward -v off -f -b 22 &")
+                   "-d forward -v off -b 22 > /dev/null 2>&1 &")
         (stdin, stdout, stderr) = ssh.exec_command(command)
     except:
         logger.debug("Waiting for %s..." % ips[1])
@@ -350,6 +349,15 @@ def main():
         TACKER_CHANGECLASSI
     subprocess.call(tacker_classi, shell=True)
 
+    # SSH to modify the classification flows in compute
+
+    contr_cmd4 = ("sshpass -p r00tme ssh " + ssh_options + " root@10.20.0.2"
+                  " 'ssh " + ip_compute + " 'bash correct_classifier.bash''")
+    logger.info("Executing script to modify the classi: '%s'" % contr_cmd4)
+    process = subprocess.Popen(contr_cmd4,
+                               shell=True,
+                               stdout=subprocess.PIPE)
+
     # SSH TO EXECUTE cmd_client
 
     try: