Changeset 1156


Ignore:
Timestamp:
Oct 20, 2008, 7:08:33 PM (15 years ago)
Author:
broder
Message:

Switch xen-ips to using the new SQLAlchemy API

I swear I've written this code 3 different times now. Not sure why
it's only now getting committed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/xen-ips

    r865 r1156  
    3838
    3939def addip(ip):
    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()
     40    n = database.NIC(machine=None, mac_addr=randomMAC(), ip=ip, hostname=None)
     41    database.session.save(n)
     42    database.session.flush()
    4343
    4444
Note: See TracChangeset for help on using the changeset viewer.