diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-27 17:54:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-27 17:54:59 +0000 |
commit | e883880e15e57ed5f069f8e5e3d89ea710706ba4 (patch) | |
tree | bde63ada9008a31e5488cd277fa2fe59e88e4726 | |
parent | 89700ed3dbfd541d2f8228b018d29dad222cccc6 (diff) | |
parent | 45a523681f2136f8fefb6c3da44540decd6a0fda (diff) | |
download | neutron-e883880e15e57ed5f069f8e5e3d89ea710706ba4.tar.gz |
Merge "Revert "Cleanup floatingips also on router delete""
-rw-r--r-- | neutron/agent/l3_agent.py | 4 | ||||
-rw-r--r-- | neutron/tests/unit/test_l3_agent.py | 10 |
2 files changed, 2 insertions, 12 deletions
diff --git a/neutron/agent/l3_agent.py b/neutron/agent/l3_agent.py index 1dd673f3a3..3452d75aad 100644 --- a/neutron/agent/l3_agent.py +++ b/neutron/agent/l3_agent.py @@ -948,7 +948,7 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback, # Process SNAT/DNAT rules for floating IPs fip_statuses = {} try: - if ex_gw_port or ri.ex_gw_port: + if ex_gw_port: existing_floating_ips = ri.floating_ips self.process_router_floating_ip_nat_rules(ri) ri.iptables_manager.defer_apply_off() @@ -962,7 +962,7 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback, for fip in ri.router.get(l3_constants.FLOATINGIP_KEY, []): fip_statuses[fip['id']] = l3_constants.FLOATINGIP_STATUS_ERROR - if ex_gw_port or ri.ex_gw_port: + if ex_gw_port: # Identify floating IPs which were disabled ri.floating_ips = set(fip_statuses.keys()) for fip_id in existing_floating_ips - ri.floating_ips: diff --git a/neutron/tests/unit/test_l3_agent.py b/neutron/tests/unit/test_l3_agent.py index 8c0d0256f9..40da3628dc 100644 --- a/neutron/tests/unit/test_l3_agent.py +++ b/neutron/tests/unit/test_l3_agent.py @@ -988,17 +988,7 @@ class TestBasicRouterOperations(base.BaseTestCase): del router[l3_constants.INTERFACE_KEY] del router['gw_port'] agent.process_router(ri) - ex_gw_port = agent._get_ex_gw_port(ri) self.assertEqual(self.send_arp.call_count, 1) - agent.process_router_floating_ip_addresses.assert_called_with( - ri, ex_gw_port) - agent.process_router_floating_ip_addresses.reset_mock() - agent.process_router_floating_ip_nat_rules.assert_called_with(ri) - agent.process_router_floating_ip_nat_rules.reset_mock() - - # now no ports no gateway, test state tear down - ri.ex_gw_port = None - agent.process_router(ri) self.assertFalse(agent.process_router_floating_ip_addresses.called) self.assertFalse(agent.process_router_floating_ip_nat_rules.called) |