configurize web templates
[invirt/packages/invirt-web.git] / code / validation.py
index e69559a..817c2cf 100644 (file)
@@ -4,7 +4,7 @@ import cache_acls
 import getafsgroups
 import re
 import string
-from sipb_xen_database import Machine, NIC, Type, Disk, CDROM, Autoinstall
+from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
 from webcommon import InvalidInput
 
 MAX_MEMORY_TOTAL = 512
@@ -269,7 +269,7 @@ def testName(user, name, machine=None):
         return None
     if not Machine.select_by(name=name):
         if not validMachineName(name):
-            raise InvalidInput('name', name, 'You must provide a machine name.  Max 22 chars, alnum plus \'-\' and \'_\'.')
+            raise InvalidInput('name', name, 'You must provide a machine name.  Max 63 chars, alnum plus \'-\', does not begin or end with \'-\'.')
         return name
     raise InvalidInput('name', name, "Name is already taken.")