From: Carl Baldwin Date: Thu, 9 Oct 2014 20:33:23 +0000 (+0000) Subject: Remove an argument that is never used X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=afbe668a9c1dd250be9780eb5320652ee6dec21b;p=openstack-build%2Fneutron-build.git Remove an argument that is never used 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 --- diff --git a/neutron/db/l3_db.py b/neutron/db/l3_db.py index 709c99cb0..6e6781052 100644 --- a/neutron/db/l3_db.py +++ b/neutron/db/l3_db.py @@ -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.