Ignore:
Timestamp:
Aug 4, 2008, 10:16:16 PM (16 years ago)
Author:
price
Message:

configurize some web code

File:
1 edited

Legend:

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

    r695 r863  
    33"""
    44
    5 from sipb_xen_database import Machine, Disk, Type, NIC, CDROM, ctx, meta
    65import validation
    76from webcommon import CodeError, InvalidInput
     
    1413import yaml
    1514
     15from invirt.config import structs as config
     16from invirt.database import Machine, Disk, Type, NIC, CDROM, ctx, meta
     17
    1618# ... and stolen from xend/uuid.py
    1719def randomUUID():
     
    2628# end stolen code
    2729
    28 def kinit(username = 'daemon/sipb-xen.mit.edu', keytab = '/etc/sipb-xen.keytab'):
     30def kinit():
    2931    """Kinit with a given username and keytab"""
    30 
    31     p = subprocess.Popen(['kinit', "-k", "-t", keytab, username],
     32    p = subprocess.Popen(['kinit', "-k", "-t", '/etc/invirt/keytab',
     33                          'daemon/'+config.web.hostname],
    3234                         stderr=subprocess.PIPE)
    3335    e = p.wait()
     
    4749    """
    4850    checkKinit()
    49     p = subprocess.Popen(['remctl', 'remote.mit.edu']
     51    p = subprocess.Popen(['remctl', config.remote.hostname]
    5052                         + list(args),
    5153                         stdout=subprocess.PIPE,
Note: See TracChangeset for help on using the changeset viewer.