From: Greg Price Date: Sat, 31 Jan 2009 08:49:59 +0000 (-0500) Subject: invirt-database-tables: populate types table X-Git-Tag: invirt-database-server/0.0.10~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/commitdiff_plain/0eccc0712f8366a0020d4aa57565fa47769c33b3?ds=sidebyside invirt-database-tables: populate types table svn path=/trunk/packages/invirt-database-server/; revision=2053 --- diff --git a/debian/changelog b/debian/changelog index 0ab2be3..79634c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-database-server (0.0.10) unstable; urgency=low + + * invirt-database-tables: populate types table + + -- Greg Price Sat, 31 Jan 2009 03:49:33 -0500 + invirt-database-server (0.0.9) unstable; urgency=low * Add Provides and Conflicts lines to debian/control for diff --git a/invirt-database-tables b/invirt-database-tables index 0b37bfc..695b04f 100755 --- a/invirt-database-tables +++ b/invirt-database-tables @@ -10,10 +10,20 @@ def usage(): if len(sys.argv) == 1: usage() +def create(): + database.meta.create_all() + session = database.session() + session.begin() + session.save(database.Type(type_id='linux-hvm', description='HVM', + hvm='t', apic='t', acpi='t', pae='t')) + session.save(database.Type(type_id='linux', description='ParaVM', + hvm='f', apic='f', acpi='f', pae='f')) + session.commit() + database.connect() if sys.argv[1] == "create": - database.meta.create_all() + create() elif sys.argv[1] == "drop": database.meta.drop_all() else: