From: Carl Baldwin Date: Thu, 26 Feb 2015 23:21:47 +0000 (+0000) Subject: Move create_dvr_fip_interfaces in to DVR X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0eeafab06e1ad969585b695b2b7d92fec5d7e33e;p=openstack-build%2Fneutron-build.git Move create_dvr_fip_interfaces in to DVR 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 --- diff --git a/neutron/agent/l3/dvr_router.py b/neutron/agent/l3/dvr_router.py index 0c9e9139f..449a93ae7 100644 --- a/neutron/agent/l3/dvr_router.py +++ b/neutron/agent/l3/dvr_router.py @@ -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( diff --git a/neutron/agent/l3/router_info.py b/neutron/agent/l3/router_info.py index 43ec8ae86..340b6b4a0 100644 --- a/neutron/agent/l3/router_info.py +++ b/neutron/agent/l3/router_info.py @@ -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