From: Evan Broder <broder@mit.edu>
Date: Thu, 20 Nov 2008 13:44:13 +0000 (-0500)
Subject: Move the autoinstaller disabling code to a more useful location
X-Git-Tag: 0.0.13~1
X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/4fc486b66798618cbab3ecc39ab2e8cda0345f53

Move the autoinstaller disabling code to a more useful location

(i.e. so that it'll throw the exception before it creates the VM)

svn path=/trunk/packages/invirt-web/; revision=1721
---

diff --git a/code/controls.py b/code/controls.py
index d152627..7b4558e 100644
--- a/code/controls.py
+++ b/code/controls.py
@@ -43,8 +43,6 @@ def getswap(disksize, memsize):
     return int(min(disksize / 4, memsize * 1.5))
 
 def lvinstall(machine, autoinstall):
-    #raise InvalidInput('autoinstall', 'install',
-    #                   "The autoinstaller has been temporarily disabled")
     disksize = machine.disks[0].size
     memsize = machine.memory
     swapsize = getswap(disksize, memsize)
diff --git a/code/validation.py b/code/validation.py
index ecd8b9f..513b431 100644
--- a/code/validation.py
+++ b/code/validation.py
@@ -66,6 +66,8 @@ class Validate:
                 raise CodeError("Invalid cdrom type '%s'" % cdrom)
             self.cdrom = cdrom
         if autoinstall is not None:
+            #raise InvalidInput('autoinstall', 'install',
+            #                   "The autoinstaller has been temporarily disabled")
             self.autoinstall = Autoinstall.query().get(autoinstall)