Skip to content
Snippets Groups Projects
nox.py 538 B
Newer Older
"Instantiate a Tree network and use NOX as the controller."
from mininet.mininet import init, Controller, TreeNet, Cli
class NoxController( Controller ):
   def __init__( self, name, **kwargs ):
      Controller.__init__( self, name, 
Bob Lantz's avatar
Bob Lantz committed
         controller='nox_core',
         cargs='--libdir=/usr/local/lib -i ptcp: pyswitch', 
         cdir='/usr/local/bin', **kwargs)
Bob Lantz's avatar
Bob Lantz committed
   network = TreeNet( depth=2, fanout=4, kernel=True, Controller=NoxController )
   network.run( Cli )