From 162611c57a9787f171772fa3b105fbeb147f8ce6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 14 Aug 2014 12:06:53 +0900 Subject: [PATCH] ofagent: Enable local arp responder for TYPE_FLAT handling TYPE_FLAT is particularly useful because, as stated in README, a flat provider network is the recommended way to provide public network connectivity for ofagent. Related: blueprint ofagent-l2pop Related: blueprint ofagent-merge-bridges Change-Id: I4f9145ecb6ade44fc884ce7f8842f5e33385391e --- neutron/plugins/ofagent/agent/ofa_neutron_agent.py | 3 ++- neutron/tests/unit/ofagent/test_ofa_neutron_agent.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py index 8be7fa5cb..15a5a71b7 100644 --- a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py +++ b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py @@ -224,7 +224,8 @@ class OFANeutronAgent(n_rpc.RpcCallback, ofa_const.LOCAL_VLAN_MAX)) self.tunnel_types = tunnel_types or [] l2pop_network_types = list(set(self.tunnel_types + - [p_const.TYPE_VLAN])) + [p_const.TYPE_VLAN, + p_const.TYPE_FLAT])) self.agent_state = { 'binary': 'neutron-ofa-agent', 'host': cfg.CONF.host, diff --git a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py index b9b83655d..3212cf421 100644 --- a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py +++ b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py @@ -683,6 +683,9 @@ class TestOFANeutronAgent(ofa_test_base.OFAAgentTestBase): def test_add_arp_table_entry_vlan(self): self._test_add_arp_table_entry_non_tunnel('vlan') + def test_add_arp_table_entry_flat(self): + self._test_add_arp_table_entry_non_tunnel('flat') + def test_del_arp_table_entry(self): self._prepare_l2_pop_ofports() fdb_entry = {self.lvms[0].net: @@ -730,6 +733,9 @@ class TestOFANeutronAgent(ofa_test_base.OFAAgentTestBase): def test_del_arp_table_entry_vlan(self): self._test_del_arp_table_entry_non_tunnel('vlan') + def test_del_arp_table_entry_flat(self): + self._test_del_arp_table_entry_non_tunnel('flat') + def test_recl_lv_port_to_preserve(self): self._prepare_l2_pop_ofports() self.agent.enable_tunneling = True -- 2.45.2