Merge OVSBatch into OVSSwitch
Note that we are changing the interface of batchStartup/Shutdown slightly so that the method can choose not to start some of the switches. We might wish to refine this a bit...
This commit is contained in:
+11
-1
@@ -280,6 +280,11 @@ class RemoteOVSSwitch( RemoteMixin, OVSSwitch ):
|
||||
|
||||
OVSVersions = {}
|
||||
|
||||
def __init__( self, *args, **kwargs ):
|
||||
# No batch startup yet
|
||||
kwargs.update( batch=False )
|
||||
super( RemoteOVSSwitch, self ).__init__( *args, **kwargs )
|
||||
|
||||
def isOldOVS( self ):
|
||||
"Is remote switch using an old OVS version?"
|
||||
cls = type( self )
|
||||
@@ -292,10 +297,15 @@ class RemoteOVSSwitch( RemoteMixin, OVSSwitch ):
|
||||
return ( StrictVersion( cls.OVSVersions[ self.server ] ) <
|
||||
StrictVersion( '1.10' ) )
|
||||
|
||||
@classmethod
|
||||
def batchStartup( cls, *_args, **_kwargs ):
|
||||
"Not implemented yet"
|
||||
return [] # no switches started
|
||||
|
||||
@classmethod
|
||||
def batchShutdown( cls, *_args, **_kwargs ):
|
||||
"Not implemented yet"
|
||||
return False
|
||||
return [] # no switchest stopped
|
||||
|
||||
|
||||
class RemoteLink( Link ):
|
||||
|
||||
Reference in New Issue
Block a user