'Notify third party code that an interface is being attached to a
router
:param context: The context of the request.
:param router_db: The router db object having an interface attached.
:param port: The port object being attached to the router.
:param interface_info: The requested interface attachment info passed
to add_router_interface.
:raises: RouterInterfaceAttachmentConflict if a third party code
prevent the port to be attach to the router.'

def _notify_attaching_interface(self, context, router_db, port, interface_info):

    try:
        registry.notify(resources.ROUTER_INTERFACE, events.BEFORE_CREATE, self, context=context, router_db=router_db, port=port, interface_info=interface_info, router_id=router_db.id, network_id=port['network_id'])
    except exceptions.CallbackFailure as e:
        reason = (_('cannot    perform    router    interface    attachment    due    to    %(reason)s') % {'reason': e})
        raise l3.RouterInterfaceAttachmentConflict(reason=reason)
