From 65680e845a32fd7907ba1a0213db6a86d5954b9e Mon Sep 17 00:00:00 2001 From: Guba Sándor Date: Tue, 25 Mar 2014 14:20:55 +0100 Subject: [PATCH] storage: removed base images at save_as This caused problems detecting childs for delete --- circle/storage/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/circle/storage/models.py b/circle/storage/models.py index 36eff10..fbffa5f 100644 --- a/circle/storage/models.py +++ b/circle/storage/models.py @@ -477,8 +477,8 @@ class Disk(AclBase, TimeStampedModel): The timeout parameter is not used now. """ mapping = { - 'qcow2-snap': ('qcow2-norm', self.base), - 'qcow2-norm': ('qcow2-norm', self), + 'qcow2-snap': 'qcow2-norm', + 'qcow2-norm': 'qcow2-norm', } if self.type not in mapping.keys(): raise self.WrongDiskTypeError(self.type) @@ -492,9 +492,9 @@ class Disk(AclBase, TimeStampedModel): # from this point on, the caller has to guarantee that the disk is not # going to be used until the operation is complete - new_type, new_base = mapping[self.type] + new_type = mapping[self.type] - disk = Disk.create(base=new_base, datastore=self.datastore, + disk = Disk.create(datastore=self.datastore, name=self.name, size=self.size, type=new_type) -- libgit2 0.26.0