Revert "Remove extension property from volumes"

This reverts commit c454114a22.
This commit is contained in:
Anders Ingemann 2013-12-15 00:51:51 +01:00
parent 293557827f
commit 06e7f61d8c
2 changed files with 4 additions and 0 deletions

View file

@ -17,6 +17,8 @@ class LoopbackVolume(Volume):
{'name': 'delete', 'src': 'detached', 'dst': 'deleted'},
]
extension = 'raw'
def create(self, image_path):
self.fsm.create(image_path=image_path)

View file

@ -6,6 +6,8 @@ from common.fs import get_partitions
class VirtualBoxVolume(LoopbackVolume):
extension = 'vdi'
def _before_create(self, e):
self.image_path = e.image_path
log_check_call(['/usr/bin/qemu-img', 'create', '-f', 'vdi', self.image_path, str(self.size) + 'M'])