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:
Bob Lantz
2015-01-26 18:01:20 -08:00
parent 574d634fc2
commit bdad3e8c8e
4 changed files with 86 additions and 82 deletions
+11 -1
View File
@@ -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 ):