X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/2eaf13725429492375779f86f0586273fb1969c8..0c0d546ff44020192115b52af0268f3121e954cf:/python/database/models.py diff --git a/python/database/models.py b/python/database/models.py index 5c3a19a..625e04b 100644 --- a/python/database/models.py +++ b/python/database/models.py @@ -14,6 +14,7 @@ __all__ = ['meta', 'disk_table', 'types_table', 'cdroms_table', + 'mirrors_table', 'autoinstalls_table', 'Machine', 'MachineAccess', @@ -21,6 +22,7 @@ __all__ = ['meta', 'Disk', 'Type', 'CDROM', + 'Mirror', 'Autoinstall', 'or_', ] @@ -126,7 +128,8 @@ session.mapper(NIC, nic_table) session.mapper(Disk, disk_table) session.mapper(Type, types_table) session.mapper(Mirror, mirrors_table) -session.mapper(CDROM, cdroms_table) +session.mapper(CDROM, cdroms_table, + properties={'mirror': relation(Mirror, backref="cdroms")}) session.mapper(Autoinstall, autoinstalls_table) def clear_cache():