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.
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@ from mininet import init, Controller, TreeNet, Cli
|
|||||||
class NoxController( Controller ):
|
class NoxController( Controller ):
|
||||||
def __init__( self, name, **kwargs ):
|
def __init__( self, name, **kwargs ):
|
||||||
Controller.__init__( self, name,
|
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)
|
cdir='/usr/local/bin', **kwargs)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class FatTree( Network ):
|
|||||||
for neighbor in graph.neighbors( miniToGraph[ switch ] ):
|
for neighbor in graph.neighbors( miniToGraph[ switch ] ):
|
||||||
miniNeighbor = graphToMini[ neighbor ]
|
miniNeighbor = graphToMini[ neighbor ]
|
||||||
if miniNeighbor not in currentNeighbors:
|
if miniNeighbor not in currentNeighbors:
|
||||||
print ".", ; flush()
|
print '.', ; flush()
|
||||||
createLink( switch, graphToMini[ neighbor ] )
|
createLink( switch, graphToMini[ neighbor ] )
|
||||||
print
|
print
|
||||||
return switches, hosts
|
return switches, hosts
|
||||||
|
|||||||
+4
-4
@@ -65,6 +65,7 @@ History:
|
|||||||
12/08/09 Kernel datapath support complete
|
12/08/09 Kernel datapath support complete
|
||||||
12/09/09 Moved controller and switch routines into classes
|
12/09/09 Moved controller and switch routines into classes
|
||||||
12/12/09 Added subdivided network driver workflow
|
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
|
from subprocess import call, check_call, Popen, PIPE, STDOUT
|
||||||
@@ -754,7 +755,6 @@ class Cli( object ):
|
|||||||
print node.name,
|
print node.name,
|
||||||
print
|
print
|
||||||
def iperf( self, args ):
|
def iperf( self, args ):
|
||||||
print "iperf: got args", args
|
|
||||||
if len( args ) != 2:
|
if len( args ) != 2:
|
||||||
print "usage: iperf <h1> <h2>"
|
print "usage: iperf <h1> <h2>"
|
||||||
return
|
return
|
||||||
@@ -762,7 +762,7 @@ class Cli( object ):
|
|||||||
if host not in self.nodemap:
|
if host not in self.nodemap:
|
||||||
print "iperf: cannot find host:", host
|
print "iperf: cannot find host:", host
|
||||||
return
|
return
|
||||||
iperf( [ self.nodemap[ h ] for h in args ] )
|
iperf( [ self.nodemap[ h ] for h in args ], verbose=True )
|
||||||
# Interpreter
|
# Interpreter
|
||||||
def run( self ):
|
def run( self ):
|
||||||
"Read and execute commands."
|
"Read and execute commands."
|
||||||
@@ -813,8 +813,8 @@ def init():
|
|||||||
print "*** Mininet must run as root."; exit( 1 )
|
print "*** Mininet must run as root."; exit( 1 )
|
||||||
# If which produces no output, then netns is not in the path.
|
# If which produces no output, then netns is not in the path.
|
||||||
# May want to loosen this to handle netns in the current dir.
|
# May want to loosen this to handle netns in the current dir.
|
||||||
if not quietRun(['which', 'netns']):
|
if not quietRun( [ 'which', 'netns' ] ):
|
||||||
raise Exception("Could not find netns; see INSTALL")
|
raise Exception( "Could not find netns; see INSTALL" )
|
||||||
fixLimits()
|
fixLimits()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user