X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/1b80f0af7da61f9a9a22f9bb71193086fbf81434..bee5d6b79f93e627eb105cd443701ac1975fd927:/code/main.py diff --git a/code/main.py b/code/main.py index ebbd7dd..c419f32 100755 --- a/code/main.py +++ b/code/main.py @@ -210,6 +210,9 @@ def getListDict(user): owner=user, cdrom='gutsy-i386') checkpoint.checkpoint('Got defaults') + def sortkey(machine): + return (machine.owner != user, machine.owner, machine.name) + machines = sorted(machines, key=sortkey) d = dict(user=user, cant_add_vm=validation.cantAddVm(user), max_memory=max_memory, @@ -448,7 +451,7 @@ The administrator field determines who can access the console and power on and off the machine. This can be either a user or a moira group.""", quotas=""" -Quotas are determined on a per-locker basis. Each quota may have a +Quotas are determined on a per-locker basis. Each locker may have a maximum of 512 megabytes of active ram, 50 gigabytes of disk, and 4 active machines.""", console=""" @@ -613,7 +616,7 @@ def main(operation, user, fields): output_string = str(output) checkpoint.checkpoint('output as a string') print output_string - print '
%s
' % checkpoint + print '' % checkpoint except Exception, err: if not fields.has_key('js'): if isinstance(err, CodeError):