memory = fields.getfirst('memory')
memory = validation.validMemory(user, memory, on=True)
- disk = fields.getfirst('disk')
- disk = validation.validDisk(user, disk)
+ disk_size = fields.getfirst('disk')
+ disk_size = validation.validDisk(user, disk_size)
vm_type = fields.getfirst('vmtype')
if vm_type not in ('hvm', 'paravm'):
cdrom = fields.getfirst('cdrom')
if cdrom is not None and not CDROM.get(cdrom):
raise CodeError("Invalid cdrom type '%s'" % cdrom)
- return dict(contact=user, name=name, memory=memory, disk=disk,
+ return dict(contact=user, name=name, memory=memory, disk_size=disk_size,
owner=owner, is_hvm=is_hvm, cdrom=cdrom)
def create(user, fields):
def getListDict(user):
- machines = [m for m in Machine.select()
- if validation.haveAccess(user, m)]
+ machines = [m for m in Machine.select()
+ if validation.haveAccess(user, m)]
+ #if user == 'moo':
+ # machines = Machine.select()
+ #else:
+ # machines = Machine.query().join('users').filter_by(user=user).all()
checkpoint.checkpoint('Got my machines')
on = {}
has_vnc = {}