From 892175e9d1c88d7db0c6bcc28e3ee4598ea035a4 Mon Sep 17 00:00:00 2001 From: Eric Price Date: Mon, 2 Jun 2008 14:21:06 -0400 Subject: [PATCH] Use owner's quota on info page, not user's quota. svn path=/trunk/packages/sipb-xen-www/; revision=566 --- code/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/main.py b/code/main.py index 865aa12..385a2a6 100755 --- a/code/main.py +++ b/code/main.py @@ -390,16 +390,16 @@ def modifyDict(user, fields): 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 @@ -579,9 +579,9 @@ def infoDict(user, machine): 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)) -- 1.7.9.5