def create_boot_iso(context, output_filename, kernel_href,
                    ramdisk_href, deploy_iso_href, root_uuid=None,
                    kernel_params=None, boot_mode=None):
    """Creates a bootable ISO image for a node.

    Given the hrefs for kernel, ramdisk, root partition's UUID and
    kernel cmdline arguments, this method fetches the kernel and ramdisk,
    and builds a bootable ISO image that can be used to boot up the
    baremetal node.

    :param context: context
    :param output_filename: the absolute path of the output ISO file
    :param kernel_href: URL or glance uuid of the kernel to use
    :param ramdisk_href: URL or glance uuid of the ramdisk to use
    :param deploy_iso_href: URL or glance uuid of the deploy iso used
    :param root_uuid: uuid of the root filesystem (optional)
    :param kernel_params: a string containing whitespace separated values
        kernel cmdline arguments of the form K=V or K (optional).
    :boot_mode: the boot mode in which the deploy is to happen.
    :raises: ImageCreationFailed, if creating boot ISO failed.
    """
    with utils.tempdir() as tmpdir:
        kernel_path = os.path.join(tmpdir, kernel_href.split('/')[-1])
        ramdisk_path = os.path.join(tmpdir, ramdisk_href.split('/')[-1])
        fetch(context, kernel_href, kernel_path)
        fetch(context, ramdisk_href, ramdisk_path)

        params = []
        if root_uuid:
            params.append(root_uuid % 'root=UUID=%s')
        if kernel_params:
            params.append(kernel_params)

        if boot_mode == 'uefi':
            deploy_iso = os.path.join(tmpdir, deploy_iso_href.split('/')[-1])
            fetch(context, deploy_iso_href, deploy_iso)
            create_isolinux_image_for_uefi(output_filename,
                                           deploy_iso,
                                           kernel_path,
                                           ramdisk_path,
                                           params)
        else:
            create_isolinux_image_for_bios(output_filename,
                                           kernel_path,
                                           ramdisk_path,
                                           params)
dataset/ETHPy150Open openstack/ironic/ironic/common/images.py/create_boot_iso/swapped operands of `%`