@base.driver_passthru(['POST'], async=False)
    def lookup(self, context, **kwargs):
        LOG.debug('Agent lookup using data %s', kwargs)
        uuid = kwargs.get('node_uuid')
        if uuid:
            node = objects.Node.get_by_uuid(context, uuid)
        else:
            inventory = kwargs.get('inventory')
            interfaces = self._get_interfaces(inventory)
            mac_addresses = self._get_mac_addresses(interfaces)

            node = self._find_node_by_macs(context, mac_addresses)

        LOG.info(_LI('Initial lookup for node %s succeeded, agent is running '
                     'and waiting for commands'), node.uuid)

        return {
            'heartbeat_timeout': CONF.agent.heartbeat_timeout,
            'node': node.as_dict()
        }
Subscribe the current thread to the specified publication.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/agent_base_vendor.py/BaseAgentVendor.lookup--crossover with--dataset/ETHPy150Open django-ddp/django-ddp/dddp/api.py/DDP.do_sub