Add result controll in arping function
Change-Id: Ief385955cde7d10ded04d709f3eb9a7920b752ca
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index c198c4f..5a165a2 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1985,7 +1985,7 @@
response = main.FALSE
return response
- def arping( self, srcHost="", dstHost="10.128.20.211", ethDevice="", output=main.TRUE ):
+ def arping( self, srcHost="", dstHost="10.128.20.211", ethDevice="", output=True, noResult=False ):
"""
Description:
Sends arp message from mininet host for hosts discovery
@@ -1997,7 +1997,10 @@
"""
if ethDevice:
ethDevice = '-I ' + ethDevice + ' '
- cmd = srcHost + " arping -c1 " + ethDevice + dstHost
+ cmd = srcHost + " arping -c1 "
+ if noResult:
+ cmd += "-w10 " # If we don't want the actural arping result, set -w10, arping will exit after 10 ms.
+ cmd += ethDevice + dstHost
try:
if output:
main.log.info( "Sending: " + cmd )
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
index b44a3c0..90ec8bf 100755
--- a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
+++ b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.params
@@ -37,7 +37,7 @@
<balance>10</balance>
<nodeSleep>10</nodeSleep>
<pingall>15</pingall>
- <MNsleep>120</MNsleep>
+ <MNsleep>60</MNsleep>
</SLEEP>
<TIMEOUT>
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/topo.py b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/topo.py
index 7a8c0c6..f1101fe 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/topo.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/topo.py
@@ -99,6 +99,7 @@
def sendArpPackage( main, hostList ):
import json
+ import time
"""
send arping package from host
return the total hosts number from Onos
@@ -107,7 +108,8 @@
if isinstance(hostList, list):
threads = []
for h in hostList:
- main.Mininet1.arping( srcHost=h, dstHost="10.0.0.1", output=main.FALSE )
+ main.Mininet1.arping( srcHost=h, dstHost="10.0.0.1", output=main.FALSE, noResult=True )
+ time.sleep(1)
else:
main.Mininet1.arping(srcHost=hostList)
summaryStr = json.loads( main.CLIs[0].summary().encode() )