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 )