Fixed typo mininetclidriver | updated params and topo file in CHO
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 0d27b43..9428c21 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -265,69 +265,78 @@
Returns:
main.TRUE if pingall completes with no pings dropped
otherwise main.FALSE"""
- if self.handle:
- main.log.info(
- self.name +
- ": Checking reachabilty to the hosts using pingall" )
- response = ""
- failedPings = 0
- returnValue = main.TRUE
- self.handle.sendline( "pingall" )
- while True:
- i = self.handle.expect( [ "mininet>","X",
- pexpect.EOF,
- pexpect.TIMEOUT ],
- timeout )
- if i == 0:
- main.log.info( self.name + ": pingall finished")
- response += self.handle.before
- break
- elif i == 1:
- response += self.handle.before + self.handle.after
- failedPings = failedPings + 1
- if failedPings >= acceptableFailed:
- returnValue = main.FALSE
- if shortCircuit:
- main.log.error( self.name +
- ": Aborting pingall - "
- + str( failedPings ) +
- " pings failed" )
- break
- elif i == 2:
- main.log.error( self.name +
- ": EOF exception found" )
- main.log.error( self.name + ": " +
- self.handle.before )
- main.cleanup()
- main.exit()
- elif i == 3:
- response += self.handle.before
- main.log.error( self.name +
- ": TIMEOUT exception found" )
- main.log.error( self.name +
- ": " +
- str( response ) )
+ try:
+ if self.handle:
+ main.log.info(
+ self.name +
+ ": Checking reachabilty to the hosts using pingall" )
+ response = ""
+ failedPings = 0
+ returnValue = main.TRUE
+ self.handle.sendline( "pingall" )
+ while True:
+ i = self.handle.expect( [ "mininet>","X",
+ pexpect.EOF,
+ pexpect.TIMEOUT ],
+ timeout )
+ if i == 0:
+ main.log.info( self.name + ": pingall finished")
+ response += self.handle.before
+ break
+ elif i == 1:
+ response += self.handle.before + self.handle.after
+ failedPings = failedPings + 1
+ if failedPings >= acceptableFailed:
+ returnValue = main.FALSE
+ if shortCircuit:
+ main.log.error( self.name +
+ ": Aborting pingall - "
+ + str( failedPings ) +
+ " pings failed" )
+ break
+ elif i == 2:
+ main.log.error( self.name +
+ ": EOF exception found" )
+ main.log.error( self.name + ": " +
+ self.handle.before )
+ main.cleanup()
+ main.exit()
+ elif i == 3:
+ response += self.handle.before
+ main.log.error( self.name +
+ ": TIMEOUT exception found" )
+ main.log.error( self.name +
+ ": " +
+ str( response ) )
+ # NOTE: Send ctrl-c to make sure pingall is done
+ self.handle.sendline( "\x03" )
+ self.handle.expect( "Interrupt" )
+ self.handle.expect( "mininet>" )
+ break
+ pattern = "Results\:"
+ main.log.info( "Pingall output: " + str( response ) )
+ if re.search( pattern, response ):
+ main.log.info( self.name + ": Pingall finished with "
+ + str( failedPings ) + " failed pings" )
+ return returnValue
+ else:
# NOTE: Send ctrl-c to make sure pingall is done
- self.handle.send( "\x03" )
+ self.handle.sendline( "\x03" )
self.handle.expect( "Interrupt" )
- self.handle.send( "" )
self.handle.expect( "mininet>" )
- break
- pattern = "Results\:"
- main.log.info( "Pingall output: " + str( response ) )
- if re.search( pattern, response ):
- main.log.info( self.name + ": Pingall finished with "
- + str( failedPings ) + " failed pings" )
- return returnValue
+ return main.FALSE
else:
- # NOTE: Send ctrl-c to make sure pingall is done
- self.handle.send( "\x03" )
- self.handle.expect( "Interrupt" )
- self.handle.send( "" )
- self.handle.expect( "mininet>" )
- return main.FALSE
- else:
- main.log.error( self.name + ": Connection failed to the host" )
+ main.log.error( self.name + ": Connection failed to the host" )
+ main.cleanup()
+ main.exit()
+ except pexpect.TIMEOUT:
+ if response:
+ main.log.info( "Pingall output: " + str( response ) )
+ main.log.error( self.name + ": pexpect.TIMEOUT found" )
+ return main.FALSE
+ except pexpect.EOF:
+ main.log.error( self.name + ": EOF exception found" )
+ main.log.error( self.name + ": " + self.handle.before )
main.cleanup()
main.exit()
diff --git a/TestON/tests/OnosCHO/OnosCHO.params b/TestON/tests/OnosCHO/OnosCHO.params
index fe9d90d..a91e17c 100644
--- a/TestON/tests/OnosCHO/OnosCHO.params
+++ b/TestON/tests/OnosCHO/OnosCHO.params
@@ -1,5 +1,5 @@
<PARAMS>
- #CHO sequence : 1,20,[3,40,5,60,70,80,10,90,71,81,10,93,10]*50,22,[3,41,5,61,72,82,10,91,73,83,10,94,10]*50,22,[3,42,5,62,10,92,10]*50
+ # 1,20,3,[40,5,60,70,80,10,90,71,81,10,93,10]*50,22,3,[41,5,61,72,82,10,91,73,83,10,94,10]*50,22,3,[42,5,62,10,92,10]*50
# 1. ONOS brinup Test case
# 2. Assign and Balance all Mininet switches across controllers
# 3. Collect reference toplogy for topo compare
@@ -11,7 +11,7 @@
# 9. Install 300 point intents and verify ping all
# 10. Remove all intents on ONOS
- <testcases>1,20,3,93,70,80,10</testcases>
+ <testcases>1,20,3,[40,5,60,70,80,10,90,71,81,10,93,10]*50,22,3,[41,5,61,72,82,10,91,73,83,10,94,10]*50,22,3,[42,5,62,10,92,10]*50</testcases>
<ENV>
<cellName>choTest5</cellName>
</ENV>
@@ -21,7 +21,7 @@
<branch>master</branch>
</GIT>-t
<TOPO1>
- <topo>~/mininet/custom/topoAtt.py</topo>t
+ <topo>~/mininet/custom/topoAtt.py</topo>
<numSwitches>25</numSwitches>
<numHosts>25</numHosts>
<numLinks>114</numLinks>
@@ -84,8 +84,8 @@
</SPINECORELINKS>
<timers>
- <LinkDiscovery>5</LinkDiscovery>
- <SwitchDiscovery>31</SwitchDiscovery>
+ <LinkDiscovery>1</LinkDiscovery>
+ <SwitchDiscovery>1</SwitchDiscovery>
</timers>
</PARAMS>
diff --git a/TestON/tests/OnosCHO/OnosCHO.py b/TestON/tests/OnosCHO/OnosCHO.py
index 37f7f66..cd70c80 100644
--- a/TestON/tests/OnosCHO/OnosCHO.py
+++ b/TestON/tests/OnosCHO/OnosCHO.py
@@ -1936,7 +1936,7 @@
def CASE94( self ):
"""
Install multi-single point intents and verify Ping all works
- for spine topology
+ for Chordal topology
"""
import copy
import time
diff --git a/TestON/tests/OnosCHO/OnosCHO.topo b/TestON/tests/OnosCHO/OnosCHO.topo
index d215937..9b0c3e7 100644
--- a/TestON/tests/OnosCHO/OnosCHO.topo
+++ b/TestON/tests/OnosCHO/OnosCHO.topo
@@ -116,20 +116,6 @@
<controller> remote </controller>
</COMPONENTS>
</Mininet1>
-
- <Mininet2>
- <host>10.128.40.50</host>
- <user>admin</user>
- <password>onos_test</password>
- <type>RemoteMininetDriver</type>
- <connect_order>13</connect_order>
- <COMPONENTS>
- #Specify the Option for mininet
- <arg1> --custom ~/mininet/custom/att-mpls-topo.py </arg1>
- <arg2> --topo att </arg2>
- <arg3> --link tc --switch ovs,protocols=OpenFlow13 </arg3>
- <controller> remote </controller>
- </COMPONENTS>
- </Mininet2>
</COMPONENT>
+
</TOPOLOGY>