memory = fields.getfirst('memory')
if memory is not None:
- memory = validation.validMemory(user, memory, machine, on=False)
+ memory = validation.validMemory(owner, memory, machine, on=False)
machine.memory = memory
vm_type = validation.validVmType(fields.getfirst('vmtype'))
if vm_type is not None:
machine.type = vm_type
- disksize = validation.testDisk(user, fields.getfirst('disk'))
+ disksize = validation.testDisk(owner, fields.getfirst('disk'))
if disksize is not None:
- disksize = validation.validDisk(user, disksize, machine)
+ disksize = validation.validDisk(owner, disksize, machine)
disk = machine.disks[0]
if disk.size != disksize:
olddisk[disk.guest_device_name] = disksize
checkpoint.checkpoint('Got fields')
- max_mem = validation.maxMemory(user, machine, False)
+ max_mem = validation.maxMemory(machine.owner, machine, False)
checkpoint.checkpoint('Got mem')
- max_disk = validation.maxDisk(user, machine)
+ max_disk = validation.maxDisk(machine.owner, machine)
defaults = Defaults()
for name in 'machine_id name administrator owner memory contact'.split():
setattr(defaults, name, getattr(machine, name))