Changeset 865 for trunk


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

finish sipb_xen_database -> invirt.database in web

Location:
trunk/packages/sipb-xen-www/code
Files:
3 edited

Legend:

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

    r864 r865  
    4040import controls
    4141from getafsgroups import getAfsGroupMembers
    42 import sipb_xen_database as database
    43 from sipb_xen_database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall
     42from invirt import database
     43from invirt.database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall
    4444from invirt.config import structs as config
    4545
  • trunk/packages/sipb-xen-www/code/validation.py

    r649 r865  
    55import re
    66import string
    7 from sipb_xen_database import Machine, NIC, Type, Disk, CDROM, Autoinstall
     7from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall
    88from webcommon import InvalidInput
    99
  • trunk/packages/sipb-xen-www/code/xen-ips

    r243 r865  
    11#!/usr/bin/python
    22import random
    3 from sipb_xen_database import *
     3from invirt import database
    44import sys
    55
     
    3838
    3939def addip(ip):
    40     n = NIC(machine_id=None, mac_addr=randomMAC(), ip=ip, hostname=None)
    41     ctx.current.save(n)
    42     ctx.current.flush()
     40    n = database.NIC(machine_id=None, mac_addr=randomMAC(), ip=ip, hostname=None)
     41    database.ctx.current.save(n)
     42    database.ctx.current.flush()
    4343
    4444
     
    4949        usage()
    5050        sys.exit(1)
    51     connect('postgres://sipb-xen@sipb-xen-dev/sipb_xen')
     51    database.connect()
    5252    addip(ip)
Note: See TracChangeset for help on using the changeset viewer.