Revision 1095628b

View differences:

mininet/mininet.py
344 344
   cmd = 'ip link add name ' + intf1 + ' type veth peer name ' + intf2
345 345
   return checkRun( cmd )
346 346
   
347
def moveIntf( intf, node ):
347
def moveIntf( intf, node, print_error = False ):
348 348
   "Move intf to node."
349 349
   cmd = 'ip link set ' + intf + ' netns ' + `node.pid`
350 350
   quietRun( cmd )
351 351
   links = node.cmd( 'ip link show' )
352 352
   if not intf in links:
353
      print "*** Error: moveIntf:", intf, "not successfully moved to",
354
      print node.name,":"
353
      if print_error:
354
          print "*** Error: moveIntf:", intf, "not successfully moved to",
355
          print node.name,":"
355 356
      return False
356 357
   return True
357 358

  
......
360 361
   tries = 0
361 362
   while not apply( fn, args ) and tries < n:
362 363
      sleep( retry_delay )
363
      print "*** retrying..."; flush()
364 364
      tries += 1
365 365
   if tries >= n: 
366
      print "*** giving up"
366
      print "*** gave up after %i retries" % tries; flush()
367 367
      exit( 1 )
368 368
   
369 369
def createLink( node1, node2 ):

Also available in: Unified diff