Revision fb7658c8 mininet.py

View differences:

mininet.py
247 247
   def start( self, controller='controller', args='ptcp:' ):
248 248
      "Start <controller> <args> on controller, logging to /tmp/cN.log"
249 249
      cout = '/tmp/' + self.name + '.log'
250
      self.cmdPrint( 'exec ' + controller + ' ' + args + 
250
      self.cmdPrint( controller + ' ' + args + 
251 251
         ' 1> ' + cout + ' 2> ' + cout + ' &' )
252
      self.execed = True
252
      self.execed = False # XXX Until I fix it
253 253
   def stop( self, controller='controller' ):
254 254
      "Stop controller cprog on controller"
255
      self.cmd( "kill %" + controller )  
255 256
      self.terminate()
256
      # self.cmd( "kill %" + controller )  
257 257
         
258 258
class Switch( Node ):
259 259
   """A Switch is a Node that is running (or has execed)
......
286 286
      self.cmdPrint( 'dpctl adddp ' + self.dp )
287 287
      self.cmdPrint( 'dpctl addif ' + self.dp + ' ' + ' '.join( self.intfs ) )
288 288
      # Become protocol daemon
289
      self.cmdPrint( 'exec ofprotocol' +
289
      self.cmdPrint( 'ofprotocol' +
290 290
         ' ' + self.dp + ' tcp:127.0.0.1 1> ' + ofplog + ' 2>' + ofplog + ' &' )
291
      self.execed = True
291
      self.execed = False # XXX until I fix it
292 292
   def stopKernelDatapath( self ):
293 293
      "Terminate a switch using OpenFlow reference kernel datapath."
294 294
      quietRun( 'dpctl deldp ' + self.dp )
......
299 299
      for intf in self.intfs:
300 300
         quietRun( 'ip link del ' + intf )
301 301
         sys.stdout.write( '.' ) ; flush()
302
      self.terminate()
302
      self.cmd( 'kill %ofprotocol')
303 303
   def start( self, controller ): 
304 304
      if self.dp is None: self.startUserDatapath( controller )
305 305
      else: self.startKernelDatapath( controller )

Also available in: Unified diff