Set the default vm type
authorEric Price <ecprice@mit.edu>
Fri, 9 May 2008 21:11:46 +0000 (17:11 -0400)
committerEric Price <ecprice@mit.edu>
Fri, 9 May 2008 21:11:46 +0000 (17:11 -0400)
svn path=/trunk/packages/sipb-xen-www/; revision=515

code/main.py
code/templates/functions.tmpl

index 24fe062..409433d 100755 (executable)
@@ -105,8 +105,9 @@ class Defaults:
     cdrom = ''
     autoinstall = ''
     name = ''
+    type = 'linux-hvm'
+
     def __init__(self, max_memory=None, max_disk=None, **kws):
-        self.type = Type.get('linux-hvm')
         if max_memory is not None:
             self.memory = min(self.memory, max_memory)
         if max_disk is not None:
index e1ae309..635f5db 100644 (file)
@@ -36,7 +36,7 @@ $databaseList(sorted($sipb_xen_database.Autoinstall.select(), key=lambda x: x.de
 #for $vmtype in (('linux-hvm', 'HVM'), ('linux', 'ParaVM'), )
 <label>
    <input #slurp
-#if $default == $vmtype then 'checked' else ''
+#if $default == $vmtype[0] then 'checked' else ''
  type="radio" name="vmtype" value="${vmtype[0]}">${vmtype[1]}</input>
 </label>
 #end for