From 4d1a9cdc1dc95595c8390f348d3e0d55c6261756 Mon Sep 17 00:00:00 2001 From: Jon Hall Date: Fri, 25 Apr 2014 04:37:11 +0000 Subject: [PATCH] Add a timeout parameter to the pingAll command --- mininet/cli.py | 4 ++-- mininet/net.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index b2398d2..b432f7c 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -165,9 +165,9 @@ class CLI( Cmd ): # pylint: enable-msg=W0703,W0122 - def do_pingall( self, _line ): + def do_pingall( self, line ): "Ping between all hosts." - self.mn.pingAll() + self.mn.pingAll( line ) def do_pingpair( self, _line ): "Ping between first two hosts, useful for testing." diff --git a/mininet/net.py b/mininet/net.py index 774545c..e7003c3 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -578,10 +578,10 @@ class Mininet( object ): (rttmin, rttavg, rttmax, rttdev) ) return all_outputs - def pingAll( self ): + def pingAll( self, timeout=None ): """Ping between all hosts. returns: ploss packet loss percentage""" - return self.ping() + return self.ping( timeout=timeout ) def pingPair( self ): """Ping between first two hosts, useful for testing.