Skip to content
Snippets Groups Projects
Commit 60a39a72 authored by Brandon Heller's avatar Brandon Heller
Browse files

Add ability to specify hosts for iperf test

parent 1a52deee
No related branches found
No related tags found
No related merge requests found
...@@ -148,8 +148,23 @@ def do_pingpair( self, line ): ...@@ -148,8 +148,23 @@ def do_pingpair( self, line ):
self.mn.pingPair() self.mn.pingPair()
def do_iperf( self, line ): def do_iperf( self, line ):
"Simple iperf TCP test between two hosts." "Simple iperf TCP test between two (optionally specified) hosts."
self.mn.iperf() args = line.split()
if not args:
self.mn.iperf()
elif len(args) == 2:
hosts = []
err = False
for arg in args:
if arg not in self.nodemap:
err = True
error( "node '%s' not in network\n" % arg )
else:
hosts.append( self.nodemap[ arg ] )
if not err:
self.mn.iperf( hosts )
else:
error( 'invalid number of args: iperf src dst\n' )
def do_iperfudp( self, line ): def do_iperfudp( self, line ):
"Simple iperf UDP test between two hosts." "Simple iperf UDP test between two hosts."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment