Changeset 437 for trunk/packages/sipb-xen-www/code/validation.py
- Timestamp:
- Apr 21, 2008, 7:14:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/validation.py
r431 r437 5 5 import re 6 6 import string 7 from sipb_xen_database import Machine, NIC 7 from sipb_xen_database import Machine, NIC, Type 8 8 from webcommon import InvalidInput, g 9 9 … … 124 124 "Minimum %s GiB" % MIN_DISK_SINGLE) 125 125 return disk 126 126 127 def validVmType(vm_type): 128 if vm_type == 'hvm': 129 return Type.get('linux-hvm') 130 elif vm_type == 'paravm': 131 return Type.get('linux') 132 else: 133 raise CodeError("Invalid vm type '%s'" % vm_type) 134 127 135 def testMachineId(user, machine_id, exists=True): 128 136 """Parse, validate and check authorization for a given user and machine.
Note: See TracChangeset
for help on using the changeset viewer.