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

invirt-database-tables: populate types table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.