Ignore:
Timestamp:
Aug 8, 2008, 2:41:38 AM (16 years ago)
Author:
y_z
Message:
  • further integration of invirt.config
Location:
trunk/packages/sipb-xen-www
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/cache_acls.py

    r863 r879  
    11#!/usr/bin/python
    22from invirt.database import *
     3from invirt.config import structs as config
    34import sys
    45import getafsgroups
     
    3031        return []
    3132    try:
    32         return getafsgroups.getAfsGroupMembers(name, 'athena.mit.edu')
     33        return getafsgroups.getAfsGroupMembers(name, config.authz[0].cell)
    3334    except getafsgroups.AfsProcessError:
    3435        return []
  • trunk/packages/sipb-xen-www/code/controls.py

    r863 r879  
    133133        if not open_nics: #No IPs left!
    134134            raise CodeError("No IP addresses left!  "
    135                             "Contact xvm@mit.edu.")
     135                            "Contact %s." % config.web.errormail)
    136136        nic = open_nics[0]
    137137        nic.machine_id = machine.machine_id
  • trunk/packages/sipb-xen-www/code/main.py

    r869 r879  
    650650             errorMessage=str(err), stderr=emsg, traceback=traceback)
    651651    details = templates.error_raw(searchList=[d])
    652     if username not in ('price', 'ecprice', 'andersk'): #add yourself at will
     652    if username not in config.web.errormail_exclude:
    653653        send_error_mail('xvm error on %s for %s: %s' % (op, username, err),
    654654                        details)
  • trunk/packages/sipb-xen-www/code/validation.py

    r874 r879  
    66import string
    77from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
     8from invirt.config import structs as config
    89from webcommon import InvalidInput
    910
     
    224225        admin = 'system:' + admin
    225226    try:
    226         if user in getafsgroups.getAfsGroupMembers(admin, 'athena.mit.edu'):
     227        if user in getafsgroups.getAfsGroupMembers(admin, config.authz[0].cell):
    227228            return admin
    228229    except getafsgroups.AfsProcessError, e:
  • trunk/packages/sipb-xen-www/config.todo

    r877 r879  
    1111files/etc/apache2/sites-available/svn: svn repo path
    1212files/etc/init.d/apache2.invirt: afs cell (for svn?)
    13 code/cache_acls.py: afs cell for authz
    14 code/controls.py: xvm@mit.edu
    15 code/main.py: error-mail blacklist: price, etc
    16 code/validation.py: afs cell for authz
    1713code/templates/error.tmpl: xvm@mit.edu
    1814code/templates/help.tmpl: assumes trac
  • trunk/packages/sipb-xen-www/debian/changelog

    r854 r879  
     1sipb-xen-www (3.9) unstable; urgency=low
     2
     3  * further integration of invirt.config
     4
     5 -- Yang Zhang <y_z@mit.edu>  Fri,  8 Aug 2008 02:39:15 -0400
     6
     7sipb-xen-www (3.8) unstable; urgency=low
     8
     9  * sipb_xen_database -> invirt.database in cache_acls.py
     10
     11 -- Yang Zhang <y_z@mit.edu>  Sun,  3 Aug 2008 19:45:19 -0400
     12
    113sipb-xen-www (3.7) unstable; urgency=low
    214
Note: See TracChangeset for help on using the changeset viewer.