Changeset 1247


Ignore:
Timestamp:
Oct 25, 2008, 2:50:44 PM (16 years ago)
Author:
broder
Message:

Add the CDROM mirrors table

Location:
trunk/packages/sipb-xen-database
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/debian/changelog

    r1245 r1247  
    22
    33  * Kill the remnants of the sipb_xen_database package
    4 
    5  -- Evan Broder <broder@mit.edu>  Sat, 25 Oct 2008 14:11:12 -0400
     4  * Add the CDROM mirrors table
     5
     6 -- Evan Broder <broder@mit.edu>  Sat, 25 Oct 2008 14:48:32 -0400
    67
    78sipb-xen-database (10.35) unstable; urgency=low
  • trunk/packages/sipb-xen-database/python/database/models.py

    r1174 r1247  
    6363       Column('pae', Boolean, nullable=False))
    6464
     65mirrors_table = Table('mirrors', meta,
     66       Column('mirror_id', String, primary_key=True, nullable=False),
     67       Column('uri_prefix', String, nullable=False))
     68
    6569cdroms_table = Table('cdroms', meta,
    6670       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))
    6874
    6975autoinstalls_table = Table('autoinstalls', meta,
     
    99105        return "<Type %s: %s>" % (self.type_id, self.description)
    100106
     107class Mirror(object):
     108    def __repr__(self):
     109        return "<Mirror %s>" % (self.mirror_id)
     110
    101111class CDROM(object):
    102112    def __repr__(self):
     
    116126session.mapper(Disk, disk_table)
    117127session.mapper(Type, types_table)
     128session.mapper(Mirror, mirrors_table)
    118129session.mapper(CDROM, cdroms_table)
    119130session.mapper(Autoinstall, autoinstalls_table)
Note: See TracChangeset for help on using the changeset viewer.