From: Eric Price Date: Mon, 2 Jun 2008 18:21:06 +0000 (-0400) Subject: Use owner's quota on info page, not user's quota. X-Git-Tag: sipb-xen-www/3.6~70 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/892175e9d1c88d7db0c6bcc28e3ee4598ea035a4 Use owner's quota on info page, not user's quota. svn path=/trunk/packages/sipb-xen-www/; revision=566 --- 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))