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

Method deleteIntfs

mininet/node.py:515–527  ·  view source on GitHub ↗

Delete all of our interfaces. checkName: only delete interfaces that contain our name

( self, checkName=True )

Source from the content-addressed store, hash-verified

513 return connections
514
515 def deleteIntfs( self, checkName=True ):
516 """Delete all of our interfaces.
517 checkName: only delete interfaces that contain our name"""
518 # In theory the interfaces should go away after we shut down.
519 # However, this takes time, so we're better off removing them
520 # explicitly so that we won't get errors if we run before they
521 # have been removed by the kernel. Unfortunately this is very slow,
522 # at least with Linux kernels before 2.6.33
523 for intf in list( self.intfs.values() ):
524 # Protect against deleting hardware interfaces
525 if ( self.name in intf.name ) or ( not checkName ):
526 intf.delete()
527 info( '.' )
528
529 # Routing support
530

Callers 4

stopMethod · 0.95
scratchNetFunction · 0.95
scratchNetUserFunction · 0.95
stopMethod · 0.80

Calls 2

valuesMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected