From b0d16a0898730abe5b39257f7d02a753029af168 Mon Sep 17 00:00:00 2001 From: IWAMOTO Toshihiro Date: Thu, 30 Jun 2016 14:51:01 +0900 Subject: [PATCH] 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 (cherry picked from commit ce644b821ad1b86120f47633816eaef8c2c1235e) --- neutron/agent/linux/openvswitch_firewall/firewall.py | 4 ++-- neutron/cmd/sanity/checks.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/neutron/agent/linux/openvswitch_firewall/firewall.py b/neutron/agent/linux/openvswitch_firewall/firewall.py index fbdf86c9d11..36e753b5d21 100644 --- a/neutron/agent/linux/openvswitch_firewall/firewall.py +++ b/neutron/agent/linux/openvswitch_firewall/firewall.py @@ -163,13 +163,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 diff --git a/neutron/cmd/sanity/checks.py b/neutron/cmd/sanity/checks.py index 21eb5aca7c1..1b74a5bf106 100644 --- a/neutron/cmd/sanity/checks.py +++ b/neutron/cmd/sanity/checks.py @@ -338,8 +338,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