Index: trunk/packages/invirt-web/code/validation.py
===================================================================
--- trunk/packages/invirt-web/code/validation.py	(revision 2132)
+++ trunk/packages/invirt-web/code/validation.py	(revision 2134)
@@ -11,9 +11,5 @@
 
 MIN_MEMORY_SINGLE = 16
-MAX_DISK_TOTAL = 50
-MAX_DISK_SINGLE = 50
 MIN_DISK_SINGLE = 0.1
-MAX_VMS_TOTAL = 10
-MAX_VMS_ACTIVE = 4
 
 class Validate:
@@ -90,5 +86,5 @@
     returned.
     """
-    (quota_total, quota_single) = Owner.getQuotas(machine.owner if machine else owner)
+    (quota_total, quota_single) = Owner.getMemoryQuotas(machine.owner if machine else owner)
 
     if not on:
@@ -105,4 +101,6 @@
     return the maximum that a given machine can be changed to.
     """
+    (quota_total, quota_single) = Owner.getDiskQuotas(machine.owner if machine else owner)
+
     if machine is not None:
         machine_id = machine.machine_id
@@ -112,12 +110,13 @@
                      join('machine').\
                      filter_by(owner=owner).sum(Disk.c.size) or 0
-    return min(MAX_DISK_SINGLE, MAX_DISK_TOTAL-disk_usage/1024.)
+    return min(quota_single, quota_total-disk_usage/1024.)
 
 def cantAddVm(owner, g):
     machines = getMachinesByOwner(owner)
     active_machines = [m for m in machines if m.name in g.xmlist_raw]
-    if machines.count() >= MAX_VMS_TOTAL:
+    (quota_total, quota_active) = Owner.getVMQuotas(machine.owner if machine else owner)
+    if machines.count() >= quota_total:
         return 'You have too many VMs to create a new one.'
-    if len(active_machines) >= MAX_VMS_ACTIVE:
+    if len(active_machines) >= quota_active:
         return ('You already have the maximum number of VMs turned on.  '
                 'To create more, turn one off.')
