]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Move create_dvr_fip_interfaces in to DVR
authorCarl Baldwin <carl.baldwin@hp.com>
Thu, 26 Feb 2015 23:21:47 +0000 (23:21 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Tue, 24 Mar 2015 15:41:45 +0000 (15:41 +0000)
I left this out of the previous patch because it took a little more
work to tease this out and I want comments on this independent of the
other patch.

Change-Id: I7c4a19c5ddd03e8732be60f4437371976a3b6a5a
Partially-Implements: bp/restructure-l3-agent

neutron/agent/l3/dvr_router.py
neutron/agent/l3/router_info.py

index 0c9e9139f1b088736f16f7eeb80c034cca122a3e..449a93ae714254c1cd823c0ab87f26556e8b6462 100644 (file)
@@ -476,6 +476,12 @@ class DvrRouter(router.RouterInfo):
 
         super(DvrRouter, self).perform_snat_action(snat_callback, *args)
 
+    def process_external(self, agent):
+        ex_gw_port = self.get_ex_gw_port()
+        if ex_gw_port:
+            self.create_dvr_fip_interfaces(ex_gw_port)
+        super(DvrRouter, self).process_external(agent)
+
     def create_dvr_fip_interfaces(self, ex_gw_port):
         floating_ips = self.get_floating_ips()
         fip_agent_port = self.get_floating_agent_gw_interface(
index 43ec8ae86081a88a2bac7eea02c1cc0c43a03568..340b6b4a018f18c1d3c6712cc802fccceb0a7c4a 100644 (file)
@@ -499,8 +499,6 @@ class RouterInfo(object):
                     return
 
                 # Process SNAT/DNAT rules and addresses for floating IPs
-                if self.router['distributed']:
-                    self.create_dvr_fip_interfaces(ex_gw_port)
                 self.process_snat_dnat_for_fip()
 
             # Once NAT rules for floating IPs are safely in place