Commit 65680e84 by Guba Sándor

storage: removed base images at save_as

This caused problems detecting childs for delete
parent f068fe84
...@@ -477,8 +477,8 @@ class Disk(AclBase, TimeStampedModel): ...@@ -477,8 +477,8 @@ class Disk(AclBase, TimeStampedModel):
The timeout parameter is not used now. The timeout parameter is not used now.
""" """
mapping = { mapping = {
'qcow2-snap': ('qcow2-norm', self.base), 'qcow2-snap': 'qcow2-norm',
'qcow2-norm': ('qcow2-norm', self), 'qcow2-norm': 'qcow2-norm',
} }
if self.type not in mapping.keys(): if self.type not in mapping.keys():
raise self.WrongDiskTypeError(self.type) raise self.WrongDiskTypeError(self.type)
...@@ -492,9 +492,9 @@ class Disk(AclBase, TimeStampedModel): ...@@ -492,9 +492,9 @@ class Disk(AclBase, TimeStampedModel):
# from this point on, the caller has to guarantee that the disk is not # from this point on, the caller has to guarantee that the disk is not
# going to be used until the operation is complete # 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, name=self.name, size=self.size,
type=new_type) type=new_type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment