X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/b368fbce1bc377a0c473173ef9a08eee1240feb7..c4bdafacda678c351368c0bcef3b72d1a89e267d:/sipb_xen_database/models.py 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)