Add support for sysprep-parameters The user may define parameters needed by the os_type classes to perform the system preparation tasks. A new needed_sysprep_params method is added to os_type.OSBase that returns a list with parameters that should be defined by the user.
Always close fds returned by tempfile.mkstemp()
Code Cleanup * Prefix all private methods with _ * Write missing docstrings * Move all public methods above the private ones * Add module docstrings where missing * Define source code encodings on all modules
Share the md5sum and meta file if image is public If the image gets registered as public allow anyone to read the metadata and the md5sum file.
Fix 2 obsolete comments
Change a ValueError exception to FatalError
Add missing docstrings
Rename DiskDevice class to Image Rename DiskDevice class to Image and move it to a seperate module. Also, don't let the user access the os_type/* modules directly. In Image class create the `os' member variable that will host an appropriate instance of one of the OSBase classes.
Clean-up the code using flake8
Enforce raw img format in libguestfs Don't let libguestfs guess the format of the provided image. Enforce it to treat the image as raw.
Fix a bug in tmp dir removal snf-image-creator removed /var/tmp if the directory was empty
Support python-sendfile 2.x Support both versions (1.2.x and 2.x) of python-sendfile. In v1.2.x (py-sendfile) the returning value of the sendfile function is a tuple, where in v2.x (pysendfile) it's a simple integer.
Allow users to specify tmp dir for large files The cow file when creating images or the temporary image file when bundling the host system may be large. Allow the user to overwrite the directory under which those files get created.
Merge branch 'stable-0.1'
Fix a bug in image shrinking code pt2 Handle correct extended partitions with id 0xf
Minor fixes in output messages
Fix pep8 errors
Retry cleanup commands if they fail Add a new try_fail_repeat function that wraps cleanup system commands and retries them if they fail. There are cases where commands like dmsetup, umount and losetup -d may fail with device is busy. In most of the cases, sleeping for halve a second and retrying does the job.
Make sure the tmp bunble_volume img gets deleted
Remove progress bar for guestfs.launch() progress In Guestfs you get notifications about progress on some functions like launch() by registring callback functions. When using guestfs from python, this is fragile. If the callback functions raises an exception, you end up with segmentation fault. It is better to completely remove the progress monitoring from launch().