def family_env_columns(): return [ PkName('family'), PkName('trait'), PkBigname('name'), Text('value') ]
def __init__(self, idcol, idtable, name): id_ = PkNum(idcol) id_.set_fk(idtable) tagname = PkName('tag') tagname.set_fk('tagnames') tagval = Text('value') cols = [id_, tagname, tagval] Table.__init__(self, name, cols)
def __init__(self, suite, traits_table): tablename = ujoin(suite, 'scripts') script_column = PkName('script') script_column.set_fk('scriptnames') sfile_column = Num('scriptfile') sfile_column.set_fk('textfiles') script_columns = [script_column, sfile_column] _TraitRelation.__init__(self, traits_table, tablename, script_columns)
def __init__(self, profiles_table): profile_col = PkName('profile') profile_col.set_fk(profiles_table) trait_col = PkName('trait') name_col = PkBigname('name') value_col = Text('value') cols = [profile_col, trait_col, name_col, value_col] tablename = ujoin('profile', 'variables') Table.__init__(self, tablename, cols)
def __init__(self, mach_types_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) trait_col = PkName('trait') name_col = PkBigname('name') value_col = Text('value') cols = [mtype_col, trait_col, name_col, value_col] tablename = ujoin('machine_type', 'variables') Table.__init__(self, tablename, cols)
def __init__(self, name, mach_types_table, disks_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) diskname_col = PkName('diskname') diskname_col.set_fk(disks_table) columns = [mtype_col, diskname_col, PkName('device')] Table.__init__(self, name, columns)
def __init__(self, profiles_table, traits_table): profile_col = PkName('profile') profile_col.set_fk(profiles_table) trait_col = PkName('trait') trait_col.set_fk(traits_table) ord_col = Num('ord') Table.__init__(self, 'profile_trait', [profile_col, trait_col, ord_col])
def __init__(self, machines_table): machine_col = PkName('machine') machine_col.set_fk(machines_table) family_col = PkName('family') family_col.set_fk('families') columns = [machine_col, family_col] Table.__init__(self, 'machine_family', columns)
def __init__(self, fs_table, disks_table): fs_col = PkName('filesystem') fs_col.set_fk(fs_table) diskname_col = PkName('diskname') diskname_col.set_fk(disks_table) columns = [fs_col, diskname_col] Table.__init__(self, 'filesystem_disks', columns)
def __init__(self, machines_table): machine_col = PkName('machine') machine_col.set_fk(machines_table) parent_col = PkName('parent') parent_col.set_fk(machines_table) columns = [machine_col, parent_col] Table.__init__(self, 'machine_parent', columns)
def profile_columns(): return [ PkName('profile'), Name('suite'), Bigname('template'), Text('description') ]
def __init__(self): idcol = PkName('name') keyid = Name('keyid') keyid.constraint.unique = True data = Text('data') columns = [idcol, keyid, data] Table.__init__(self, 'archive_keys', columns)
def __init__(self, fs_table, mounts_table): fs_col = PkName('filesystem') fs_col.set_fk(fs_table) mnt_name_col = PkName('mnt_name') mnt_name_col.set_fk(mounts_table) ord_col = Num('ord') partition_column = Num('partition') columns = [fs_col, mnt_name_col, ord_col, partition_column] Table.__init__(self, 'filesystem_mounts', columns)
def suite_columns(): return [ PkName('suite'), Bool('nonUS'), Bool('updates'), Bool('local'), Bool('common') ]
def __init__(self, suite, traits_table, packages_table): packs_column = PkBigname('package') packs_column.set_fk(packages_table) action_column = PkName('action') action_column.constraint.default = 'install' columns = [packs_column, action_column] tablename = ujoin(suite, 'trait', 'package') _TraitRelation.__init__(self, traits_table, tablename, columns)
def __init__(self): idcol = PkName('apt_id') uri = Bigname('uri') dist = Name('dist') sections = Bigname('sections') local_path = Bigname('local_path') columns = [idcol, uri, dist, sections, local_path] Table.__init__(self, 'apt_sources', columns)
def __init__(self, machines_table): machine_col = PkName('machine') machine_col.set_fk(machines_table) tablename = ujoin('machine', 'scripts') script_column = PkName('script') script_column.set_fk('scriptnames') sfile_column = Num('scriptfile') sfile_column.set_fk('textfiles') columns = [machine_col, script_column, sfile_column] Table.__init__(self, tablename, columns)
def __init__(self): columns = [ PkName('suite'), Bool('nonUS'), Bool('updates'), Bool('local'), Bool('common') ] Table.__init__(self, 'suites', columns)
def __init__(self, suite, traits_table, packages_table): packs_column = PkBigname('package') if not os.environ.has_key('PAELLA_DB_NOPACKAGETABLES'): packs_column.set_fk(packages_table) action_column = PkName('action') action_column.constraint.default = 'install' columns = [packs_column, action_column] tablename = ujoin(suite, 'trait', 'package') _TraitRelation.__init__(self, traits_table, tablename, columns)
def mounts_columns(): return [ PkName('mnt_name'), Name('mnt_point'), Name('fstype'), Name('mnt_opts'), Name('dump'), Name('pass') ]
def __init__(self, kernels_table, profiles_table, diskconfig_table): machine_col = PkName('machine') kernel_col = Name('kernel') kernel_col.set_fk(kernels_table) profile_col = Name('profile') profile_col.set_fk(profiles_table) diskconfig_col = Name('diskconfig') diskconfig_col.set_fk(diskconfig_table) columns = [machine_col, kernel_col, profile_col, diskconfig_col] Table.__init__(self, 'machines', columns)
def __init__(self): columns = [ PkName('suite'), Name('os'), # the columns below aren't being used anymore Bool('nonUS'), Bool('updates'), Bool('local'), Bool('common') ] Table.__init__(self, 'suites', columns)
def __init__(self, mach_types_table, kernels_table, profiles_table, filesystem_table): machine_col = PkName('machine') mtype_col = Name('machine_type') mtype_col.set_fk(mach_types_table) kernel_col = Name('kernel') kernel_col.set_fk(kernels_table) profile_col = Name('profile') profile_col.set_fk(profiles_table) fs_col = Name('filesystem') fs_col.set_fk(filesystem_table, 'filesystem') columns = [machine_col, mtype_col, kernel_col, profile_col, fs_col] Table.__init__(self, 'machines', columns)
def __init__(self, mach_types_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) tablename = ujoin('machine_type', 'scripts') script_column = PkName('script') script_column.set_fk('scriptnames') sfile_column = Num('scriptfile') sfile_column.set_fk('textfiles') script_columns = [mtype_col, script_column, sfile_column] Table.__init__(self, tablename, script_columns)
def __init__(self, mach_types_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) fcol = PkName('family') fcol.set_fk('families') Table.__init__(self, 'machine_type_family', [mtype_col, fcol])
def __init__(self, name, disks_table): diskname_col = PkName('diskname') diskname_col.set_fk(disks_table) columns = [diskname_col] + partition_columns() Table.__init__(self, name, columns)
def currentenv_columns(): return [PkName('hostname'), PkBigname('name'), Text('value')]
def __init__(self, name, mach_types_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) columns = [mtype_col, PkName('module'), Num('ord')] Table.__init__(self, name, columns)
def __init__(self): pcol = PkName('profile') pcol.set_fk('profiles') fcol = PkName('family') fcol.set_fk('families') Table.__init__(self, 'profile_family', [pcol, fcol])
def __init__(self, mach_types_table): mtype_col = PkName('machine_type') mtype_col.set_fk(mach_types_table) pcol = PkName('parent') pcol.set_fk(mach_types_table) Table.__init__(self, 'machine_type_parent', [mtype_col, pcol])
def trait_columns(): return [PkName('trait'), Text('description')]
def __init__(self, suite, traits_table): parent_column = PkName('parent') parent_column.set_fk(traits_table, 'trait') columns = [parent_column] tablename = ujoin(suite, 'trait', 'parent') _TraitRelation.__init__(self, traits_table, tablename, columns)
def __init__(self): idcol = PkName('name') diskconf_col = Text('content') disklist_col = Text('disklist') columns = [idcol, diskconf_col, disklist_col] Table.__init__(self, 'diskconfig', columns)
def defaultenv_columns(): return [PkName('section'), PkBigname('option'), Text('value')]
def __init__(self): idcol = PkName('script') typecol = Name('type') cols = [idcol, typecol] Table.__init__(self, 'scriptnames', cols)
def __init__(self, traits_table, tablename, other_columns): RelationalTable.__init__(self, tablename, traits_table, PkName('trait'), other_columns)
def __init__(self, name='kernels'): kernel_column = PkName('kernel') columns = [kernel_column] Table.__init__(self, name, columns)
def __init__(self, mounts_table): mnt_name_col = PkName('mnt_name') mnt_name_col.set_fk(mounts_table) partition_col = Num('partition') columns = [mnt_name_col, partition_col] Table.__init__(self, 'partition_mounts', columns)
def __init__(self): fcol = PkName('family') fcol.set_fk('families') pcol = PkName('parent') pcol.set_fk('families') Table.__init__(self, 'family_parent', [fcol, pcol])
def __init__(self): magnet = PkName('magnet') magnet.set_fk('magnets') troubleid = Num('troubleid') troubleid.set_fk('troubles') Table.__init__(self, 'trouble_magnets', [magnet, troubleid])