Changeset 1247 for trunk/packages/sipb-xen-database/python
- Timestamp:
- Oct 25, 2008, 2:50:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-database/python/database/models.py
r1174 r1247 63 63 Column('pae', Boolean, nullable=False)) 64 64 65 mirrors_table = Table('mirrors', meta, 66 Column('mirror_id', String, primary_key=True, nullable=False), 67 Column('uri_prefix', String, nullable=False)) 68 65 69 cdroms_table = Table('cdroms', meta, 66 70 Column('cdrom_id', String, primary_key=True, nullable=False), 67 Column('description', String, nullable=False)) 71 Column('description', String, nullable=False), 72 Column('mirror_id', String, ForeignKey('mirrors.mirror_id'), 73 Column('uri_suffix', String)) 68 74 69 75 autoinstalls_table = Table('autoinstalls', meta, … … 99 105 return "<Type %s: %s>" % (self.type_id, self.description) 100 106 107 class Mirror(object): 108 def __repr__(self): 109 return "<Mirror %s>" % (self.mirror_id) 110 101 111 class CDROM(object): 102 112 def __repr__(self): … … 116 126 session.mapper(Disk, disk_table) 117 127 session.mapper(Type, types_table) 128 session.mapper(Mirror, mirrors_table) 118 129 session.mapper(CDROM, cdroms_table) 119 130 session.mapper(Autoinstall, autoinstalls_table)
Note: See TracChangeset
for help on using the changeset viewer.