]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
correct spelling of Notify in classname
authorMark McClain <mark.mcclain@dreamhost.com>
Tue, 29 Jan 2013 21:25:54 +0000 (16:25 -0500)
committerMark McClain <mark.mcclain@dreamhost.com>
Tue, 29 Jan 2013 21:25:54 +0000 (16:25 -0500)
fixes bug 1109310

Change-Id: Ida94b51d069f44bcc3e1e24f868dbe46bf136ee1

quantum/db/l3_db.py
quantum/db/l3_rpc_agent_api.py
quantum/tests/unit/test_l3_plugin.py

index f55ac6800b5427786ea38bcef805ab84c870aeaf..dad346f1257ce930f237fb6e6534a0cdcf9b2f44 100644 (file)
@@ -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,
index de032d38d63407cac4d4adbeb0f9b824d9156e95..718d9c48e46b1b064c2be8ff881552037b33da1d 100644 (file)
@@ -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()
index 01a0a7e7b012a291e7f977dbb5529a1640cd5db6..0eebdc5373696435b57bde53b352018bf2e387a2 100644 (file)
@@ -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: