Statistics
| Branch: | Tag: | Revision:

mininet / examples / nox.py @ 51270ce4

History | View | Annotate | Download (538 Bytes)

1
#!/usr/bin/python
2

    
3
"Instantiate a Tree network and use NOX as the controller."
4

    
5
from mininet.mininet import init, Controller, TreeNet, Cli
6

    
7
class NoxController( Controller ):
8
   def __init__( self, name, **kwargs ):
9
      Controller.__init__( self, name, 
10
         controller='nox_core',
11
         cargs='--libdir=/usr/local/lib -i ptcp: pyswitch', 
12
         cdir='/usr/local/bin', **kwargs)
13
   
14
if __name__ == '__main__':
15
   init()   
16
   network = TreeNet( depth=2, fanout=4, kernel=True, Controller=NoxController )
17
   network.run( Cli )