Stub out RemoteOVSSwitch.batchShutdown()
Eventually we should implement true batch shutdown. In the mean time, we just ignore it. Note there's no good way that I know of for a subclass to remove a superclass method, so we changed the protocol a bit to require a return value of True.
This commit is contained in:
@@ -292,6 +292,11 @@ class RemoteOVSSwitch( RemoteMixin, OVSSwitch ):
|
|||||||
return ( StrictVersion( cls.OVSVersions[ self.server ] ) <
|
return ( StrictVersion( cls.OVSVersions[ self.server ] ) <
|
||||||
StrictVersion( '1.10' ) )
|
StrictVersion( '1.10' ) )
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def batchShutdown( cls, *args, **kwargs ):
|
||||||
|
"Not implemented yet"
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class RemoteLink( Link ):
|
class RemoteLink( Link ):
|
||||||
"A RemoteLink is a link between nodes which may be on different servers"
|
"A RemoteLink is a link between nodes which may be on different servers"
|
||||||
|
|||||||
+2
-2
@@ -505,8 +505,8 @@ class Mininet( object ):
|
|||||||
for swclass, switches in groupby(
|
for swclass, switches in groupby(
|
||||||
sorted( self.switches, key=type ), type ):
|
sorted( self.switches, key=type ), type ):
|
||||||
switches = tuple( switches )
|
switches = tuple( switches )
|
||||||
if hasattr( swclass, 'batchShutdown' ):
|
if ( hasattr( swclass, 'batchShutdown' ) and
|
||||||
swclass.batchShutdown( switches )
|
swclass.batchShutdown( switches ) ):
|
||||||
stopped.update( { s: s for s in switches } )
|
stopped.update( { s: s for s in switches } )
|
||||||
for switch in self.switches:
|
for switch in self.switches:
|
||||||
info( switch.name + ' ' )
|
info( switch.name + ' ' )
|
||||||
|
|||||||
@@ -1103,6 +1103,7 @@ class OVSSwitch( Switch ):
|
|||||||
quietRun( 'ovs-vsctl ' +
|
quietRun( 'ovs-vsctl ' +
|
||||||
' -- '.join( '--if-exists del-br %s' % s
|
' -- '.join( '--if-exists del-br %s' % s
|
||||||
for s in switches ) )
|
for s in switches ) )
|
||||||
|
return True
|
||||||
|
|
||||||
def dpctl( self, *args ):
|
def dpctl( self, *args ):
|
||||||
"Run ovs-ofctl command"
|
"Run ovs-ofctl command"
|
||||||
|
|||||||
Reference in New Issue
Block a user