MCPcopy Create free account
hub / github.com/mininet/mininet / __init__

Method __init__

mininet/node.py:1511–1532  ·  view source on GitHub ↗

Init. name: name to give controller noxArgs: arguments (strings) to pass to NOX

( self, name, *noxArgs, **kwargs )

Source from the content-addressed store, hash-verified

1509 "Controller to run a NOX application."
1510
1511 def __init__( self, name, *noxArgs, **kwargs ):
1512 """Init.
1513 name: name to give controller
1514 noxArgs: arguments (strings) to pass to NOX"""
1515 if not noxArgs:
1516 warn( 'warning: no NOX modules specified; '
1517 'running packetdump only\n' )
1518 noxArgs = [ 'packetdump' ]
1519 elif not isinstance( noxArgs, ( list, tuple ) ):
1520 noxArgs = [ noxArgs ]
1521
1522 if 'NOX_CORE_DIR' not in os.environ:
1523 exit( 'exiting; please set missing NOX_CORE_DIR env var' )
1524 noxCoreDir = os.environ[ 'NOX_CORE_DIR' ]
1525
1526 Controller.__init__( self, name,
1527 command=noxCoreDir + '/nox_core',
1528 cargs='--libdir=/usr/local/lib -v '
1529 '-i ptcp:%s ' +
1530 ' '.join( noxArgs ),
1531 cdir=noxCoreDir,
1532 **kwargs )
1533
1534class Ryu( Controller ):
1535 "Ryu OpenFlow Controller"

Callers 10

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected