def _link_ip_address_pxe_configs(task, hex_form):
    pxe_config_file_path = get_pxe_config_file_path(task.node.uuid)

    api = dhcp_factory.DHCPFactory().provider
    ip_addrs = api.get_ip_addresses(task)
    if not ip_addrs:
        raise exception.FailedToGetIPAddressOnPort(_(
            "Failed to get IP address for any port on node %s.") %
            task.node.uuid)
    for port_ip_address in ip_addrs:
        ip_address_path = _get_pxe_ip_address_path(port_ip_address,
                                                   hex_form)
        ironic_utils.unlink_without_raise(ip_address_path)
        relative_source_path = os.path.relpath(
            pxe_config_file_path, os.path.dirname(ip_address_path))
        utils.create_link_without_raise(relative_source_path,
                                        ip_address_path)
This function is meant to be called from scheduler
dataset/ETHPy150Open openstack/ironic/ironic/common/pxe_utils.py/_link_ip_address_pxe_configs--crossover with--dataset/ETHPy150Open frappe/frappe/frappe/sessions.py/clear_expired_sessions