IVSSwitch: support batch shutdown

Not a single command like the OVS one, but it still greatly decreases the
shutdown time.

This does assume that stop() is called after batchShutdown(), which is true in
the current mininet code.
This commit is contained in:
Rich Lane committed 2014-05-22 12:22:41 -07:00
1 parent 5797f5852e
commit 93cd5583eb
1 file changed
+7
+7
View File
@@ -1106,6 +1106,13 @@ class IVSSwitch(Switch):
'not be loaded. Try modprobe openvswitch.\n' )
exit( 1 )
@classmethod
def batchShutdown( cls, switches ):
"Kill each IVS switch, to be waited on later in stop()"
for switch in switches:
if type(switch) == cls:
switch.cmd( 'kill %ivs' )
def start( self, controllers ):
"Start up a new IVS switch"
args = ['ivs']