Add OVSBatch class (experimental)

This implements batch startup for OVS switches.
This commit is contained in:
Bob Lantz
2015-01-26 14:06:22 -08:00
parent c68e4e76f4
commit 9bda98486d
3 changed files with 87 additions and 30 deletions
+7
View File
@@ -481,6 +481,13 @@ class Mininet( object ):
for switch in self.switches:
info( switch.name + ' ')
switch.start( self.controllers )
started = {}
for swclass, switches in groupby(
sorted( self.switches, key=type ), type ):
switches = tuple( switches )
if ( hasattr( swclass, 'batchStartup' ) and
swclass.batchStartup( switches ) ):
started.update( { s: s for s in switches } )
info( '\n' )
if self.waitConn:
self.waitConnected()