COT.helpers.vmdktool
module¶
Give COT access to vmdktool
for manipulating compressed VMDK files.
http://www.freshports.org/sysutils/vmdktool/
-
class
VmdkTool
[source]¶ Bases:
COT.helpers.helper.Helper
Helper provider for
vmdktool
.http://www.freshports.org/sysutils/vmdktool/
Methods
install_helper
Install vmdktool
.convert_disk_image
Convert the given disk image to the requested format/subformat. -
convert_disk_image
(file_path, output_dir, new_format, new_subformat=None)[source]¶ Convert the given disk image to the requested format/subformat.
If the disk is already in this format then it is unchanged; otherwise, will convert to a new disk in the specified output_dir and return its path.
Current supported conversions:
- .vmdk (any format) to .vmdk (streamOptimized)
- .img to .vmdk (streamOptimized)
Parameters: - file_path (str) – Disk image file to inspect/convert
- output_dir (str) – Directory to place converted image into, if needed
- new_format (str) – Desired final format
- new_subformat (str) – Desired final subformat
Returns: file_path
, if no conversion was required- or a file path in
output_dir
containing the converted image
Raises: NotImplementedError – if the
new_format
and/ornew_subformat
are not supported conversion targets.
-