Merge "correct spelling of Notify in classname"

This commit is contained in:
Jenkins 2013-01-30 01:32:39 +00:00 committed by Gerrit Code Review
commit 7a4ca705ce
3 changed files with 15 additions and 15 deletions

View File

@ -160,7 +160,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
router_db.update(r) router_db.update(r)
routers = self.get_sync_data(context.elevated(), routers = self.get_sync_data(context.elevated(),
[router_db['id']]) [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) return self._make_router_dict(router_db)
def _update_router_gw_info(self, context, router_id, info): 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']) self._delete_port(context.elevated(), ports[0]['id'])
context.session.delete(router) 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): def get_router(self, context, id, fields=None):
router = self._get_router(context, id) router = self._get_router(context, id)
@ -353,7 +353,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
'name': ''}}) 'name': ''}})
routers = self.get_sync_data(context.elevated(), [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)
info = {'port_id': port['id'], info = {'port_id': port['id'],
'subnet_id': port['fixed_ips'][0]['subnet_id']} 'subnet_id': port['fixed_ips'][0]['subnet_id']}
notifier_api.notify(context, notifier_api.notify(context,
@ -431,7 +431,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
raise l3.RouterInterfaceNotFoundForSubnet(router_id=router_id, raise l3.RouterInterfaceNotFoundForSubnet(router_id=router_id,
subnet_id=subnet_id) subnet_id=subnet_id)
routers = self.get_sync_data(context.elevated(), [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)
notifier_api.notify(context, notifier_api.notify(context,
notifier_api.publisher_id('network'), notifier_api.publisher_id('network'),
'router.interface.delete', 'router.interface.delete',
@ -642,7 +642,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
router_id = floatingip_db['router_id'] router_id = floatingip_db['router_id']
if router_id: if router_id:
routers = self.get_sync_data(context.elevated(), [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) return self._make_floatingip_dict(floatingip_db)
def update_floatingip(self, context, id, floatingip): def update_floatingip(self, context, id, floatingip):
@ -664,7 +664,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
router_ids.append(router_id) router_ids.append(router_id)
if router_ids: if router_ids:
routers = self.get_sync_data(context.elevated(), 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) return self._make_floatingip_dict(floatingip_db)
def delete_floatingip(self, context, id): def delete_floatingip(self, context, id):
@ -677,7 +677,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
l3_port_check=False) l3_port_check=False)
if router_id: if router_id:
routers = self.get_sync_data(context.elevated(), [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): def get_floatingip(self, context, id, fields=None):
floatingip = self._get_floatingip(context, id) floatingip = self._get_floatingip(context, id)
@ -724,7 +724,7 @@ class L3_NAT_db_mixin(l3.RouterPluginBase):
% port_id) % port_id)
if router_id: if router_id:
routers = self.get_sync_data(context.elevated(), [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): def _check_l3_view_auth(self, context, network):
return policy.check(context, return policy.check(context,

View File

@ -31,7 +31,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy):
topic=topic, default_version=self.BASE_RPC_API_VERSION) topic=topic, default_version=self.BASE_RPC_API_VERSION)
def router_deleted(self, context, router_id): 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.cast(context,
self.make_msg('router_deleted', self.make_msg('router_deleted',
router_id=router_id), router_id=router_id),
@ -39,7 +39,7 @@ class L3AgentNotifyAPI(proxy.RpcProxy):
def routers_updated(self, context, routers): def routers_updated(self, context, routers):
if 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)) jsonutils.dumps(routers, indent=5))
self.cast(context, self.cast(context,
self.make_msg('routers_updated', self.make_msg('routers_updated',
@ -47,4 +47,4 @@ class L3AgentNotifyAPI(proxy.RpcProxy):
topic=self.topic) topic=self.topic)
L3AgentNofity = L3AgentNotifyAPI() L3AgentNotify = L3AgentNotifyAPI()

View File

@ -1327,18 +1327,18 @@ class L3NatDBTestCase(test_db_plugin.QuantumDbPluginV2TestCase):
def _test_notify_op_agent(self, target_func, *args): def _test_notify_op_agent(self, target_func, *args):
l3_rpc_agent_api_str = ( l3_rpc_agent_api_str = (
'quantum.db.l3_rpc_agent_api.L3AgentNotifyAPI') 'quantum.db.l3_rpc_agent_api.L3AgentNotifyAPI')
oldNotify = l3_rpc_agent_api.L3AgentNofity oldNotify = l3_rpc_agent_api.L3AgentNotify
try: try:
with mock.patch(l3_rpc_agent_api_str) as notifyApi: 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 = [item for item in args]
kargs.append(notifyApi) kargs.append(notifyApi)
target_func(*kargs) target_func(*kargs)
except: except:
l3_rpc_agent_api.L3AgentNofity = oldNotify l3_rpc_agent_api.L3AgentNotify = oldNotify
raise raise
else: else:
l3_rpc_agent_api.L3AgentNofity = oldNotify l3_rpc_agent_api.L3AgentNotify = oldNotify
def _test_router_gateway_op_agent(self, notifyApi): def _test_router_gateway_op_agent(self, notifyApi):
with self.router() as r: with self.router() as r: