From 9dbb68df9e198b35eafbe11aba61b7742175a4c5 Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Mon, 14 Dec 2009 22:37:19 -0800 Subject: [PATCH] Fixed iperf test. Not sure if I want nox_core -v in nox.py - it's useful for debugging. ripcordtest.py (and grid.py) still depend on routing, which I haven't been able to test yet. --- examples/nox.py | 3 ++- examples/ripcordtest.py | 2 +- mininet.py | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/nox.py b/examples/nox.py index 0280f4c3..233f2a67 100755 --- a/examples/nox.py +++ b/examples/nox.py @@ -7,7 +7,8 @@ class NoxController( Controller ): def __init__( self, name, **kwargs ): Controller.__init__( self, name, - controller='nox_core', cargs='-i ptcp pyswitch', + controller='nox_core', + cargs='--libdir=/usr/local/lib -i ptcp: pyswitch', cdir='/usr/local/bin', **kwargs) if __name__ == '__main__': diff --git a/examples/ripcordtest.py b/examples/ripcordtest.py index 84a64ac3..1eac5de5 100755 --- a/examples/ripcordtest.py +++ b/examples/ripcordtest.py @@ -50,7 +50,7 @@ def makeNet( self, controller ): for neighbor in graph.neighbors( miniToGraph[ switch ] ): miniNeighbor = graphToMini[ neighbor ] if miniNeighbor not in currentNeighbors: - print ".", ; flush() + print '.', ; flush() createLink( switch, graphToMini[ neighbor ] ) print return switches, hosts diff --git a/mininet.py b/mininet.py index 6adc3046..cc484d43 100755 --- a/mininet.py +++ b/mininet.py @@ -65,6 +65,7 @@ 12/08/09 Kernel datapath support complete 12/09/09 Moved controller and switch routines into classes 12/12/09 Added subdivided network driver workflow +12/13/09 Added support for custom controller and switch classes """ from subprocess import call, check_call, Popen, PIPE, STDOUT @@ -754,7 +755,6 @@ def net( self, args ): print node.name, print def iperf( self, args ): - print "iperf: got args", args if len( args ) != 2: print "usage: iperf <h1> <h2>" return @@ -762,7 +762,7 @@ def iperf( self, args ): if host not in self.nodemap: print "iperf: cannot find host:", host return - iperf( [ self.nodemap[ h ] for h in args ] ) + iperf( [ self.nodemap[ h ] for h in args ], verbose=True ) # Interpreter def run( self ): "Read and execute commands." @@ -813,8 +813,8 @@ def init(): print "*** Mininet must run as root."; exit( 1 ) # If which produces no output, then netns is not in the path. # May want to loosen this to handle netns in the current dir. - if not quietRun(['which', 'netns']): - raise Exception("Could not find netns; see INSTALL") + if not quietRun( [ 'which', 'netns' ] ): + raise Exception( "Could not find netns; see INSTALL" ) fixLimits() if __name__ == '__main__': -- GitLab