]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
ofagent: Enable local arp responder for TYPE_FLAT
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Thu, 14 Aug 2014 03:06:53 +0000 (12:06 +0900)
committerYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Tue, 2 Sep 2014 05:09:16 +0000 (14:09 +0900)
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
neutron/tests/unit/ofagent/test_ofa_neutron_agent.py

index 8be7fa5cb4fc424bb3a4c82be5dc6d200c7fc9c5..15a5a71b78740a6e3f3006857892e8484f359a77 100644 (file)
@@ -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,
index b9b83655dc52da5defcfef80b43afba74448e182..3212cf421c3cbae20d203522786639a005ea6e11 100644 (file)
@@ -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