'Device no longer exists on agent.'

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

    agent_id = kwargs.get('agent_id')
    device = kwargs.get('device')
    host = kwargs.get('host')
    LOG.debug('Device    %(device)s    no    longer    exists    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_exists = True
    if (host and (not plugin.port_bound_to_host(rpc_context, port_id, host))):
        LOG.debug('Device    %(device)s    not    bound    to    the    agent    host    %(host)s', {'device': device, 'host': host})
    else:
        try:
            port_exists = bool(plugin.update_port_status(rpc_context, port_id, n_const.PORT_STATUS_DOWN, host))
        except exc.StaleDataError:
            port_exists = False
            LOG.debug('delete_port    and    update_device_down    are    being    executed    concurrently.    Ignoring    StaleDataError.')
            return {'device': device, 'exists': port_exists}
    self.notify_l2pop_port_wiring(port_id, rpc_context, n_const.PORT_STATUS_DOWN, host)
    return {'device': device, 'exists': port_exists}
