Find the host for the router being notified and then
dispatches a notification for the VPN device driver.
"""
- admin_context = context.is_admin and context or context.elevated()
+ admin_context = context if context.is_admin else context.elevated()
if not version:
version = self.RPC_API_VERSION
- host = via_cfg_file.get_host_for_router(admin_context, router_id)
- if not host:
- # NOTE: This is a config error for workaround. At this point we
- # can't set state of resource to error.
- return
+ host = self.driver.l3_plugin.get_host_for_router(admin_context,
+ router_id)
LOG.debug('Notify agent at %(topic)s.%(host)s the message '
'%(method)s %(args)s for router %(router)s',
{'topic': self.topic,