Ignore:
Timestamp:
Feb 16, 2009, 11:52:01 PM (16 years ago)
Author:
iannucci
Message:

RAM quotas at remctl; RAM quota exception script, table, and usage in -web and -remote-create; /etc/nocreate support

Location:
trunk/packages/invirt-database/python/database
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-database/python/database/models.py

    r1714 r2132  
    1717           'mirrors_table',
    1818           'autoinstalls_table',
     19           'owners_table',
    1920           'Machine',
    2021           'MachineAccess',
     
    2526           'Mirror',
    2627           'Autoinstall',
     28           'Owner',
    2729           'or_',
    2830           ]
     
    8385       Column('arch', String, nullable=False))
    8486
     87owners_table = Table('owners', meta,
     88       Column('owner_id', String, primary_key=True, nullable=False),
     89       Column('ram_quota_total', Integer, nullable=True),
     90       Column('ram_quota_single', Integer, nullable=True))
     91
    8592machine_access_table = Table('machine_access', meta,
    8693       Column('machine_id', Integer, ForeignKey('machines.machine_id', ondelete='CASCADE'), nullable=False, index=True),
     
    120127        return "<Autoinstall %s: %s (%s)>" % (self.autoinstall_id, self.description, self.type.type_id)
    121128
     129from owner import Owner
     130
    122131session.mapper(Machine, machine_table,
    123132              properties={'nics': relation(NIC, backref="machine"),
     
    133142               properties={'mirror': relation(Mirror, backref="cdroms")})
    134143session.mapper(Autoinstall, autoinstalls_table)
     144session.mapper(Owner, owners_table)
    135145
    136146def clear_cache():
Note: See TracChangeset for help on using the changeset viewer.