From bbf94cdb638cd856f8f4485d9e486da5c0417ca4 Mon Sep 17 00:00:00 2001 From: cody burkard Date: Mon, 17 Nov 2014 17:55:06 -0800 Subject: [PATCH] use rcmd instead of quietRun when shutting down remote nodes --- examples/cluster.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/cluster.py b/examples/cluster.py index b81bbc9..0aaf4ee 100755 --- a/examples/cluster.py +++ b/examples/cluster.py @@ -255,6 +255,13 @@ class RemoteMixin( object ): return super( RemoteMixin, self).addIntf( *args, moveIntfFn=RemoteLink.moveIntf, **kwargs ) + def cleanup( self ): + "Help python collect its garbage." + # Intfs may end up in root NS + for intfName in self.intfNames(): + if self.name in intfName: + self.rcmd( 'ip link del ' + intfName ) + self.shell = None class RemoteNode( RemoteMixin, Node ): "A node on a remote server"