Changeset 865
- Timestamp:
- Aug 4, 2008, 10:42:11 PM (16 years ago)
- Location:
- trunk/packages/sipb-xen-www/code
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/main.py
r864 r865 40 40 import controls 41 41 from getafsgroups import getAfsGroupMembers 42 import sipb_xen_database asdatabase43 from sipb_xen_database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall42 from invirt import database 43 from invirt.database import Machine, CDROM, ctx, connect, MachineAccess, Type, Autoinstall 44 44 from invirt.config import structs as config 45 45 -
trunk/packages/sipb-xen-www/code/validation.py
r649 r865 5 5 import re 6 6 import string 7 from sipb_xen_database import Machine, NIC, Type, Disk, CDROM, Autoinstall7 from invirt.database import Machine, NIC, Type, Disk, CDROM, Autoinstall 8 8 from webcommon import InvalidInput 9 9 -
trunk/packages/sipb-xen-www/code/xen-ips
r243 r865 1 1 #!/usr/bin/python 2 2 import random 3 from sipb_xen_database import *3 from invirt import database 4 4 import sys 5 5 … … 38 38 39 39 def 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() 43 43 44 44 … … 49 49 usage() 50 50 sys.exit(1) 51 connect('postgres://sipb-xen@sipb-xen-dev/sipb_xen')51 database.connect() 52 52 addip(ip)
Note: See TracChangeset
for help on using the changeset viewer.