Commit 92fa13aa by Guba Sándor

instance: added InstanceTemplate is_ready property

parent fc942a00
......@@ -151,6 +151,10 @@ class InstanceTemplate(AclBase, VirtualMachineDescModel, TimeStampedModel):
return 'linux'
def is_ready(self):
return all(disk.is_ready for disk in self.disks)
def save(self, *args, **kwargs):
is_new = getattr(self, "pk", None) is None
super(InstanceTemplate, self).save(*args, **kwargs)
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