'Notify the L2pop driver that a port has been wired/unwired.
The L2pop driver uses this notification to broadcast forwarding
entries to other agents on the same network as the port for port_id.'

def notify_l2pop_port_wiring(self, port_id, rpc_context, status, host):

    plugin = directory.get_plugin()
    l2pop_driver = plugin.mechanism_manager.mech_drivers.get('l2population')
    if (not l2pop_driver):
        return
    port = ml2_db.get_port(rpc_context, port_id)
    if (not port):
        return
    if (port['device_owner'] == n_const.DEVICE_OWNER_DVR_INTERFACE):
        return
    port_context = plugin.get_bound_port_context(rpc_context, port_id)
    if (not port_context):
        return
    port = port_context.current
    if ((status == n_const.PORT_STATUS_ACTIVE) and (port[portbindings.HOST_ID] != host) and (not l3_hamode_db.is_ha_router_port(rpc_context, port['device_owner'], port['device_id']))):
        return
    port_context.current['status'] = status
    port_context.current[portbindings.HOST_ID] = host
    if (status == n_const.PORT_STATUS_ACTIVE):
        l2pop_driver.obj.update_port_up(port_context)
    else:
        l2pop_driver.obj.update_port_down(port_context)
