Merge "Refactored test and increased pingall timeout and sleep"
diff --git a/TestON/tests/CHOtest/CHOtest.params b/TestON/tests/CHOtest/CHOtest.params
index 168d935..1d15bf3 100644
--- a/TestON/tests/CHOtest/CHOtest.params
+++ b/TestON/tests/CHOtest/CHOtest.params
@@ -18,7 +18,7 @@
# 19X. IPv6 ping across Point,Multi-single,Single-Multi Intents
<testcases>
-1,21,[3,41,5,61,72,82,10,5,91,73,83,10,5]*20,200,20,[3,40,5,60,70,80,10,5,90,71,81,10,5]*20,200
+1,20,3,[48,5,60,70,80,10,5,90,71,81,10,5]*10,200,21,3,[47,5,61,72,82,10,5,91,73,83,10,5]*10,200,22,3,[42,5,62,74,84,10,5,92,75,85,10,5]*10
</testcases>
<GIT>
diff --git a/TestON/tests/CHOtest/CHOtest.py b/TestON/tests/CHOtest/CHOtest.py
index dca0585..c3966c5 100644
--- a/TestON/tests/CHOtest/CHOtest.py
+++ b/TestON/tests/CHOtest/CHOtest.py
@@ -696,6 +696,102 @@
onpass="Reactive Mode IPv4 Pingall test PASS",
onfail="Reactive Mode IPv4 Pingall test FAIL" )
+ def CASE47( self, main ):
+ import time
+ main.log.report( "Verify Reactive forwarding" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify pingall, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO1']['numHosts'] )
+ wait = 1
+
+ for i in range(numHosts):
+ src = "h1"
+ dest = "h" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE48( self, main ):
+ import time
+ main.log.report( "Verify Reactive forwarding" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify pingall, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO2']['numHosts'] )
+ wait = 1
+
+ for i in range(numHosts):
+ src = "h1"
+ dest = "h" + str(i+1)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
+ def CASE49( self, main ):
+ import time
+ main.log.report( "Verify Reactive forwarding" )
+ main.log.report( "______________________________________________" )
+ main.case( "Enable Reactive forwarding, verify pingall, and disable reactive forwarding" )
+
+ main.step( "Enable Reactive forwarding" )
+ appResult = main.CLIs[0].activateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully install fwd app",
+ onfail="Failed to install fwd app" )
+
+ numHosts = int( main.params['TOPO3']['numHosts'] )
+ wait = 1
+
+ for i in range(12, numHosts+11):
+ src = "h11"
+ dest = "h" + str(i)
+ main.Mininet1.handle.sendline( src + " ping " + dest + " -c 3 -i 1 -W 1" )
+ main.Mininet1.handle.expect( "mininet>" )
+ main.log.info( main.Mininet1.handle.before )
+
+ hosts = main.CLIs[0].hosts( jsonFormat=False )
+
+ main.log.info( hosts )
+
+ main.step( "Disable Reactive forwarding" )
+ appResult = main.CLIs[0].deactivateApp( "org.onosproject.fwd" )
+ utilities.assert_equals( expect=main.TRUE, actual=appResult,
+ onpass="Successfully deactivated fwd app",
+ onfail="Failed to deactivate fwd app" )
+
def CASE140( self, main ):
"""
Verify IPv6 Reactive forwarding (Att Topology)