- Adds a ping test to all router interfaces
- Adds a defualt routing rules in three hosts in mininet script
diff --git a/TestON/tests/PeeringRouterTest/PeeringRouterTest.py b/TestON/tests/PeeringRouterTest/PeeringRouterTest.py
index 1f9f7ad..cddea0a 100755
--- a/TestON/tests/PeeringRouterTest/PeeringRouterTest.py
+++ b/TestON/tests/PeeringRouterTest/PeeringRouterTest.py
@@ -391,6 +391,19 @@
#============================= Ping Test ========================
pingTestResults = main.TRUE
+ sources = ["as2host", "as3host", "as6host"]
+ targets = ["192.168.10.101", "192.168.20.101", "192.168.30.101", "192.168.60.101"]
+ for source in sources:
+ for target in targets:
+ r = main.Mininet.pingHost(SRC=source, TARGET=target)
+ if r == main.FALSE:
+ pingTestResults = main.FALSE
+
+ utilities.assert_equals(expect=main.TRUE,actual=pingTestResults,
+ onpass="Router connectivity check PASS",
+ onfail="Router connectivity check FAIL")
+
+ pingTestResults = main.TRUE
for m in range( 3, 6 ):
for n in range( 1, 10 ):
hostIp = str( m ) + ".0." + str( n ) + ".1"
@@ -440,10 +453,18 @@
onpass="disconnect check PASS",
onfail="disconnect check FAIL")
+
+ time.sleep(20);
+
main.ONOScli.logout()
+ main.log.info("ONOS cli logout")
+ time.sleep(20);
main.ONOSbench.onosStop(ONOS1Ip);
+ main.log.info("onos stop")
+ time.sleep(20);
main.Mininet.stopNet()
- time.sleep(10)
+ main.log.info("mininet stop")
+ time.sleep(20)
def CASE7( self, main ):
diff --git a/TestON/tests/PeeringRouterTest/vlan/mininet/PeeringRouterMininetVlan.py b/TestON/tests/PeeringRouterTest/vlan/mininet/PeeringRouterMininetVlan.py
index 1f9ea74..c059c1a 100755
--- a/TestON/tests/PeeringRouterTest/vlan/mininet/PeeringRouterMininetVlan.py
+++ b/TestON/tests/PeeringRouterTest/vlan/mininet/PeeringRouterMininetVlan.py
@@ -262,6 +262,7 @@
host3.setIP('1.168.30.2', 24, 'host3-eth3')
host3.cmd('sysctl net.ipv4.conf.all.arp_ignore=1')
host3.cmd('sysctl net.ipv4.conf.all.arp_announce=1')
+ host3.cmd('ip route add default via 192.168.10.101')
as2host = net.get('as2host')
#as2host.defaultIntf().setIP('172.16.20.1/24')
for i in range(0, 20):
@@ -275,6 +276,7 @@
host4.setIP('4.0.0.254', 8, 'host4-eth1')
host4.setMAC('00:00:00:00:03:99', 'host4-eth1')
host4.cmd('sysctl net.ipv4.conf.all.forwarding=1')
+ host4.cmd('ip route add default via 192.168.30.101')
as3host = net.get('as3host')
for i in range(0, 20):
as3host.cmd('sudo ip addr add 4.0.%d.1/24 dev as3host-eth0' %i)
@@ -308,7 +310,7 @@
host5.cmd('sysctl net.ipv4.conf.all.forwarding=1')
host5.setIP('1.168.30.5', 24, 'host5-eth2')
host5.setMAC('00:00:00:00:06:05', 'host5-eth2')
-
+ host5.cmd('ip route add default via 192.168.60.101')
as6host = net.get('as6host')
#as6host.defaultIntf().setIP('5.0.0.1/24')
for i in range(0, 10):