Implement Switch.stop(), which doesn't call terminate
When I changed the switch implementations to call super().stop(), I neglected to include a Switch.stop() method which didn't call terminate(). This broke switch s1 stop and s1.stop(). Fixes #497
This commit is contained in:
@@ -901,6 +901,12 @@ class Switch( Node ):
|
|||||||
debug( 'Assuming', repr( self ), 'is connected to a controller\n' )
|
debug( 'Assuming', repr( self ), 'is connected to a controller\n' )
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def stop( self, deleteIntfs=True ):
|
||||||
|
"""Stop switch
|
||||||
|
deleteIntfs: delete interfaces? (True)"""
|
||||||
|
if deleteIntfs:
|
||||||
|
self.deleteIntfs()
|
||||||
|
|
||||||
def __repr__( self ):
|
def __repr__( self ):
|
||||||
"More informative string representation"
|
"More informative string representation"
|
||||||
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
||||||
|
|||||||
Reference in New Issue
Block a user