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/code
Files:
4 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:
Note: See TracChangeset for help on using the changeset viewer.