Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Str keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword Call NameLoad Str Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword Call NameLoad Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Str Num body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr Str NameLoad Str BinOpMod Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad With Call AttributeLoad NameLoad attr NameStore body TryExcept body Expr Call AttributeLoad NameLoad attr Str NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad TryFinally body TryExcept body If NameLoad body Expr Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore ListComp BinOpMod Str Dict Str Str NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad finalbody TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Assign NameStore ListLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Dict NameLoad NameLoad AttributeLoad NameLoad attr Str Str NameLoad TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Assign NameStore Dict Str Str Str Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Dict NameLoad NameLoad AttributeLoad NameLoad attr Str Str NameLoad With Call AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryFinally body TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad finalbody Expr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Str Str Str Str Str Str Str Str Str Str Str Str NameLoad Str Str NameLoad Str Str NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str Dict Str Str AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body With Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr keyword Call NameLoad Str keyword NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword BinOpMod Call NameLoad Str Dict Str Str NameLoad NameLoad If CompareNotEq NameLoad Str body Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str Dict Str Str NameLoad NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Str body Raise Call AttributeLoad NameLoad attr keyword NameLoad keyword BinOpMod Call NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return SubscriptLoad Call NameLoad NameLoad NameLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Str If CompareEq NameLoad Str body Return NameLoad Return DictComp NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str With Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Return Assign NameStore NameLoad If Call AttributeLoad NameLoad attr NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Assign NameStore BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str orelse If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad TryExcept body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Expr Call NameLoad NameLoad Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad If UnaryOpNot BoolOpAnd NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad Str Expr Call NameLoad NameLoad Raise Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Assign NameStore Dict NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A 
Handling of VM disk images.
 N/A os N/A shutil ironic_lib disk_utils ironic_lib utils ironic_utils N/A jinja2 oslo_concurrency processutils oslo_config cfg oslo_log log logging oslo_utils fileutils ironic.common exception ironic.common.glance_service service_utils glance_utils ironic.common.i18n _ ironic.common.i18n _LE ironic.common image_service service ironic.common paths ironic.common utils N/A LOG N/A N/A logging getLogger __name__ N/A image_opts N/A N/A N/A cfg BoolOpt force_raw_images default True help N/A _ If True, convert backing images to "raw" disk image format. N/A N/A cfg StrOpt isolinux_bin default /usr/lib/syslinux/isolinux.bin help N/A _ Path to isolinux binary file. N/A N/A cfg StrOpt isolinux_config_template default N/A N/A paths basedir_def common/isolinux_config.template help N/A _ Template file for isolinux configuration file. N/A N/A cfg StrOpt grub_config_template default N/A N/A paths basedir_def common/grub_conf.template help N/A _ Template file for grub configuration file. N/A CONF N/A cfg CONF N/A N/A N/A CONF register_opts image_opts _create_root_fs N/A N/A root_directory files_info N/A N/A N/A Creates a filesystem root in given directory.

    Given a mapping of absolute path of files to their relative paths
    within the filesystem, this method copies the files to their
    destination.

    :param root_directory: the filesystem root directory.
    :param files_info: A dict containing absolute path of file to be copied
        -> relative path within the vfat image. For example,
        {
         '/absolute/path/to/file' -> 'relative/path/within/root'
         ...
        }
    :raises: OSError, if creation of any directory failed.
    :raises: IOError, if copying any of the files failed.
     N/A N/A src_file path N/A N/A files_info items N/A N/A target_file N/A N/A N/A os path join root_directory path N/A dirname N/A N/A N/A os path dirname target_file N/A N/A N/A N/A N/A os path exists dirname N/A N/A N/A N/A os makedirs dirname N/A N/A N/A shutil copyfile src_file target_file N/A _umount_without_raise N/A N/A mount_dir N/A N/A N/A Helper method to umount without raise. N/A N/A N/A N/A N/A utils umount mount_dir N/A N/A N/A N/A processutils ProcessExecutionError N/A N/A N/A create_vfat_image N/A N/A output_file files_info parameters parameters_file fs_size_kib N/A None None parameters.txt 100 N/A N/A Creates the fat fs image on the desired file.

    This method copies the given files to a root directory (optional),
    writes the parameters specified to the parameters file within the
    root directory (optional), and then creates a vfat image of the root
    directory.

    :param output_file: The path to the file where the fat fs image needs
        to be created.
    :param files_info: A dict containing absolute path of file to be copied
        -> relative path within the vfat image. For example,
        {
         '/absolute/path/to/file' -> 'relative/path/within/root'
         ...
        }
    :param parameters: A dict containing key-value pairs of parameters.
    :param parameters_file: The filename for the parameters file.
    :param fs_size_kib: size of the vfat filesystem in KiB.
    :raises: ImageCreationFailed, if image creation failed while doing any
        of filesystem manipulation activities like creating dirs, mounting,
        creating filesystem, copying files, etc.
     N/A N/A N/A N/A N/A ironic_utils dd /dev/zero output_file count=1 N/A bs=%dKiB fs_size_kib N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A exception ImageCreationFailed image_type vfat error e N/A N/A N/A utils tempdir tmpdir N/A N/A N/A N/A N/A N/A ironic_utils mkfs vfat output_file label ir-vfd-dev N/A N/A N/A utils mount output_file tmpdir -o umask=0 N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A exception ImageCreationFailed image_type vfat error e N/A N/A N/A N/A N/A files_info N/A N/A N/A _create_root_fs tmpdir files_info N/A parameters N/A N/A parameters_file N/A N/A N/A os path join tmpdir parameters_file N/A params_list N/A N/A %(key)s=%(val)s N/A key val k v N/A N/A k v N/A N/A parameters items N/A file_contents N/A N/A join params_list N/A N/A N/A utils write_to_file parameters_file file_contents N/A N/A N/A Exception N/A e N/A N/A N/A N/A LOG exception N/A _LE vfat image creation failed. Error: %s e N/A N/A N/A exception ImageCreationFailed image_type vfat error e N/A N/A N/A N/A N/A N/A utils umount tmpdir N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A exception ImageCreationFailed image_type vfat error e N/A _generate_cfg N/A N/A kernel_params template options N/A N/A N/A Generates a isolinux or grub configuration file.

    Given a given a list of strings containing kernel parameters, this method
    returns the kernel cmdline string.
    :param kernel_params: a list of strings(each element being a string like
        'K=V' or 'K' or combination of them like 'K1=V1 K2 K3=V3') to be added
        as the kernel cmdline.
    :param template: the path of the config template file.
    :param options: a dictionary of keywords which need to be replaced in
                    template file to generate a proper config file.
    :returns: a string containing the contents of the isolinux configuration
        file.
     N/A N/A kernel_params N/A N/A kernel_params N/A N/A kernel_params_str N/A N/A join kernel_params N/A N/A tmpl_path tmpl_file N/A N/A N/A os path split template N/A env N/A N/A jinja2 Environment loader N/A N/A jinja2 FileSystemLoader tmpl_path N/A template N/A N/A env get_template tmpl_file N/A N/A N/A options update N/A kernel_params kernel_params_str N/A cfg N/A N/A template render options N/A cfg N/A create_isolinux_image_for_bios N/A N/A output_file kernel ramdisk kernel_params N/A None N/A N/A Creates an isolinux image on the specified file.

    Copies the provided kernel, ramdisk to a directory, generates the isolinux
    configuration file using the kernel parameters provided, and then generates
    a bootable ISO image.

    :param output_file: the path to the file where the iso image needs to be
        created.
    :param kernel: the kernel to use.
    :param ramdisk: the ramdisk to use.
    :param kernel_params: a list of strings(each element being a string like
        'K=V' or 'K' or combination of them like 'K1=V1,K2,...') to be added
        as the kernel cmdline.
    :raises: ImageCreationFailed, if image creation failed while copying files
        or while running command to generate iso.
     N/A ISOLINUX_BIN isolinux/isolinux.bin N/A ISOLINUX_CFG isolinux/isolinux.cfg N/A options N/A kernel ramdisk /vmlinuz /initrd N/A N/A N/A utils tempdir tmpdir N/A N/A files_info N/A kernel ramdisk N/A CONF isolinux_bin vmlinuz initrd ISOLINUX_BIN N/A N/A N/A N/A _create_root_fs tmpdir files_info N/A N/A N/A N/A OSError IOError N/A e N/A N/A N/A N/A LOG exception N/A _LE Creating the filesystem root failed. N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A cfg N/A _generate_cfg kernel_params N/A CONF isolinux_config_template options N/A isolinux_cfg N/A N/A N/A os path join tmpdir ISOLINUX_CFG N/A N/A N/A utils write_to_file isolinux_cfg cfg N/A N/A N/A N/A N/A utils execute mkisofs -r -V VMEDIA_BOOT_ISO -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -boot-info-table -b ISOLINUX_BIN -o output_file tmpdir N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A LOG exception N/A _LE Creating ISO image failed. N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A create_isolinux_image_for_uefi N/A N/A output_file deploy_iso kernel ramdisk kernel_params N/A None N/A N/A Creates an isolinux image on the specified file.

    Copies the provided kernel, ramdisk, efiboot.img to a directory, creates
    the path for grub config file, generates the isolinux configuration file
    using the kernel parameters provided, generates the grub configuration
    file using kernel parameters and then generates a bootable ISO image
    for uefi.

    :param output_file: the path to the file where the iso image needs to be
        created.
    :param deploy_iso: deploy iso used to initiate the deploy.
    :param kernel: the kernel to use.
    :param ramdisk: the ramdisk to use.
    :param kernel_params: a list of strings(each element being a string like
        'K=V' or 'K' or combination of them like 'K1=V1,K2,...') to be added
        as the kernel cmdline.
    :raises: ImageCreationFailed, if image creation failed while copying files
        or while running command to generate iso.
     N/A ISOLINUX_BIN isolinux/isolinux.bin N/A ISOLINUX_CFG isolinux/isolinux.cfg N/A isolinux_options N/A kernel ramdisk /vmlinuz /initrd N/A grub_options N/A linux initrd /vmlinuz /initrd N/A N/A N/A utils tempdir tmpdir N/A N/A files_info N/A kernel ramdisk N/A CONF isolinux_bin vmlinuz initrd ISOLINUX_BIN N/A N/A N/A utils tempdir mountdir N/A N/A N/A uefi_path_info e_img_rel_path grub_rel_path N/A _mount_deploy_iso deploy_iso mountdir N/A N/A N/A files_info update uefi_path_info N/A N/A N/A N/A N/A N/A _create_root_fs tmpdir files_info N/A N/A N/A N/A OSError IOError N/A e N/A N/A N/A N/A LOG exception N/A _LE Creating the filesystem root failed. N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A N/A N/A _umount_without_raise mountdir N/A cfg N/A _generate_cfg kernel_params N/A CONF isolinux_config_template isolinux_options N/A isolinux_cfg N/A N/A N/A os path join tmpdir ISOLINUX_CFG N/A N/A N/A utils write_to_file isolinux_cfg cfg N/A grub_cfg N/A N/A N/A os path join tmpdir grub_rel_path N/A grub_conf N/A _generate_cfg kernel_params N/A CONF grub_config_template grub_options N/A N/A N/A utils write_to_file grub_cfg grub_conf N/A N/A N/A N/A N/A utils execute mkisofs -r -V VMEDIA_BOOT_ISO -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -boot-info-table -b ISOLINUX_BIN -eltorito-alt-boot -e e_img_rel_path -no-emul-boot -o output_file tmpdir N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A LOG exception N/A _LE Creating ISO image failed. N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A fetch N/A N/A context image_href path force_raw N/A False N/A N/A image_service N/A N/A service get_image_service image_href context context N/A N/A N/A LOG debug N/A Using %(image_service)s to download image %(image_href)s. N/A image_service image_href N/A image_service __class__ image_href N/A N/A N/A fileutils remove_path_on_error path N/A N/A N/A open path wb image_file N/A N/A N/A N/A image_service download image_href image_file N/A force_raw N/A N/A N/A image_to_raw image_href path N/A %s.part path N/A image_to_raw N/A N/A image_href path path_tmp N/A N/A N/A N/A N/A fileutils remove_path_on_error path_tmp N/A N/A data N/A N/A disk_utils qemu_img_info path_tmp N/A fmt N/A data file_format N/A N/A fmt None N/A N/A N/A N/A exception ImageUnacceptable reason N/A _ 'qemu-img info' parsing failed. image_id image_href N/A backing_file N/A data backing_file N/A N/A backing_file None N/A N/A N/A N/A exception ImageUnacceptable image_id image_href reason N/A N/A _ fmt=%(fmt)s backed by: %(backing_file)s N/A fmt backing_file fmt backing_file N/A N/A fmt raw N/A N/A staged N/A %s.converted path N/A N/A N/A LOG debug N/A %(image)s was %(format)s, converting to raw N/A image format image_href fmt N/A N/A N/A fileutils remove_path_on_error staged N/A N/A N/A N/A disk_utils convert_image path_tmp staged raw N/A N/A N/A os unlink path_tmp N/A data N/A N/A disk_utils qemu_img_info staged N/A N/A N/A data file_format raw N/A N/A N/A N/A exception ImageConvertFailed image_id image_href reason N/A N/A _ Converted to raw, but format is now %s N/A data file_format N/A N/A N/A os rename staged path N/A N/A N/A N/A os rename path_tmp path N/A image_show N/A N/A context image_href image_service N/A None N/A N/A N/A image_service None N/A N/A image_service N/A N/A service get_image_service image_href context context N/A N/A N/A image_service show image_href N/A download_size N/A N/A context image_href image_service N/A None N/A N/A N/A N/A image_show context image_href image_service N/A size N/A converted_size N/A N/A path N/A N/A N/A Get size of converted raw image.

    The size of image converted to raw format can be growing up to the virtual
    size of the image.

    :param path: path to the image file.
    :returns: virtual size of the image or 0 if conversion not needed.

     N/A data N/A N/A disk_utils qemu_img_info path N/A N/A data virtual_size N/A get_image_properties N/A N/A context image_href properties N/A all N/A N/A Returns the values of several properties of an image

    :param context: context
    :param image_href: href of the image
    :param properties: the properties whose values are required.
        This argument is optional, default value is "all", so if not specified
        all properties will be returned.
    :returns: a dict of the values of the properties. A property not on the
        glance metadata will have a value of None.
     N/A img_service N/A N/A service get_image_service image_href context context N/A iproperties N/A N/A N/A img_service show image_href N/A properties N/A N/A properties all N/A N/A iproperties N/A N/A p N/A N/A iproperties get p N/A p properties N/A get_temp_url_for_glance_image N/A N/A context image_uuid N/A N/A N/A Returns the tmp url for a glance image.

    :param context: context
    :param image_uuid: the UUID of the image in glance
    :returns: the tmp url for the glance image.
     N/A glance_service N/A N/A service GlanceImageService version 2 context context N/A image_properties N/A N/A glance_service show image_uuid N/A N/A N/A LOG debug Got image info: %(info)s for image %(image_uuid)s. N/A info image_uuid image_properties image_uuid N/A N/A N/A glance_service swift_temp_url image_properties N/A create_boot_iso N/A N/A context output_filename kernel_href ramdisk_href deploy_iso_href root_uuid kernel_params boot_mode N/A None None None N/A N/A 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.
     N/A N/A N/A utils tempdir tmpdir N/A N/A kernel_path N/A N/A N/A os path join tmpdir N/A N/A N/A kernel_href split / N/A -1 N/A ramdisk_path N/A N/A N/A os path join tmpdir N/A N/A N/A ramdisk_href split / N/A -1 N/A N/A fetch context kernel_href kernel_path N/A N/A fetch context ramdisk_href ramdisk_path N/A params N/A N/A root_uuid N/A N/A N/A N/A params append N/A root=UUID=%s root_uuid N/A kernel_params N/A N/A N/A N/A params append kernel_params N/A N/A boot_mode uefi N/A N/A deploy_iso N/A N/A N/A os path join tmpdir N/A N/A N/A deploy_iso_href split / N/A -1 N/A N/A fetch context deploy_iso_href deploy_iso N/A N/A create_isolinux_image_for_uefi output_filename deploy_iso kernel_path ramdisk_path params N/A N/A N/A create_isolinux_image_for_bios output_filename kernel_path ramdisk_path params N/A is_whole_disk_image N/A N/A ctx instance_info N/A N/A N/A Find out if the image is a partition image or a whole disk image.

    :param ctx: an admin context
    :param instance_info: a node's instance info dict

    :returns True for whole disk images and False for partition images
        and None on no image_source or Error.
     N/A image_source N/A N/A instance_info get image_source N/A N/A image_source N/A N/A N/A is_whole_disk_image False N/A N/A N/A glance_utils is_glance_image image_source N/A N/A N/A N/A iproperties N/A get_image_properties ctx image_source N/A N/A N/A Exception N/A N/A N/A is_whole_disk_image N/A N/A N/A N/A iproperties get kernel_id N/A N/A N/A iproperties get ramdisk_id N/A N/A N/A N/A N/A N/A instance_info get kernel N/A N/A N/A instance_info get ramdisk N/A N/A is_whole_disk_image True N/A is_whole_disk_image N/A _mount_deploy_iso N/A N/A deploy_iso mountdir N/A N/A N/A This function opens up the deploy iso used for deploy.

    :param: deploy_iso: path to the deploy iso where its
                        contents are fetched to.
    :raises: ImageCreationFailed if mount fails.
    :returns: a tuple consisting of - 1. a dictionary containing
                                         the values as required
                                         by create_isolinux_image,
                                      2. efiboot.img relative path, and
                                      3. grub.cfg relative path.

     N/A e_img_rel_path None N/A e_img_path None N/A grub_rel_path None N/A grub_path None N/A N/A N/A N/A N/A utils mount deploy_iso mountdir -o loop N/A N/A N/A N/A processutils ProcessExecutionError N/A e N/A N/A N/A N/A LOG exception N/A _LE mounting the deploy iso failed. N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A N/A N/A N/A dir subdir files N/A N/A os walk mountdir N/A N/A N/A efiboot.img files N/A N/A e_img_path N/A N/A N/A os path join dir efiboot.img N/A e_img_rel_path N/A N/A N/A os path relpath e_img_path mountdir N/A N/A grub.cfg files N/A N/A grub_path N/A N/A N/A os path join dir grub.cfg N/A grub_rel_path N/A N/A N/A os path relpath grub_path mountdir N/A N/A N/A N/A OSError IOError N/A e N/A N/A N/A N/A LOG exception N/A _LE examining the deploy iso failed. N/A N/A _umount_without_raise mountdir N/A N/A N/A exception ImageCreationFailed image_type iso error e N/A N/A N/A e_img_path e_img_rel_path grub_path grub_rel_path N/A N/A error N/A _ Deploy iso didn't contain efiboot.img or grub.cfg N/A N/A _umount_without_raise mountdir N/A N/A N/A exception ImageCreationFailed image_type iso error error N/A uefi_path_info N/A e_img_path grub_path e_img_rel_path grub_rel_path N/A N/A uefi_path_info e_img_rel_path grub_rel_path N/A