Fix OVSBridge.set_protocols arg

For native ovsdb_interface compatibility, use a list instead of
a comma separated string for set_protocols argument.  The native
interface failed silently.

Change-Id: Idc6fce9f943b2fe64f668bcfaf9ed40fcf47034c
Closes-Bug: 1597613
This commit is contained in:
IWAMOTO Toshihiro 2016-06-30 14:51:01 +09:00
parent 15aa18673a
commit ce644b821a
2 changed files with 3 additions and 4 deletions
neutron
agent/linux/openvswitch_firewall
cmd/sanity

@ -164,13 +164,13 @@ class SGPortMap(object):
class OVSFirewallDriver(firewall.FirewallDriver):
REQUIRED_PROTOCOLS = ",".join([
REQUIRED_PROTOCOLS = [
ovs_consts.OPENFLOW10,
ovs_consts.OPENFLOW11,
ovs_consts.OPENFLOW12,
ovs_consts.OPENFLOW13,
ovs_consts.OPENFLOW14,
])
]
provides_arp_spoofing_protection = True

@ -335,8 +335,7 @@ def ovs_conntrack_supported():
with ovs_lib.OVSBridge(br_name) as br:
try:
br.set_protocols(
"OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14")
br.set_protocols(["OpenFlow%d" % i for i in range(10, 15)])
except RuntimeError as e:
LOG.debug("Exception while checking ovs conntrack support: %s", e)
return False