Ignore:
Timestamp:
Jun 21, 2008, 9:23:59 PM (16 years ago)
Author:
ecprice
Message:

Autoinstalls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r627 r629  
    3232    atexit.register(printError)
    3333
    34 sys.path.append('/home/ecprice/.local/lib/python2.5/site-packages')
    35 
    3634import templates
    3735from Cheetah.Template import Template
     
    137135
    138136def parseCreate(username, state, fields):
    139     kws = dict([(kw, fields.getfirst(kw)) for kw in 'name description owner memory disksize vmtype cdrom clone_from'.split()])
     137    kws = dict([(kw, fields.getfirst(kw)) for kw in 'name description owner memory disksize vmtype cdrom autoinstall'.split()])
    140138    validate = validation.Validate(username, state, strict=True, **kws)
    141139    return dict(contact=username, name=validate.name, description=validate.description, memory=validate.memory,
    142140                disksize=validate.disksize, owner=validate.owner, machine_type=validate.vmtype,
    143141                cdrom=getattr(validate, 'cdrom', None),
    144                 clone_from=getattr(validate, 'clone_from', None))
     142                autoinstall=getattr(validate, 'autoinstall', None))
    145143
    146144def create(username, state, fields):
     
    626624def getUser(environ):
    627625    """Return the current user based on the SSL environment variables"""
    628     email = environ.get('SSL_CLIENT_S_DN_Email', None)
    629     if email is None:
    630         return None
    631     if not email.endswith('@MIT.EDU'):
    632         return None
    633     return email[:-8]
     626    return environ.get('REMOTE_USER', None)
    634627
    635628class App:
Note: See TracChangeset for help on using the changeset viewer.