diff --git a/common/phases.py b/common/phases.py index ce50733..3b44eb2 100644 --- a/common/phases.py +++ b/common/phases.py @@ -9,7 +9,6 @@ system_modification = Phase('System modification', 'Installing software, modifyi system_cleaning = Phase('System cleaning', 'Removing sensitive data, temporary files and other leftovers') volume_unmounting = Phase('Volume unmounting', 'Unmounting the bootstrap volume') image_registration = Phase('Image registration', 'Uploading/Registering with the provider') -image_conversion = Phase('Image conversion', 'Conversion/Compression of the image result file') cleaning = Phase('Cleaning', 'Removing temporary files') order = [preparation, @@ -21,6 +20,5 @@ order = [preparation, system_cleaning, volume_unmounting, image_registration, - image_conversion, cleaning, ] diff --git a/plugins/convert_image/tasks.py b/plugins/convert_image/tasks.py index 91f02fc..c547417 100644 --- a/plugins/convert_image/tasks.py +++ b/plugins/convert_image/tasks.py @@ -1,16 +1,14 @@ from base import Task from common import phases -from common.tasks.filesystem import DeleteMountDir class ConvertImage(Task): - description = 'Convert raw image' - phase = phases.image_conversion + description = 'Converting raw image' + phase = phases.image_registration def run(self, info): from common.tools import log_check_call - converted_file = info.loopback_file.replace('img',info.manifest.plugins['convert_image']['format']) + converted_file = info.loopback_file.replace('img', info.manifest.plugins['convert_image']['format']) log_check_call(['/usr/bin/qemu-img', 'convert', '-O', info.manifest.plugins['convert_image']['format'], info.loopback_file, converted_file]) import os os.remove(info.loopback_file) -