]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove two sets that are not referenced
authorCarl Baldwin <carl.baldwin@hp.com>
Wed, 8 Oct 2014 03:22:49 +0000 (03:22 +0000)
committerKyle Mestery <mestery@mestery.com>
Mon, 13 Oct 2014 15:52:27 +0000 (15:52 +0000)
The code no longer references the updated_routers and removed_routers
sets.  This should have been cleaned up before but was missed.

Closes-bug: #1232525

Change-Id: I0396e13d2f7c3789928e0c6a4c0a071b02d5ff17
(cherry picked from commit edb26bfcddf9d9a0e95955a6590d11fa7245ea2b)

neutron/agent/l3_agent.py
neutron/tests/unit/test_l3_agent.py

index b3c63eefb746c5f49a1cbc94671de0f4477a83a2..ff8ad47dbc9df2ab367cba1225a9b11b0afbf829 100644 (file)
@@ -523,8 +523,6 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback,
         self.context = context.get_admin_context_without_session()
         self.plugin_rpc = L3PluginApi(topics.L3PLUGIN, host)
         self.fullsync = True
-        self.updated_routers = set()
-        self.removed_routers = set()
         self.sync_progress = False
 
         # Get the list of service plugins from Neutron Server
@@ -1843,12 +1841,6 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback,
         while True:
             pool.spawn_n(self._process_router_update)
 
-    def _process_router_delete(self):
-        current_removed_routers = list(self.removed_routers)
-        for router_id in current_removed_routers:
-            self._router_removed(router_id)
-            self.removed_routers.remove(router_id)
-
     def _router_ids(self):
         if not self.conf.use_namespaces:
             return [self.conf.router_id]
@@ -1874,8 +1866,6 @@ class L3NATAgent(firewall_l3_agent.FWaaSL3AgentRpcCallback,
 
         try:
             router_ids = self._router_ids()
-            self.updated_routers.clear()
-            self.removed_routers.clear()
             timestamp = timeutils.utcnow()
             routers = self.plugin_rpc.get_routers(
                 context, router_ids)
index 3d2d33c52d2eadae3efe4ada3a280db4e9289b3a..8de7922d21027a0d3d78b8a265772674384c820d 100644 (file)
@@ -1765,25 +1765,6 @@ vrrp_instance VR_1 {
         agent.router_added_to_agent(None, [FAKE_ID])
         agent._queue.add.assert_called_once()
 
-    def test_process_router_delete(self):
-        agent = l3_agent.L3NATAgent(HOSTNAME, self.conf)
-        ex_gw_port = {'id': _uuid(),
-                      'network_id': _uuid(),
-                      'fixed_ips': [{'ip_address': '19.4.4.4',
-                                     'subnet_id': _uuid()}],
-                      'subnet': {'cidr': '19.4.4.0/24',
-                                 'gateway_ip': '19.4.4.1'}}
-        router = {
-            'id': _uuid(),
-            'enable_snat': True,
-            'routes': [],
-            'gw_port': ex_gw_port}
-        router['distributed'] = False
-        agent._router_added(router['id'], router)
-        agent.router_deleted(None, router['id'])
-        agent._process_router_delete()
-        self.assertFalse(list(agent.removed_routers))
-
     def test_destroy_fip_namespace(self):
         class FakeDev(object):
             def __init__(self, name):