From 55121e63d6e73569045a208d21424d937b8b4bf5 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Tue, 29 Jan 2013 16:25:54 -0500 Subject: [PATCH] correct spelling of Notify in classname fixes bug 1109310 Change-Id: Ida94b51d069f44bcc3e1e24f868dbe46bf136ee1 --- quantum/db/l3_db.py | 16 ++++++++-------- quantum/db/l3_rpc_agent_api.py | 6 +++--- quantum/tests/unit/test_l3_plugin.py | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/quantum/db/l3_db.py b/quantum/db/l3_db.py index f55ac6800..dad346f12 100644 --- a/quantum/db/l3_db.py +++ b/quantum/db/l3_db.py @@ -160,7 +160,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): router_db.update(r) routers = self.get_sync_data(context.elevated(), [router_db['id']]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) return self._make_router_dict(router_db) def _update_router_gw_info(self, context, router_id, info): @@ -249,7 +249,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): self._delete_port(context.elevated(), ports[0]['id']) context.session.delete(router) - l3_rpc_agent_api.L3AgentNofity.router_deleted(context, id) + l3_rpc_agent_api.L3AgentNotify.router_deleted(context, id) def get_router(self, context, id, fields=None): router = self._get_router(context, id) @@ -353,7 +353,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): 'name': ''}}) routers = self.get_sync_data(context.elevated(), [router_id]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) info = {'port_id': port['id'], 'subnet_id': port['fixed_ips'][0]['subnet_id']} notifier_api.notify(context, @@ -431,7 +431,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): raise l3.RouterInterfaceNotFoundForSubnet(router_id=router_id, subnet_id=subnet_id) routers = self.get_sync_data(context.elevated(), [router_id]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) notifier_api.notify(context, notifier_api.publisher_id('network'), 'router.interface.delete', @@ -642,7 +642,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): router_id = floatingip_db['router_id'] if router_id: routers = self.get_sync_data(context.elevated(), [router_id]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) return self._make_floatingip_dict(floatingip_db) def update_floatingip(self, context, id, floatingip): @@ -664,7 +664,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): router_ids.append(router_id) if router_ids: routers = self.get_sync_data(context.elevated(), router_ids) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) return self._make_floatingip_dict(floatingip_db) def delete_floatingip(self, context, id): @@ -677,7 +677,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): l3_port_check=False) if router_id: routers = self.get_sync_data(context.elevated(), [router_id]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) def get_floatingip(self, context, id, fields=None): floatingip = self._get_floatingip(context, id) @@ -724,7 +724,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase): % port_id) if router_id: routers = self.get_sync_data(context.elevated(), [router_id]) - l3_rpc_agent_api.L3AgentNofity.routers_updated(context, routers) + l3_rpc_agent_api.L3AgentNotify.routers_updated(context, routers) def _check_l3_view_auth(self, context, network): return policy.check(context, diff --git a/quantum/db/l3_rpc_agent_api.py b/quantum/db/l3_rpc_agent_api.py index de032d38d..718d9c48e 100644 --- a/quantum/db/l3_rpc_agent_api.py +++ b/quantum/db/l3_rpc_agent_api.py @@ -31,7 +31,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy): topic=topic, default_version=self.BASE_RPC_API_VERSION) def router_deleted(self, context, router_id): - LOG.debug(_('Nofity agent the router %s is deleted'), router_id) + LOG.debug(_('Notify agent the router %s is deleted'), router_id) self.cast(context, self.make_msg('router_deleted', router_id=router_id), @@ -39,7 +39,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy): def routers_updated(self, context, routers): if routers: - LOG.debug(_('Nofity agent routers were updated:\n %s'), + LOG.debug(_('Notify agent routers were updated:\n %s'), jsonutils.dumps(routers, indent=5)) self.cast(context, self.make_msg('routers_updated', @@ -47,4 +47,4 @@ class L3AgentNotifyAPI(proxy.RpcProxy): topic=self.topic) -L3AgentNofity = L3AgentNotifyAPI() +L3AgentNotify = L3AgentNotifyAPI() diff --git a/quantum/tests/unit/test_l3_plugin.py b/quantum/tests/unit/test_l3_plugin.py index 01a0a7e7b..0eebdc537 100644 --- a/quantum/tests/unit/test_l3_plugin.py +++ b/quantum/tests/unit/test_l3_plugin.py @@ -1327,18 +1327,18 @@ class L3NatDBTestCase(test_db_plugin.QuantumDbPluginV2TestCase): def _test_notify_op_agent(self, target_func, *args): l3_rpc_agent_api_str = ( 'quantum.db.l3_rpc_agent_api.L3AgentNotifyAPI') - oldNotify = l3_rpc_agent_api.L3AgentNofity + oldNotify = l3_rpc_agent_api.L3AgentNotify try: with mock.patch(l3_rpc_agent_api_str) as notifyApi: - l3_rpc_agent_api.L3AgentNofity = notifyApi + l3_rpc_agent_api.L3AgentNotify = notifyApi kargs = [item for item in args] kargs.append(notifyApi) target_func(*kargs) except: - l3_rpc_agent_api.L3AgentNofity = oldNotify + l3_rpc_agent_api.L3AgentNotify = oldNotify raise else: - l3_rpc_agent_api.L3AgentNofity = oldNotify + l3_rpc_agent_api.L3AgentNotify = oldNotify def _test_router_gateway_op_agent(self, notifyApi): with self.router() as r: -- 2.45.2