def try_set_boot_device(task, device, persistent=True):
    try:
        manager_utils.node_set_boot_device(task, device,
                                           persistent=persistent)
    except exception.IPMIFailure:
        if get_boot_mode_for_deploy(task.node) == 'uefi':
            LOG.warning(_LW("ipmitool is unable to set boot device while "
                            "the node %s is in UEFI boot mode. Please set "
                            "the boot device manually.") % task.node.uuid)
        else:
            raise
Tries to set the boot device on the node.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/deploy_utils.py/try_set_boot_device