]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove an argument that is never used
authorCarl Baldwin <carl.baldwin@hp.com>
Thu, 9 Oct 2014 20:33:23 +0000 (20:33 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Thu, 9 Oct 2014 20:38:15 +0000 (20:38 +0000)
This code was creating a dict with a gw_exists key.  I was curious to
know who was interested in receiving this information down the line.
However, no one is ever interested in that key.  It took me some time
to follow this through wondering what was going on and found only dead
ends.

Change-Id: I755d9628ab750b950b33f5dcf32ccf2a9b00800e

neutron/db/l3_db.py

index 709c99cb0dd8fd1007ec0edad54bf38bfad059d7..6e67810523564785534bf678db49c70e6c7446b4 100644 (file)
@@ -1041,10 +1041,10 @@ class L3RpcNotifierMixin(object):
         self._l3_rpc_notifier = value
 
     def notify_router_updated(self, context, router_id,
-                              operation=None, data=None):
+                              operation=None):
         if router_id:
             self.l3_rpc_notifier.routers_updated(
-                context, [router_id], operation, data)
+                context, [router_id], operation)
 
     def notify_routers_updated(self, context, router_ids,
                                operation=None, data=None):
@@ -1060,13 +1060,9 @@ class L3_NAT_db_mixin(L3_NAT_dbonly_mixin, L3RpcNotifierMixin):
     """Mixin class to add rpc notifier methods to db_base_plugin_v2."""
 
     def update_router(self, context, id, router):
-        r = router['router']
-        payload = {'gw_exists':
-                   r.get(EXTERNAL_GW_INFO, attributes.ATTR_NOT_SPECIFIED) !=
-                   attributes.ATTR_NOT_SPECIFIED}
         router_dict = super(L3_NAT_db_mixin, self).update_router(context,
                                                                  id, router)
-        self.notify_router_updated(context, router_dict['id'], None, payload)
+        self.notify_router_updated(context, router_dict['id'], None)
         return router_dict
 
     def delete_router(self, context, id):
@@ -1107,7 +1103,7 @@ class L3_NAT_db_mixin(L3_NAT_dbonly_mixin, L3RpcNotifierMixin):
         floatingip_dict = super(L3_NAT_db_mixin, self).create_floatingip(
             context, floatingip, initial_status)
         router_id = floatingip_dict['router_id']
-        self.notify_router_updated(context, router_id, 'create_floatingip', {})
+        self.notify_router_updated(context, router_id, 'create_floatingip')
         return floatingip_dict
 
     def update_floatingip(self, context, id, floatingip):
@@ -1121,7 +1117,7 @@ class L3_NAT_db_mixin(L3_NAT_dbonly_mixin, L3RpcNotifierMixin):
 
     def delete_floatingip(self, context, id):
         router_id = self._delete_floatingip(context, id)
-        self.notify_router_updated(context, router_id, 'delete_floatingip', {})
+        self.notify_router_updated(context, router_id, 'delete_floatingip')
 
     def disassociate_floatingips(self, context, port_id, do_notify=True):
         """Disassociate all floating IPs linked to specific port.