From: Eric Price Date: Wed, 10 Oct 2007 04:05:03 +0000 (-0400) Subject: Allow administrators. X-Git-Tag: sipb-xen-database/8^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/commitdiff_plain/c4bdafacda678c351368c0bcef3b72d1a89e267d Allow administrators. svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=168 --- diff --git a/sipb_xen_database/models.py b/sipb_xen_database/models.py index 4226598..b4380b9 100644 --- a/sipb_xen_database/models.py +++ b/sipb_xen_database/models.py @@ -26,7 +26,7 @@ machine_table = Table('machines', meta, Column('owner', String, nullable=False), Column('contact', String, nullable=False), Column('uuid', String, nullable=False), - Column('boot_off_cd', Boolean, nullable=False, default=False), + 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)) @@ -80,9 +80,9 @@ class CDROM(object): self.cdrom_id = cdrom_id self.description = description -assign_mapper(ctx, Machine, machine_table, \ - properties={'nics': relation(NIC), - 'disks': relation(Disk), +assign_mapper(ctx, Machine, machine_table, + properties={'nics': relation(NIC, backref="machine"), + 'disks': relation(Disk, backref="machine"), 'type': relation(Type)}); assign_mapper(ctx, NIC, nic_table) assign_mapper(ctx, Disk, disk_table)