Merge branch 'master' of https://github.com/OPENNETWORKINGLAB/ONLabTest
diff --git a/TestON/drivers/common/cli/dpclidriver.py b/TestON/drivers/common/cli/dpclidriver.py
new file mode 100644
index 0000000..1cdd281
--- /dev/null
+++ b/TestON/drivers/common/cli/dpclidriver.py
@@ -0,0 +1,149 @@
+'''
+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, destlogin, dest):
+ 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)+"\n >> /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
+ self.handle.sendline("scp /tmp/local_ip.txt "+str(destlogin)+"@"+str(destip)+":/tmp/ip_table"+str(net)+".txt")
+ try:
+ self.handle.expect("100%")
+ return main.TRUE
+ except:
+ self.log.warn("FAILURE SENDING IP TABLE TO DESTINATION MACHINE")
+ return main.FALSE
+
+ '''
+ def remove_interfaces(self, number, start):
+ self.handle.sendline("")
+ self.handle.expect("\$")
+
+ main.log.info("Deleting interfaces")
+ while number != 0:
+ number = number - 1
+ intf = intf + 1
+ self.handle.sendline("sudo ifconfig eth0:"+str(intf)+" down")
+
+ i = self.handle.expect(["\$","password",pexpect.TIMEOUT,pexpect.EOF], timeout = 120)
+ if i == 0:
+ main.log.info("Interfaces deleted")
+ return main.TRUE
+ elif i == 1:
+ main.log.info("Sending sudo password")
+ self.handle.sendline(self.pwd)
+ self.handle.expect("DONE")
+ main.log.info("Interfaces deleted")
+ return main.TRUE
+ else:
+ main.log.error("INTERFACES NOT DELETED")
+ return main.FALSE
+ '''
+
+ def pingall_interfaces(self, netsrc, netstrt, netdst):
+ 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")
+ 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")
+ 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/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.pyc b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.pyc
new file mode 100644
index 0000000..66f7960
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/SDNIPRouteTest.pyc
Binary files differ
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/SDNIPRouteTest/__init__.pyc b/TestON/tests/SDNIPRouteTest/__init__.pyc
new file mode 100644
index 0000000..f4d1871
--- /dev/null
+++ b/TestON/tests/SDNIPRouteTest/__init__.pyc
Binary files differ