Ignore:
Timestamp:
Jan 31, 2009, 3:49:59 AM (16 years ago)
Author:
price
Message:

invirt-database-tables: populate types table

Location:
trunk/packages/invirt-database-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-database-server/debian/changelog

    r1989 r2053  
     1invirt-database-server (0.0.10) unstable; urgency=low
     2
     3  * invirt-database-tables: populate types table
     4
     5 -- Greg Price <price@mit.edu>  Sat, 31 Jan 2009 03:49:33 -0500
     6
    17invirt-database-server (0.0.9) unstable; urgency=low
    28
  • trunk/packages/invirt-database-server/invirt-database-tables

    r1288 r2053  
    1111    usage()
    1212
     13def create():
     14    database.meta.create_all()
     15    session = database.session()
     16    session.begin()
     17    session.save(database.Type(type_id='linux-hvm', description='HVM',
     18                               hvm='t', apic='t', acpi='t', pae='t'))
     19    session.save(database.Type(type_id='linux', description='ParaVM',
     20                               hvm='f', apic='f', acpi='f', pae='f'))
     21    session.commit()
     22
    1323database.connect()
    1424
    1525if sys.argv[1] == "create":
    16     database.meta.create_all()
     26    create()
    1727elif sys.argv[1] == "drop":
    1828    database.meta.drop_all()
Note: See TracChangeset for help on using the changeset viewer.