@task_manager.require_exclusive_lock
    def set_boot_device(self, task, device, persistent=False):
        """Set the boot device for the task's node.

        Set the boot device to use on next boot of the node.

        :param task: a task from TaskManager.
        :param device: the boot device
        :param persistent: Boolean value. True if the boot device will
                           persist to all future boots, False if not.
                           Default: False.
        :raises: InvalidParameterValue if an invalid boot device is specified.
        """
        node = task.node

        if amt_common.BOOT_DEVICES_MAPPING not in device:
            raise exception.InvalidParameterValue(
                _("set_boot_device called with invalid device "
                  "%(device)s for node %(node_id)s."
                  ) % {'device': device, 'node_id': node.uuid})

        # AMT/vPro doesn't support set boot_device persistent, so we have to
        # save amt_boot_device/amt_boot_persistent in driver_internal_info.
        driver_internal_info = node.driver_internal_info
        driver_internal_info['amt_boot_device'] = device
        driver_internal_info['amt_boot_persistent'] = persistent
        node.driver_internal_info = driver_internal_info
        node.save()
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/amt/management.py/AMTManagement.set_boot_device/swapped operands of `not in`