Revision f32a5468

View differences:

bin/mn
44 44
CONTROLLERDEF = 'ref'
45 45
# a and b are the name and inNamespace params.
46 46
CONTROLLERS = { 'ref': Controller,
47
               'nox_dump': lambda a, b: NOX( a, b, 'packetdump' ),
48
               'nox_pysw': lambda a, b: NOX( a, b, 'pyswitch' ),
49
               'remote': lambda a, b: None,
50
               'none': lambda a, b: None }
47
               'nox_dump': lambda name: NOX( name, 'packetdump' ),
48
               'nox_pysw': lambda name: NOX( name, 'pyswitch' ),
49
               'remote': lambda name: None,
50
               'none': lambda name: None }
51 51

  
52 52
# optional tests to run
53 53
TESTS = [ 'cli', 'build', 'pingAll', 'pingPair', 'iperf', 'all', 'iperfUdp',
mininet/net.py
187 187
    def addController( self, controller ):
188 188
        """Add controller.
189 189
           controller: Controller class"""
190
        controller = self.controller( 'c0', self.inNamespace )
191
        if controller:  # allow controller-less setups
192
            self.controllers.append( controller )
193
            self.nameToNode[ 'c0' ] = controller
190
        controller_new = self.controller( 'c0' )
191
        if controller_new:  # allow controller-less setups
192
            self.controllers.append( controller_new )
193
            self.nameToNode[ 'c0' ] = controller_new
194 194

  
195 195
    # Control network support:
196 196
    #
mininet/node.py
661 661
        """Init.
662 662
           name: name to give controller
663 663
           noxArgs: list of args, or single arg, to pass to NOX"""
664
        if type( noxArgs ) != list:
665
            noxArgs = [ noxArgs ]
666 664
        if not noxArgs:
667 665
            noxArgs = [ 'packetdump' ]
666
        elif type( noxArgs ) != list:
667
            noxArgs = [ noxArgs ]
668 668

  
669 669
        if 'NOX_CORE_DIR' not in os.environ:
670 670
            exit( 'exiting; please set missing NOX_CORE_DIR env var' )

Also available in: Unified diff