'Device is up on agent.'

def update_device_up(self, rpc_context, **kwargs):

    agent_id = kwargs.get('agent_id')
    device = kwargs.get('device')
    host = kwargs.get('host')
    LOG.debug('Device    %(device)s    up    at    agent    %(agent_id)s', {'device': device, 'agent_id': agent_id})
    plugin = directory.get_plugin()
    port_id = plugin._device_to_port_id(rpc_context, device)
    port = plugin.port_bound_to_host(rpc_context, port_id, host)
    if (host and (not port)):
        LOG.debug('Device    %(device)s    not    bound    to    the    agent    host    %(host)s', {'device': device, 'host': host})
        try:
            port = plugin._get_port(rpc_context, port_id)
        except exceptions.PortNotFound:
            LOG.debug('Port    %s    not    found,    will    not    notify    nova.', port_id)
            return
        else:
            if port.device_owner.startswith(n_const.DEVICE_OWNER_COMPUTE_PREFIX):
                plugin.nova_notifier.notify_port_active_direct(port)
                return
    else:
        self.update_port_status_to_active(port, rpc_context, port_id, host)
    self.notify_l2pop_port_wiring(port_id, rpc_context, n_const.PORT_STATUS_ACTIVE, host)
