Merge pull request #303 from jhall11/pingall
Add a timeout parameter to the pingAll command
This commit is contained in:
+2
-2
@@ -165,9 +165,9 @@ class CLI( Cmd ):
|
|||||||
|
|
||||||
# pylint: enable-msg=W0703,W0122
|
# pylint: enable-msg=W0703,W0122
|
||||||
|
|
||||||
def do_pingall( self, _line ):
|
def do_pingall( self, line ):
|
||||||
"Ping between all hosts."
|
"Ping between all hosts."
|
||||||
self.mn.pingAll()
|
self.mn.pingAll( line )
|
||||||
|
|
||||||
def do_pingpair( self, _line ):
|
def do_pingpair( self, _line ):
|
||||||
"Ping between first two hosts, useful for testing."
|
"Ping between first two hosts, useful for testing."
|
||||||
|
|||||||
+2
-2
@@ -579,10 +579,10 @@ class Mininet( object ):
|
|||||||
(rttmin, rttavg, rttmax, rttdev) )
|
(rttmin, rttavg, rttmax, rttdev) )
|
||||||
return all_outputs
|
return all_outputs
|
||||||
|
|
||||||
def pingAll( self ):
|
def pingAll( self, timeout=None ):
|
||||||
"""Ping between all hosts.
|
"""Ping between all hosts.
|
||||||
returns: ploss packet loss percentage"""
|
returns: ploss packet loss percentage"""
|
||||||
return self.ping()
|
return self.ping( timeout=timeout )
|
||||||
|
|
||||||
def pingPair( self ):
|
def pingPair( self ):
|
||||||
"""Ping between first two hosts, useful for testing.
|
"""Ping between first two hosts, useful for testing.
|
||||||
|
|||||||
Reference in New Issue
Block a user