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/validation.py

    r609 r629  
    55import re
    66import string
    7 from sipb_xen_database import Machine, NIC, Type, Disk, CDROM
     7from sipb_xen_database import Machine, NIC, Type, Disk, CDROM, Autoinstall
    88from webcommon import InvalidInput
    99
     
    2020    def __init__(self, username, state, machine_id=None, name=None, description=None, owner=None,
    2121                 admin=None, contact=None, memory=None, disksize=None,
    22                  vmtype=None, cdrom=None, clone_from=None, strict=False):
     22                 vmtype=None, cdrom=None, autoinstall=None, strict=False):
    2323        # XXX Successive quota checks aren't a good idea, since you
    2424        # can't necessarily change the locker and disk size at the
     
    6666                raise CodeError("Invalid cdrom type '%s'" % cdrom)
    6767            self.cdrom = cdrom
    68         if clone_from is not None:
    69             if clone_from not in ('ice3', ):
    70                 raise CodeError("Invalid clone image '%s'" % clone_from)
    71             self.clone_from = clone_from
     68        if autoinstall is not None:
     69            self.autoinstall = Autoinstall.get(autoinstall)
    7270
    7371
Note: See TracChangeset for help on using the changeset viewer.