Remove image conversion phase.

Maybe image_registration should be renamed?
This commit is contained in:
Anders Ingemann 2013-08-17 22:54:24 +02:00
parent b5c5acf5b1
commit e6ec040b27
2 changed files with 3 additions and 7 deletions

View file

@ -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,
]

View file

@ -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)