]> 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)
committerCarl Baldwin <carl.baldwin@hp.com>
Wed, 8 Oct 2014 03:22:49 +0000 (03:22 +0000)
The code no longer references the updated_routers and removed_routers
sets.  This should have been cleaned up before but was missed.

Change-Id: I0396e13d2f7c3789928e0c6a4c0a071b02d5ff17

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

index 9f117635bb480168656adf127f6a0a698d44469d..186516b3715c8281d34987599ae923ba6127ca32 100644 (file)
@@ -526,8 +526,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
@@ -1859,12 +1857,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]
@@ -1890,8 +1882,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):