Revision 16c57ddb mininet/node.py

View differences:

mininet/node.py
253 253
        self.dp = datapath
254 254
        Node.__init__(self, name, inNamespace = (datapath == None))
255 255

  
256
    def _startUserDatapath(self, controller):
256
    def _startUserDatapath(self, controllers):
257 257
        '''Start OpenFlow reference user datapath.
258 258

  
259 259
        Log to /tmp/sN-{ofd,ofp}.log.
260 260

  
261
        @param controller Controller object.
261
        @param controllers dict of controller names to objects
262 262
        '''
263
        if 'c0' not in controller:
264
            raise Exception('User datapath start() requires controller c0')
265
        controller = controllers['c0']
263 266
        ofdlog = '/tmp/' + self.name + '-ofd.log'
264 267
        ofplog = '/tmp/' + self.name + '-ofp.log'
265 268
        self.cmd('ifconfig lo up')
......
302 305
            quietRun('ip link del ' + intf)
303 306
            lg.info('.')
304 307

  
305
    def start(self, controller):
308
    def start(self, controllers):
306 309
        '''Start datapath.
307 310

  
308
        @param controller Controller object
311
        @param controllers dict of controller names to objects
309 312
        '''
310 313
        if self.dp is None:
311
            self._startUserDatapath(controller)
314
            self._startUserDatapath(controllers)
312 315
        else:
313 316
            self._startKernelDatapath()
314 317

  

Also available in: Unified diff