Merge branch 'master' of https://github.com/OPENNETWORKINGLAB/ONLabTest

Conflicts:
	TestON/drivers/common/cli/emulator/mininetclidriver.pyc
	TestON/drivers/common/cli/onosclidriver.pyc
	TestON/tests/OnosCHO4nodes/OnosCHO4nodes.py
	TestON/tests/OnosCHO4nodes/OnosCHO4nodes.pyc
	TestON/tests/OnosPerf4nodes/OnosPerf4nodes.py
	TestON/tests/OnosPerf4nodes/OnosPerf4nodes.pyc
	TestON/tests/OnosSanity/OnosSanity.pyc
	TestON/tests/OnosSanity/__init__.pyc
	TestON/tests/OnosSanity4nodes/OnosSanity4nodes.pyc
	TestON/tests/OnosScale4nodes/OnosScale4nodes.pyc
diff --git a/TestON/drivers/common/cli/dpclidriver.py b/TestON/drivers/common/cli/dpclidriver.py
new file mode 100644
index 0000000..1e7015c
--- /dev/null
+++ b/TestON/drivers/common/cli/dpclidriver.py
@@ -0,0 +1,147 @@
+'''
+Driver for blank dataplane VMs. Created for SDNIP test. 
+'''
+
+import time
+import pexpect
+import struct, fcntl, os, sys, signal
+import sys
+import re
+import json
+sys.path.append("../")
+from drivers.common.clidriver import CLI
+
+class DPCliDriver(CLI):
+
+    def __init__(self):
+        super(CLI, self).__init__()
+
+    def connect(self,**connectargs):
+        for key in connectargs:
+           vars(self)[key] = connectargs[key]
+
+
+        self.name = self.options['name']
+        self.handle = super(DPCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+
+        if self.handle:
+            return self.handle
+        else :
+            main.log.info("NO HANDLE")
+            return main.FALSE
+
+    def create_interfaces(self, net, number, start):
+        '''
+        Creates a number,specified by 'number,' of subinterfaces on eth0. Ip addresses start at 'net'.'start'.1.1 with a 24 bit netmask. Addresses increment sequentially in the third quad,
+        therefore all interfaces are in different subnets on the same machine. When the third quad reaches 255, it is reset to 1 and the second quad is incremented.
+        Every single ip address is placed in a file in /tmp titled 'ip_table{net}.txt'
+        The file is used by 'pingall_interfaces()' as a fping argument
+        This method returns true if all interfaces are created without a hitch, and false if a single interface has issues
+        '''
+
+        self.handle.sendline("")
+        self.handle.expect("\$")
+
+        self.handle.sendline("rm /tmp/local_ip.txt")
+        self.handle.expect("\$")
+        self.handle.sendline("touch /tmp/local_ip.txt")
+        self.handle.expect("\$")
+
+        main.log.info("Creating interfaces")
+        k = 0
+        intf = 0
+        while number != 0:
+            k= k + 1
+            if k == 256:
+                k = 1
+                start = start + 1
+            number = number - 1
+            intf = intf + 1
+            ip = net+"."+str(start)+"."+str(k)+".1"
+            self.handle.sendline("sudo ifconfig eth0:"+str(intf)+" "+ip+" netmask 255.255.255.0")
+
+            i = self.handle.expect(["\$","password",pexpect.TIMEOUT,pexpect.EOF], timeout = 120)
+                if i == 0:
+                    self.handle.sendline("echo "+str(ip)+" >> /tmp/local_ip.txt")
+                    self.handle.expect("\$")
+                elif i == 1:
+                    main.log.info("Sending sudo password")
+                    self.handle.sendline(self.pwd) 
+                    self.handle.expect("\$")
+                else:
+                    main.log.error("INTERFACES NOT CREATED")
+                    return main.FALSE
+
+
+    def pingall_interfaces(self, netsrc, netstrt, netdst, destlogin, destip):
+        '''
+        Copies the /tmp/ip_table{net}.txt file from the machine you wish to ping, then runs fping with a source address of {netsrc}.{netstrt}.1.1 on the copied file.
+        Check every single response for reachable or unreachable. If all are reachable, function returns true. If a SINGLE host is unreachable, then the function stops and returns false
+        If fping is not installed, this function will install fping then run the same command
+        '''
+
+        self.handle.sendline("")
+        self.handle.expect("\$")
+      
+        self.handle.sendline("scp "+str(destlogin)+"@"+str(destip)+":/tmp/local_ip.txt /tmp/ip_table"+str(net)+".txt")
+        i = self.handle.expect(["100%","password",pexpect.TIMEOUT], timeout = 30)
+        if i == 0:
+            main.log.info("Copied ping file successfully")
+        elif i == 1:
+            self.handle.sendline(self.pwd)
+            self.handle.expect("100%")
+            main.log.info("Copied ping file successfully")
+        elif i == 2:
+            main.log.error("COULD NOT COPY PING FILE FROM "+str(destip))
+            result = main.FALSE
+            return result
+       
+        self.handle.sendline("")
+        self.handle.expect("\$")
+
+        main.log.info("Pinging interfaces on the "+str(netdst)+" network from "+str(netsrc)+"."+str(netstrt)+".1.1") 
+        self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+        while 1:
+            i = self.handle.expect(["reachable","unreachable","\$","password",pexpect.TIMEOUT,"not installed"], timeout=45)
+            if i == 0:
+                result = main.TRUE
+            elif i == 1:
+                main.log.error("An interface was unreachable")
+                result = main.FALSE
+                return result
+            elif i == 2:
+                main.log.info("All interfaces reachable")
+                return result
+            elif i == 3:
+                self.handle.sendline(self.pwd)
+            elif i == 4:
+                main.log.error("Unable to fping")
+                result = main.FALSE
+                return result
+            elif i == 5:
+                main.log.info("fping not installed, installing fping")
+                self.handle.sendline("sudo apt-get install fping")
+                i = self.handle.expect(["password","\$",pexpect.TIMEOUT], timeout = 60)
+                if i == 0:
+                    self.handle.sendline(self.pwd)
+                    self.handle.expect("\$", timeout = 30)
+                    main.log.info("fping installed, now pinging interfaces")
+                    self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+                elif i == 1:
+                    main.log.info("fping installed, now pinging interfaces")
+                    self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+                elif i == 2:
+                    main.log.error("Could not install fping")
+                    result = main.FALSE
+                    return result
+
+    def disconnect(self):
+        response = ''
+        try:
+            self.handle.sendline("exit")
+            self.handle.expect("closed")
+        except:
+            main.log.error("Connection failed to the host")
+            response = main.FALSE
+        return response
+
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py b/TestON/drivers/common/cli/quaggaclidriver.py
new file mode 100644
index 0000000..744d284
--- /dev/null
+++ b/TestON/drivers/common/cli/quaggaclidriver.py
@@ -0,0 +1,213 @@
+#!/usr/bin/env python
+
+import time
+import pexpect
+import struct, fcntl, os, sys, signal
+import sys
+import re
+import json
+sys.path.append("../")
+from drivers.common.clidriver import CLI
+
+class QuaggaCliDriver(CLI):
+
+    def __init__(self):
+        super(CLI, self).__init__()
+
+    def connect(self, **connectargs):
+        for key in connectargs:
+            vars(self)[key] = connectargs[key]
+        
+        self.name = self.options['name']
+        self.handle = super(QuaggaCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+
+        if self.handle: 
+            self.handle.expect("")
+            self.handle.expect("\$")
+            self.handle.sendline("telnet localhost 2605")
+            self.handle.expect("Password:", timeout = 5)
+            self.handle.sendline("hello")
+            self.handle.expect("bgpd",timeout = 5)
+            self.handle.sendline("enable")
+            self.handle.expect("bgpd#", timeout = 5)
+            return self.handle
+        else :
+            main.log.info("NO HANDLE")
+            return main.FALSE
+
+    def enter_config(self, asn):
+        try:
+            self.handle.sendline("")
+            self.handle.expect("bgpd#")
+        except:
+            main.log.warn("Probably not currently in enable mode!")
+            self.disconnect()
+            return main.FALSE
+        self.handle.sendline("configure terminal")
+        self.handle.expect("config", timeout = 5)
+        routerAS = "router bgp " + str(asn)
+        try:
+            self.handle.sendline(routerAS)
+            self.handle.expect("config-router", timeout = 5)
+            return main.TRUE
+        except:
+            return main.FALSE
+    def add_route(self, net, numRoutes, routeRate):
+        try:
+            self.handle.sendline("")
+            self.handle.expect("config-router")
+        except:
+            main.log.warn("Probably not in config-router mode!")
+            self.disconnect()
+        main.log.report("Adding Routes")
+        j=0
+        k=0
+        while numRoutes > 255:
+            numRoutes = numRoutes - 255
+            j = j + 1
+        k = numRoutes % 254
+        routes_added = 0
+        if numRoutes > 255:
+            numRoutes = 255
+        for m in range(1,j+1):
+            for n in range(1, numRoutes+1):
+                network = str(net) + "." + str(m) + "." + str(n) + ".0/24"
+                routeCmd = "network " + network
+                try:
+                    self.handle.sendline(routeCmd)
+                    self.handle.expect("bgpd")
+                except:
+                    main.log.warn("failed to add route")
+                    self.disconnect() 
+                waitTimer = 1.00/routeRate
+                time.sleep(waitTimer)
+                routes_added = routes_added + 1
+        for d in range(j+1,j+2):
+            for e in range(1,k+1):
+                network = str(net) + "." + str(d) + "." + str(e) + ".0/24"
+                routeCmd = "network " + network
+                try:
+                    self.handle.sendline(routeCmd)
+                    self.handle.expect("bgpd")
+                except:
+                    main.log.warn("failed to add route")
+                    self.disconnect
+                waitTimer = 1.00/routeRate
+                time.sleep(waitTimer)
+                routes_added = routes_added + 1
+        if routes_added == numRoutes:
+            return main.TRUE
+        return main.FALSE
+    def del_route(self, net, numRoutes, routeRate):
+        try:
+            self.handle.sendline("")
+            self.handle.expect("config-router")
+        except:
+            main.log.warn("Probably not in config-router mode!")
+            self.disconnect()
+        main.log.report("Deleting Routes")
+        j=0
+        k=0
+        while numRoutes > 255:
+            numRoutes = numRoutes - 255
+            j = j + 1
+        k = numRoutes % 254
+        routes_deleted = 0
+        if numRoutes > 255:
+            numRoutes = 255
+        for m in range(1,j+1):
+            for n in range(1, numRoutes+1):
+                network = str(net) + "." + str(m) + "." + str(n) + ".0/24"
+                routeCmd = "no network " + network
+                try:
+                    self.handle.sendline(routeCmd)
+                    self.handle.expect("bgpd")
+                except:
+                    main.log.warn("Failed to delete route")
+                    self.disconnect()
+                waitTimer = 1.00/routeRate
+                time.sleep(waitTimer)
+                routes_deleted = routes_deleted + 1
+        for d in range(j+1,j+2):
+            for e in range(1,k+1):
+                network = str(net) + "." + str(d) + "." + str(e) + ".0/24"
+                routeCmd = "no network " + network
+                try:
+                    self.handle.sendline(routeCmd)
+                    self.handle.expect("bgpd")
+                except:
+                    main.log.warn("Failed to delete route")
+                    self.disconnect()
+                waitTimer = 1.00/routeRate
+                time.sleep(waitTimer)
+                routes_deleted = routes_deleted + 1
+        if routes_deleted == numRoutes:
+            return main.TRUE
+        return main.FALSE
+    def check_routes(self, brand, ip, user, pw):
+        def pronto(ip, user, passwd):
+            print "Connecting to Pronto switch"
+            child = pexpect.spawn("telnet " + ip)
+            i = child.expect(["login:", "CLI#",pexpect.TIMEOUT])
+            if i == 0:
+                print "Username and password required. Passing login info."
+                child.sendline(user)
+                child.expect("Password:")
+                child.sendline(passwd)
+                child.expect("CLI#")
+            print "Logged in, getting flowtable."
+            child.sendline("flowtable brief")
+            for t in range (9):
+                t2 = 9 - t
+                print "\r" + str(t2)
+                sys.stdout.write("\033[F")
+                time.sleep(1)
+            print "Scanning flowtable"
+            child.expect("Flow table show")
+            count = 0
+            while 1:
+                i = child.expect(['17\d\.\d{1,3}\.\d{1,3}\.\d{1,3}','CLI#',pexpect.TIMEOUT])
+                if i == 0:
+                    count = count + 1
+                elif i == 1:
+                    print "Pronto flows: " + str(count) + "\nDone\n"
+                    break
+                else:
+                    break
+        def cisco(ip,user,passwd):
+            print "Establishing Cisco switch connection"
+            child = pexpect.spawn("ssh " +  user + "@" + ip)
+            i = child.expect(["Password:", "CLI#",pexpect.TIMEOUT])
+            if i == 0:
+                print "Password required. Passing now."
+                child.sendline(passwd)
+                child.expect("#")
+            print "Logged in. Retrieving flow table then counting flows."
+            child.sendline("show openflow switch all flows all")
+            child.expect("Logical Openflow Switch")
+            print "Flow table retrieved. Counting flows"
+            count = 0
+            while 1:
+                i = child.expect(["nw_src=17","#",pexpect.TIMEOUT])
+                if i == 0:
+                    count = count + 1
+                elif i == 1:
+                    print "Cisco flows: " + str(count) + "\nDone\n"
+                    break
+                else:
+                    break
+            if brand == "pronto" or brand == "PRONTO":
+                pronto(ip,user,passwd)
+            #elif brand  == "cisco" or brand == "CISCO":
+            #    cisco(ip,user,passwd) 
+    def disconnect(self):
+        '''
+        Called when Test is complete to disconnect the Quagga handle.  
+        '''
+        response = ''
+        try:
+            self.handle.close()
+        except:
+            main.log.error("Connection failed to the host")
+            response = main.FALSE
+        return response
diff --git a/TestON/drivers/common/cli/sdnipclidriver.py b/TestON/drivers/common/cli/sdnipclidriver.py
new file mode 100644
index 0000000..58dfb03
--- /dev/null
+++ b/TestON/drivers/common/cli/sdnipclidriver.py
@@ -0,0 +1,73 @@
+import time
+import pexpect
+import struct, fcntl, os, sys, signal
+import sys
+import re
+import json
+sys.path.append("../")
+from drivers.common.clidriver import CLI
+
+
+class SDNIPCliDriver(CLI):
+
+    def __init__(self):
+        super(CLI, self).__init__()
+
+    def connect(self, **connectargs):
+        for key in connectargs:
+            vars(self)[key] = connectargs[key]
+
+        self.name = self.options['name']
+        self.handle = super(SDNIPCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+
+        if self.handle:
+            return self.handle
+        else :
+            main.log.info("NO HANDLE")
+            return main.FALSE
+    
+    def check_routes(self, brand, ip, user, pw):
+        self.handle.sendline("")
+        self.handle.expect("\$")    
+        main.log.info("Connecting to Pronto switch")
+        child = pexpect.spawn("telnet " + ip)
+        i = child.expect(["login:", "CLI#",pexpect.TIMEOUT])
+        if i == 0:
+            main.log.info("Username and password required. Passing login info.")
+            child.sendline(user)
+            child.expect("Password:")
+            child.sendline(pw)
+            child.expect("CLI#")
+        main.log.info("Logged in, getting flowtable.")
+        child.sendline("flowtable brief")
+        for t in range (9):
+            t2 = 9 - t
+            main.log.info("\r" + str(t2))
+            sys.stdout.write("\033[F")
+            time.sleep(1)
+        time.sleep(10)
+        main.log.info("Scanning flowtable")
+        child.expect("Flow table show")
+        count = 0
+        while 1:
+            i = child.expect(['17\d\.\d{1,3}\.\d{1,3}\.\d{1,3}','CLI#',pexpect.TIMEOUT])
+            if i == 0:
+                count = count + 1
+            elif i == 1:
+                a ="Pronto flows: " + str(count) + "\nDone\n"
+                main.log.info(a)
+                break
+            else:
+                break
+        return count
+    def disconnect(self):
+        '''
+        Called when Test is complete to disconnect the Quagga handle.  
+        '''
+        response = ''
+        try:
+            self.handle.close()
+        except:
+            main.log.error("Connection failed to the host")
+            response = main.FALSE
+        return response
diff --git a/TestON/tests/CassandraCheck/CassandraCheck.pyc b/TestON/tests/CassandraCheck/CassandraCheck.pyc
deleted file mode 100644
index c2d5794..0000000
--- a/TestON/tests/CassandraCheck/CassandraCheck.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/CassandraCheck/__init__.pyc b/TestON/tests/CassandraCheck/__init__.pyc
deleted file mode 100644
index a4df73b..0000000
--- a/TestON/tests/CassandraCheck/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/MininetTest/MininetTest.pyc b/TestON/tests/MininetTest/MininetTest.pyc
deleted file mode 100644
index c076682..0000000
--- a/TestON/tests/MininetTest/MininetTest.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/MininetTest/__init__.pyc b/TestON/tests/MininetTest/__init__.pyc
deleted file mode 100644
index 917ac46..0000000
--- a/TestON/tests/MininetTest/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.py b/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.py
index 6b4221a..82410d2 100644
--- a/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.py
+++ b/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.py
@@ -68,10 +68,17 @@
             main.ONOS3.start()
             main.ONOS4.start()
             data = main.ONOS1.isup()
+<<<<<<< HEAD
         #main.ONOS1.tcpdump()
         #main.ONOS2.tcpdump()
         #main.ONOS3.tcpdump()
         #main.ONOS4.tcpdump()
+=======
+        main.ONOS1.tcpdump()
+        main.ONOS2.tcpdump()
+        main.ONOS3.tcpdump()
+        main.ONOS4.tcpdump()
+>>>>>>> f580d10d359eabad08530e06fb8339390b47fba0
         utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
            
 #**********************************************************************************************************************************************************************************************
@@ -199,6 +206,7 @@
 #If the ping test fails 6 times, then the test case will return false
 
     def CASE4(self,main) :
+<<<<<<< HEAD
         main.log.report("Remove all but one ONOS then ping until all hosts are reachable or fail after 6 attempts")
         import time
         import random
@@ -220,13 +228,21 @@
             port = main.params['CTRL']['port4']
 
         main.log.report("ONOS"+str(num)+" will be the sole controller")
+=======
+        main.log.report("Remove ONOS 2,3,4 then ping until all hosts are reachable or fail after 6 attempts")
+        import time
+>>>>>>> f580d10d359eabad08530e06fb8339390b47fba0
         for i in range(25):
             if i < 15:
                 j=i+1
-                main.Mininet1.assign_sw_controller(sw=str(j),ip1=ip,port1=port)  #Assigning a single controller removes all other controllers
+                main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'])  #Assigning a single controller removes all other controllers
             else:
                 j=i+16
+<<<<<<< HEAD
                 main.Mininet1.assign_sw_controller(sw=str(j),ip1=ip,port1=port)
+=======
+                main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'])
+>>>>>>> f580d10d359eabad08530e06fb8339390b47fba0
       
         strtTime = time.time() 
         result = main.ONOS1.check_status_report(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
diff --git a/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.pyc b/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.pyc
deleted file mode 100644
index 5355937..0000000
--- a/TestON/tests/OnosCHO4nodes/OnosCHO4nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosCHO4nodes/__init__.pyc b/TestON/tests/OnosCHO4nodes/__init__.pyc
deleted file mode 100644
index 73fab79..0000000
--- a/TestON/tests/OnosCHO4nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosCHO8nodes/OnosCHO8nodes.pyc b/TestON/tests/OnosCHO8nodes/OnosCHO8nodes.pyc
deleted file mode 100644
index b10aa02..0000000
--- a/TestON/tests/OnosCHO8nodes/OnosCHO8nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosCHO8nodes/__init__.pyc b/TestON/tests/OnosCHO8nodes/__init__.pyc
deleted file mode 100644
index 171aaa3..0000000
--- a/TestON/tests/OnosCHO8nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosDD_PARP/OnosDD_PARP.pyc b/TestON/tests/OnosDD_PARP/OnosDD_PARP.pyc
deleted file mode 100644
index 7e3c03c..0000000
--- a/TestON/tests/OnosDD_PARP/OnosDD_PARP.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosDD_PARP/__init__.pyc b/TestON/tests/OnosDD_PARP/__init__.pyc
deleted file mode 100644
index 06b4186..0000000
--- a/TestON/tests/OnosDD_PARP/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerf/OnosPerf.pyc b/TestON/tests/OnosPerf/OnosPerf.pyc
deleted file mode 100644
index 549ad66..0000000
--- a/TestON/tests/OnosPerf/OnosPerf.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerf/__init__.pyc b/TestON/tests/OnosPerf/__init__.pyc
deleted file mode 100644
index 170443d..0000000
--- a/TestON/tests/OnosPerf/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.py b/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.py
index ae0bade..40895b3 100644
--- a/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.py
+++ b/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.py
@@ -135,7 +135,10 @@
             main.ONOS2.start()
             main.ONOS3.start()
             main.ONOS4.start()
+<<<<<<< HEAD
             time.sleep(45)
+=======
+>>>>>>> f580d10d359eabad08530e06fb8339390b47fba0
             for i in range(4):
                 result = main.ONOS1.check_status(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
                 time.sleep(5)
diff --git a/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.pyc b/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.pyc
deleted file mode 100644
index e04e189..0000000
--- a/TestON/tests/OnosPerf4nodes/OnosPerf4nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerf4nodes/__init__.pyc b/TestON/tests/OnosPerf4nodes/__init__.pyc
deleted file mode 100644
index ed9f676..0000000
--- a/TestON/tests/OnosPerf4nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerfTest/OnosPerfTest.pyc b/TestON/tests/OnosPerfTest/OnosPerfTest.pyc
deleted file mode 100644
index 77d7ca0..0000000
--- a/TestON/tests/OnosPerfTest/OnosPerfTest.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosPerfTest/__init__.pyc b/TestON/tests/OnosPerfTest/__init__.pyc
deleted file mode 100644
index 69a5962..0000000
--- a/TestON/tests/OnosPerfTest/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity/OnosSanity.pyc b/TestON/tests/OnosSanity/OnosSanity.pyc
deleted file mode 100644
index 640a28d..0000000
--- a/TestON/tests/OnosSanity/OnosSanity.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity/__init__.pyc b/TestON/tests/OnosSanity/__init__.pyc
deleted file mode 100644
index d852f43..0000000
--- a/TestON/tests/OnosSanity/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity4ARP/__init__.pyc b/TestON/tests/OnosSanity4ARP/__init__.pyc
deleted file mode 100644
index 81ca0a2..0000000
--- a/TestON/tests/OnosSanity4ARP/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity4nodes/OnosSanity4nodes.pyc b/TestON/tests/OnosSanity4nodes/OnosSanity4nodes.pyc
deleted file mode 100644
index 7219e21..0000000
--- a/TestON/tests/OnosSanity4nodes/OnosSanity4nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity4nodes/__init__.pyc b/TestON/tests/OnosSanity4nodes/__init__.pyc
deleted file mode 100644
index 81ca0a2..0000000
--- a/TestON/tests/OnosSanity4nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity8nodes/OnosSanity8nodes.pyc b/TestON/tests/OnosSanity8nodes/OnosSanity8nodes.pyc
deleted file mode 100644
index 79b49b2..0000000
--- a/TestON/tests/OnosSanity8nodes/OnosSanity8nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosSanity8nodes/__init__.pyc b/TestON/tests/OnosSanity8nodes/__init__.pyc
deleted file mode 100644
index 4a5710a..0000000
--- a/TestON/tests/OnosSanity8nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale/OnosScale.pyc b/TestON/tests/OnosScale/OnosScale.pyc
deleted file mode 100644
index 19dfdf5..0000000
--- a/TestON/tests/OnosScale/OnosScale.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale/__init__.pyc b/TestON/tests/OnosScale/__init__.pyc
deleted file mode 100644
index 40dd87d..0000000
--- a/TestON/tests/OnosScale/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale/check_status.pyc b/TestON/tests/OnosScale/check_status.pyc
deleted file mode 100644
index d8aa1f1..0000000
--- a/TestON/tests/OnosScale/check_status.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale4nodes/OnosScale4nodes.pyc b/TestON/tests/OnosScale4nodes/OnosScale4nodes.pyc
deleted file mode 100644
index c640ca9..0000000
--- a/TestON/tests/OnosScale4nodes/OnosScale4nodes.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale4nodes/__init__.pyc b/TestON/tests/OnosScale4nodes/__init__.pyc
deleted file mode 100644
index 3d19c8b..0000000
--- a/TestON/tests/OnosScale4nodes/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosScale4nodes/check_status.pyc b/TestON/tests/OnosScale4nodes/check_status.pyc
deleted file mode 100644
index d8aa1f1..0000000
--- a/TestON/tests/OnosScale4nodes/check_status.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosTest/OnosTest.pyc b/TestON/tests/OnosTest/OnosTest.pyc
deleted file mode 100644
index 4ea207b..0000000
--- a/TestON/tests/OnosTest/OnosTest.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/OnosTest/__init__.pyc b/TestON/tests/OnosTest/__init__.pyc
deleted file mode 100644
index 63f5103..0000000
--- a/TestON/tests/OnosTest/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/SDNIPRouteTest/Check_Flowtable.py b/TestON/tests/SDNIPRouteTest/Check_Flowtable.py
new file mode 100755
index 0000000..efbcd0e
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/Check_Flowtable.py
@@ -0,0 +1,87 @@
+#!/usr/bin/env python
+
+import os
+import pexpect
+import re
+import time
+import sys
+
+def pronto(ip, user, passwd):
+    print "Connecting to Pronto switch"
+    child = pexpect.spawn("telnet " + ip)
+    i = child.expect(["login:", "CLI#",pexpect.TIMEOUT])
+    if i == 0:
+        print "Username and password required. Passing login info."    
+        child.sendline(user)
+        child.expect("Password:")
+        child.sendline(passwd)
+        child.expect("CLI#")
+    print "Logged in, getting flowtable."
+    child.sendline("flowtable brief")
+    for t in range (9): 
+        t2 = 9 - t 
+        print "\r" + str(t2)
+        sys.stdout.write("\033[F")
+        time.sleep(1)
+    print "Scanning flowtable"
+    child.expect("Flow table show")
+    count = 0
+    while 1:
+        i = child.expect(['17\d\.\d{1,3}\.\d{1,3}\.\d{1,3}','CLI#',pexpect.TIMEOUT])
+        if i == 0:
+            count = count + 1
+        elif i == 1:
+            print "Pronto flows: " + str(count) + "\nDone\n"
+            break
+        else:
+            break
+
+def cisco(ip,user,passwd):
+    print "Establishing Cisco switch connection"
+    child = pexpect.spawn("ssh " +  user + "@" + ip)
+    i = child.expect(["Password:", "CLI#",pexpect.TIMEOUT])
+    if i == 0:
+        print "Password required. Passing now."
+        child.sendline(passwd)
+        child.expect("#")
+    print "Logged in. Retrieving flow table then counting flows."
+    child.sendline("show openflow switch all flows all")
+    child.expect("Logical Openflow Switch")
+    print "Flow table retrieved. Counting flows"
+    count = 0
+    while 1:
+        i = child.expect(["nw_src=17","#",pexpect.TIMEOUT])
+        if i == 0:
+            count = count + 1
+        elif i == 1:
+            print "Cisco flows: " + str(count) + "\nDone\n"
+            break
+        else: 
+            break
+
+if __name__ == "__main__":
+    usage_msg = "<Switch brand> <IP> <Username> <Password>\n"
+    usage_msg = usage_msg + "\nCurrently supported switches:\n"
+    usage_msg = usage_msg + "Pronto | Cisco\n"
+    usage_msg = usage_msg + "\nShorthand commands: \n"
+    usage_msg = usage_msg + "SDNIP : Runs \"Pronto 10.128.0.63 admin admin\" and \"Cisco 10.128.0.30 admin onos_test\" \n"
+
+    if len(sys.argv) == 2:
+        if sys.argv[1].lower() == "sdnip":
+            switch = sys.argv[1]
+    elif len(sys.argv) < 5 or (sys.argv[1] == "-h" or sys.argv[1] == "--help"):
+        print(usage_msg)
+        exit(0)
+    else:
+        switch = sys.argv[1]
+        ip = sys.argv[2]
+        user = sys.argv[3]
+        passwd = sys.argv[4]
+
+    if switch.lower() == "sdnip":
+        pronto("10.128.0.63","admin","admin")
+        cisco("10.128.0.30","admin","onos_test")
+    elif switch.lower() == "pronto":
+        pronto(ip,user,passwd)
+    elif switch.lower() == "cisco":
+        cisco(ip,user,passwd)
diff --git a/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.params b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.params
new file mode 100644
index 0000000..804bc08
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.params
@@ -0,0 +1,21 @@
+<PARAMS>
+   <testcases>1</testcases>
+   <numRoutes>600</numRoutes>
+   <Q1>
+      <net>172</net>
+      <routeRate>20</routeRate>
+      <startNet>1</startNet>
+   </Q1>
+   <Q2>
+      <net>173</net>
+      <routeRate>20</routeRate>
+      <startNet>1</startNet>
+   </Q2>
+   <DP1>
+      <pingIntf>eth0:1</pingIntf>
+   </DP1>
+   <DP2>
+      <pingIntf>eth0:1</pingIntf>
+   </DP2>
+</PARAMS>   
+
diff --git a/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.py b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.py
new file mode 100644
index 0000000..414e15a
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.py
@@ -0,0 +1,65 @@
+class SDNIPRouteTest :
+
+    def __init__(self) :
+        self.default = ''
+
+    def CASE1(self):
+        
+        result = main.Quagga1.enter_config(1)
+        result = result and main.Quagga2.enter_config(2)
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Entered config mode successfully",onfail="Failed to enter config mode")
+    
+        result = main.Dataplane1.create_interfaces(main.params['Q1']['net'],main.params['numRoutes'],main.params['Q1']['startNet'])
+        result = result and main.Dataplane2.create_interfaces(main.params['Q2']['net'],main.params['numRoutes'],main.params['Q2']['startNet'])
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Interfaces created successfully",onfail="Failed to create interfaces")
+    def CASE2(self):
+        import time
+
+        main.log.info('Adding routes into Quagga1 and Quagga2')
+        result = main.Quagga1.add_route(str(main.params['Q1']['net']),int(main.params['numRoutes']),int(main.params['Q1']['routeRate']))
+        result = result and main.Quagga2.add_route(str(main.params['Q2']['net']),int(main.params['numRoutes']),int(main.params['Q2']['routeRate']))
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Added routes successfully",onfail="Failed to add routes")
+
+        main.log.info('Routes added, now waiting 30 seconds')
+        time.sleep(30)
+
+        main.log.info('Dataplane1 pinging all interfaces on Dataplane1')
+        result = main.Dataplane1.pingall_interfaces(main.params['DP1']['pingIntf'],main.params['Q2']['net'],main.params['Q2']['startNet'],main.params['numRoutes'])
+        main.log.info('Dataplane2 pinging all interfaces on Dataplane2')
+        result = result and main.Dataplane2.pingall_interfaces(main.params['DP2']['pingIntf'],main.params['Q1']['net'],main.params['Q1']['startNet'],main.params['numRoutes'])
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Switches properly direct traffic",onfail="Network unable to ping")
+        
+    def CASE3(self):
+        import time
+
+        main.log.info('Removing routes on Quagga1 and Quagga2')
+        result = main.Quagga1.del_route(str(main.params['Q1']['net']),int(main.params['numRoutes']),int(main.params['Q1']['routeRate']))
+        result = result and main.Quagga2.del_route(str(main.params['Q2']['net']),int(main.params['numRoutes']),int(main.params['Q2']['routeRate']))
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Removed routes successfully",onfail="Failed to remove routes")
+
+        main.log.info('Routes removed, now waiting 30 seconds')
+        time.sleep(30)
+
+        main.log.info('Dataplane1 pinging all interfaces on Dataplane1')
+        result = main.Dataplane1.pingall_interfaces(main.params['DP1']['pingIntf'],main.params['Q2']['net'],main.params['Q2']['startNet'],main.params['numRoutes'])
+        main.log.info('Dataplane2 pinging all interfaces on Dataplane2')
+        result = result and main.Dataplane2.pingall_interfaces(main.params['DP2']['pingIntf'],main.params['Q1']['net'],main.params['Q1']['startNet'],main.params['numRoutes'])
+        utilities.assert_equals(expect=main.FALSE,actual=result,onpass="Flows removed properly",onfail="Flows still present")
+
+        '''
+        num_routes = int(main.params['Q1']['numRoutes'])
+        a = str(Q2check)
+        main.log.info("The number of routes checked are" + a)
+        #print Q2check
+        #if Q1check == num_routes:
+        #    main.log.info("all routes added from Quagga1 successfully")
+        #else:
+        #    main.log.info("failed to add routes from Quagga1 fully")
+        if Q2check == num_routes:
+            print "all routes added from Quagga2 successfully"
+        else:
+            print "failed to add routes from Quagga2 fully"
+        #delresult = main.Quagga1.del_route(str(main.params['Q1']['net']),int(main.params['Q1']['numRoutes']),int(main.params['Q1']['routeRate']))
+        delresult = main.Quagga2.del_route(str(main.params['Q2']['net']),int(main.params['Q2']['numRoutes']),int(main.params['Q2']['routeRate'])) 
+        utilities.assert_equals(expect=main.TRUE,actual=delresult,onpass="Deleted routes successfully",onfaile="Failed to delete routes")
+        '''
diff --git a/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.topo b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.topo
new file mode 100644
index 0000000..f58989f
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.topo
@@ -0,0 +1,50 @@
+<TOPOLOGY>
+
+    <COMPONENT>
+        <Quagga1>
+            <host>10.128.100.19</host>
+            <user>sdnip</user>
+            <password>sdnipRocks</password>
+            <type>QuaggaCliDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENT>
+            </COMPONENT>
+        </Quagga1>
+        <Quagga2>
+            <host>10.128.100.20</host>
+            <user>sdnip</user>
+            <password>sdnipRocks</password>
+            <type>QuaggaCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENT>
+            </COMPONENT>
+        </Quagga2>
+        <SDNIP>
+            <host>10.128.100.3</host>
+            <user>sdnip</user>
+            <password>sdnipRocks</password>
+            <type>SDNIPCliDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENT>
+            </COMPONENT>
+        </SDNIP>
+        <Dataplane1>
+            <host>10.128.100.19</host>
+            <user>sdnip</user>
+            <password>sdnipRocks</password>
+            <type>DPCliDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENT>
+            </COMPONENT>
+        </Dataplane1>
+        <Dataplane2>
+            <host>10.128.100.20</host>
+            <user>sdnip</user>
+            <password>sdnipRocks</password>
+            <type>DPCliDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENT>
+            </COMPONENT>
+        </Dataplane2>
+     </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/SDNIPRouteTest/__init__.py b/TestON/tests/SDNIPRouteTest/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/__init__.py
diff --git a/TestON/tests/TimsDeathTest/TimsDeathTest.pyc b/TestON/tests/TimsDeathTest/TimsDeathTest.pyc
deleted file mode 100644
index a731d92..0000000
--- a/TestON/tests/TimsDeathTest/TimsDeathTest.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/TimsDeathTest/__init__.pyc b/TestON/tests/TimsDeathTest/__init__.pyc
deleted file mode 100644
index b23656b..0000000
--- a/TestON/tests/TimsDeathTest/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/testDD/__init__.pyc b/TestON/tests/testDD/__init__.pyc
deleted file mode 100644
index 16a9123..0000000
--- a/TestON/tests/testDD/__init__.pyc
+++ /dev/null
Binary files differ
diff --git a/TestON/tests/testDD/testDD.pyc b/TestON/tests/testDD/testDD.pyc
deleted file mode 100644
index 973430e..0000000
--- a/TestON/tests/testDD/testDD.pyc
+++ /dev/null
Binary files differ