From: Greg Price Date: Wed, 6 Aug 2008 05:07:22 +0000 (-0400) Subject: add and respect 'adminable' column to machines X-Git-Tag: sipb-xen-database/10.18^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/commitdiff_plain/d67933bcd88baa7432ac912e8ccac7be37553139?ds=sidebyside add and respect 'adminable' column to machines This is for selectively, temporarily, manually enabling admin mode for a VM. Where it's not set, admin mode now bypasses quotas and does nothing else. svn path=/trunk/packages/sipb-xen-database/; revision=874 --- diff --git a/debian/changelog b/debian/changelog index 4598e59..3fc0456 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +sipb-xen-database (10.18) unstable; urgency=low + + * add 'adminable' column to machines; for selectively, temporarily, + enabling admin mode on a machine + + -- Greg Price Wed, 6 Aug 2008 01:02:59 -0400 + sipb-xen-database (10.17) unstable; urgency=low * pull IP gateway, network from config diff --git a/python/database/models.py b/python/database/models.py index ee207f6..e0a7d17 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -20,6 +20,7 @@ __all__ = ['meta', 'Type', 'CDROM', 'Autoinstall', + 'or_', ] meta = DynamicMetaData() @@ -36,7 +37,8 @@ machine_table = Table('machines', meta, Column('administrator', String, nullable=False, default=False), Column('type_id', String, ForeignKey('types.type_id'), nullable=False), Column('autorestart', Boolean, nullable=False, default=False), - Column('cpus', Integer, nullable=False, default=1)) + Column('cpus', Integer, nullable=False, default=1), + Column('adminable', Boolean, nullable=False, default=False)) nic_table = Table('nics', meta, Column('machine_id', Integer, ForeignKey('machines.machine_id'), nullable=True),