Ignore:
Timestamp:
Aug 10, 2009, 12:41:46 AM (15 years ago)
Author:
quentin
Message:

Show installer status on the front page, and unbreak the autoinstall fields in validation logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.py

    r2423 r2424  
    148148
    149149    def parseCreate(self, fields):
    150         kws = dict([(kw, fields.get(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split()])
     150        kws = dict([(kw, fields.get(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split() if fields.get(kw)])
    151151        validate = validation.Validate(cherrypy.request.login, cherrypy.request.state, strict=True, **kws)
    152152        return dict(contact=cherrypy.request.login, name=validate.name, description=validate.description, memory=validate.memory,
     
    375375    on = {}
    376376    has_vnc = {}
     377    installing = {}
    377378    xmlist = state.xmlist
    378379    checkpoint.checkpoint('Got uptimes')
    379     can_clone = 'ice3' not in state.xmlist_raw
    380380    for m in machines:
    381381        if m not in xmlist:
     
    390390            else:
    391391                has_vnc[m] = "ParaVM"
     392            if xmlist[m].get('autoinstall'):
     393                installing[m] = True
     394            else:
     395                installing[m] = False
    392396    max_memory = validation.maxMemory(username, state)
    393397    max_disk = validation.maxDisk(username)
     
    407411             machines=machines,
    408412             has_vnc=has_vnc,
    409              can_clone=can_clone)
     413             installing=installing)
    410414    return d
    411415
Note: See TracChangeset for help on using the changeset viewer.