Skip to content
Snippets Groups Projects
Commit 84ce84f5 authored by Gregory Gee's avatar Gregory Gee
Browse files

Add parameter to set protocol list in OVSSwitch. Allows setting OpenFlow version.

    s2 = net.addSwitch( 's2', protocols='OpenFlow13' )
parent 5b089770
No related branches found
No related tags found
No related merge requests found
......@@ -993,7 +993,7 @@ class OVSSwitch( Switch ):
"Open vSwitch switch. Depends on ovs-vsctl."
def __init__( self, name, failMode='secure', datapath='kernel',
inband=False, **params ):
inband=False, protocols=None, **params ):
"""Init.
name: name for switch
failMode: controller loss behavior (secure|open)
......@@ -1003,6 +1003,7 @@ def __init__( self, name, failMode='secure', datapath='kernel',
self.failMode = failMode
self.datapath = datapath
self.inband = inband
self.protocols = protocols
@classmethod
def setup( cls ):
......@@ -1120,6 +1121,8 @@ def start( self, controllers ):
'other-config:disable-in-band=true ' % self )
if self.datapath == 'user':
cmd += '-- set bridge %s datapath_type=netdev ' % self
if self.protocols:
cmd += '-- set bridge %s protocols=%s' % ( self, self.protocols )
# Reconnect quickly to controllers (1s vs. 15s max_backoff)
for uuid in self.controllerUUIDs():
if uuid.count( '-' ) != 4:
......
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