Commit d58e62b1 by Dudás Ádám

vm: simplify method

parent 2564bc5d
...@@ -378,8 +378,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel): ...@@ -378,8 +378,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
inst.clean() inst.clean()
inst.save() inst.save()
# create related entities # create related entities
for disk in disks: inst.disks.add(*[disk.get_exclusive() for disk in disks])
inst.disks.add(disk.get_exclusive())
for net in networks: for net in networks:
i = Interface.create(instance=inst, vlan=net.vlan, owner=owner, i = Interface.create(instance=inst, vlan=net.vlan, owner=owner,
......
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