+8
-2
@@ -956,14 +956,17 @@ class OVSLegacyKernelSwitch( Switch ):
|
|||||||
class OVSSwitch( Switch ):
|
class OVSSwitch( Switch ):
|
||||||
"Open vSwitch switch. Depends on ovs-vsctl."
|
"Open vSwitch switch. Depends on ovs-vsctl."
|
||||||
|
|
||||||
def __init__( self, name, failMode='secure', datapath='kernel', **params ):
|
def __init__( self, name, failMode='secure', datapath='kernel',
|
||||||
|
inband=False, **params ):
|
||||||
"""Init.
|
"""Init.
|
||||||
name: name for switch
|
name: name for switch
|
||||||
failMode: controller loss behavior (secure|open)
|
failMode: controller loss behavior (secure|open)
|
||||||
datapath: userspace or kernel mode (kernel|user)"""
|
datapath: userspace or kernel mode (kernel|user)
|
||||||
|
inband: use in-band control (False)"""
|
||||||
Switch.__init__( self, name, **params )
|
Switch.__init__( self, name, **params )
|
||||||
self.failMode = failMode
|
self.failMode = failMode
|
||||||
self.datapath = datapath
|
self.datapath = datapath
|
||||||
|
self.inband = inband
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup( cls ):
|
def setup( cls ):
|
||||||
@@ -1056,6 +1059,9 @@ class OVSSwitch( Switch ):
|
|||||||
for c in controllers ] )
|
for c in controllers ] )
|
||||||
if self.listenPort:
|
if self.listenPort:
|
||||||
clist += ' ptcp:%s' % self.listenPort
|
clist += ' ptcp:%s' % self.listenPort
|
||||||
|
if not self.inband:
|
||||||
|
self.cmd( 'ovs-vsctl set bridge', self,
|
||||||
|
'other-config:disable-in-band=true' )
|
||||||
self.cmd( 'ovs-vsctl set-controller', self, clist )
|
self.cmd( 'ovs-vsctl set-controller', self, clist )
|
||||||
# Reconnect quickly to controllers (1s vs. 15s max_backoff)
|
# Reconnect quickly to controllers (1s vs. 15s max_backoff)
|
||||||
for uuid in self.controllerUUIDs():
|
for uuid in self.controllerUUIDs():
|
||||||
|
|||||||
Reference in New Issue
Block a user