Skip to content
Snippets Groups Projects
Commit 9ca63226 authored by Bob Lantz's avatar Bob Lantz
Browse files

Remove shared reconnectms, improve self.started

We still need to set it in batchShutdown()
parent 957fe1db
No related branches found
No related tags found
No related merge requests found
...@@ -1273,8 +1273,6 @@ def connected( self ): ...@@ -1273,8 +1273,6 @@ def connected( self ):
class OVSBatch( OVSSwitch ): class OVSBatch( OVSSwitch ):
"Experiment: batch startup of OVS switches" "Experiment: batch startup of OVS switches"
reconnectms = 1000 # shared for all switches
# This should be ~ int( quietRun( 'getconf ARG_MAX' ) ), # This should be ~ int( quietRun( 'getconf ARG_MAX' ) ),
# but the real limit seems to be much lower # but the real limit seems to be much lower
argmax = 128000 argmax = 128000
...@@ -1282,11 +1280,6 @@ class OVSBatch( OVSSwitch ): ...@@ -1282,11 +1280,6 @@ class OVSBatch( OVSSwitch ):
def __init__( self, *args, **kwargs ): def __init__( self, *args, **kwargs ):
self.commands = [] self.commands = []
self.started = False self.started = False
# Use global rather than local reconnectms
reconnectms = kwargs.pop( 'reconnectms', 1000 )
self.__class__.reconnectms = max( reconnectms,
self.__class__.reconnectms )
kwargs.update( reconnectms=None )
super( OVSBatch, self ).__init__( *args, **kwargs ) super( OVSBatch, self ).__init__( *args, **kwargs )
@classmethod @classmethod
...@@ -1316,6 +1309,14 @@ def vsctl( self, *args, **kwargs ): ...@@ -1316,6 +1309,14 @@ def vsctl( self, *args, **kwargs ):
cmd = ' '.join( str( arg ).strip() for arg in args ) cmd = ' '.join( str( arg ).strip() for arg in args )
self.commands.append( cmd ) self.commands.append( cmd )
def start( self, *args, **kwargs ):
super( OVSBatch, self ).start( *args, **kwargs )
self.started = True
def stop( self, *args, **kwargs ):
super( OVSBatch, self ).stop( *args, **kwargs )
self.started = False
def cleanup( self): def cleanup( self):
"Don't bother to clean up" "Don't bother to clean up"
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment