* further integration of invirt.config
authorYang Zhang <y_z@mit.edu>
Fri, 8 Aug 2008 06:41:38 +0000 (02:41 -0400)
committerYang Zhang <y_z@mit.edu>
Fri, 8 Aug 2008 06:41:38 +0000 (02:41 -0400)
svn path=/trunk/packages/sipb-xen-www/; revision=879

code/cache_acls.py
code/controls.py
code/main.py
code/validation.py
config.todo
debian/changelog

index 130f359..2b3fd6c 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 from invirt.database import *
+from invirt.config import structs as config
 import sys
 import getafsgroups
 import subprocess
@@ -29,7 +30,7 @@ def expandName(name):
             return [name]
         return []
     try:
-        return getafsgroups.getAfsGroupMembers(name, 'athena.mit.edu')
+        return getafsgroups.getAfsGroupMembers(name, config.authz[0].cell)
     except getafsgroups.AfsProcessError:
         return []
 
index d4cc13b..8a5f1ef 100644 (file)
@@ -132,7 +132,7 @@ def createVm(username, state, owner, contact, name, description, memory, disksiz
         open_nics = NIC.select_by(machine_id=None)
         if not open_nics: #No IPs left!
             raise CodeError("No IP addresses left!  "
-                            "Contact xvm@mit.edu.")
+                            "Contact %s." % config.web.errormail)
         nic = open_nics[0]
         nic.machine_id = machine.machine_id
         nic.hostname = name
index f6f0bff..78ca14f 100755 (executable)
@@ -649,7 +649,7 @@ def show_error(op, username, fields, err, emsg, traceback):
     d = dict(op=op, user=username, fields=fields,
              errorMessage=str(err), stderr=emsg, traceback=traceback)
     details = templates.error_raw(searchList=[d])
-    if username not in ('price', 'ecprice', 'andersk'): #add yourself at will
+    if username not in config.web.errormail_exclude:
         send_error_mail('xvm error on %s for %s: %s' % (op, username, err),
                         details)
     d['details'] = details
index 2e6c7c3..f6e4a59 100644 (file)
@@ -5,6 +5,7 @@ import getafsgroups
 import re
 import string
 from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
+from invirt.config import structs as config
 from webcommon import InvalidInput
 
 MAX_MEMORY_TOTAL = 512
@@ -223,7 +224,7 @@ def testAdmin(user, admin, machine):
             return admin
         admin = 'system:' + admin
     try:
-        if user in getafsgroups.getAfsGroupMembers(admin, 'athena.mit.edu'):
+        if user in getafsgroups.getAfsGroupMembers(admin, config.authz[0].cell):
             return admin
     except getafsgroups.AfsProcessError, e:
         errmsg = str(e)
index a51b66b..d888265 100644 (file)
@@ -10,10 +10,6 @@ files/etc/apache2/sites-available/ssl: trac uri
 files/etc/apache2/sites-available/svn: contact email
 files/etc/apache2/sites-available/svn: svn repo path
 files/etc/init.d/apache2.invirt: afs cell (for svn?)
-code/cache_acls.py: afs cell for authz
-code/controls.py: xvm@mit.edu
-code/main.py: error-mail blacklist: price, etc
-code/validation.py: afs cell for authz
 code/templates/error.tmpl: xvm@mit.edu
 code/templates/help.tmpl: assumes trac
 code/templates/list.tmpl: SIPB Virtual Servers
index ea6d481..781165d 100644 (file)
@@ -1,3 +1,15 @@
+sipb-xen-www (3.9) unstable; urgency=low
+
+  * further integration of invirt.config
+
+ -- Yang Zhang <y_z@mit.edu>  Fri,  8 Aug 2008 02:39:15 -0400
+
+sipb-xen-www (3.8) unstable; urgency=low
+
+  * sipb_xen_database -> invirt.database in cache_acls.py
+
+ -- Yang Zhang <y_z@mit.edu>  Sun,  3 Aug 2008 19:45:19 -0400
+
 sipb-xen-www (3.7) unstable; urgency=low
 
   uncommitted changes in /etc/apache2 on xvm.mit.edu: