예제 #1
0
 def __init__(self):
     scol = PkName('script')
     tcol = Name('type')
     tcol.set_fk('scriptnames')
     fcol = Text('scriptfile')
     columns = [scol, tcol] + suiteversion_cols() + [fcol]
     Table.__init__(self, 'scripts', columns)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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])
예제 #5
0
 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)
예제 #6
0
 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)
예제 #7
0
 def __init__(self):
     scol = PkName('script')
     tcol = Name('type')
     tcol.set_fk('scriptnames')
     fcol = Text('scriptfile')
     columns = [scol, tcol] + suiteversion_cols() + [fcol]
     Table.__init__(self, 'scripts', columns)
예제 #8
0
 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)
예제 #9
0
 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])
예제 #10
0
 def __init__(self):
     idcol = PkNum('fileid')
     idcol.set_auto_increment('textfile_ident')
     mcol = Name('md5size')
     mcol.constraint.unique = True
     dcol = Text('data')
     columns = [idcol, mcol, dcol]
     Table.__init__(self, 'textfiles', columns)
예제 #11
0
 def __init__(self):
     release_columns = [
         PkName('name'),
         PkName('type'),
         PkBigname('path'),
         Num('size'),
         Name('md5sum')]
     Table.__init__(self, 'release', release_columns)
예제 #12
0
 def __init__(self, suite, traits_table, prio_table):
     tablename = ujoin(suite, 'traits')
     columns = trait_columns()
     trait = getcolumn('trait', columns)
     priority = getcolumn('priority', columns)
     trait.set_fk(traits_table)
     priority.set_fk(prio_table)
     Table.__init__(self, tablename, columns)
예제 #13
0
 def __init__(self, suite, traits_table, prio_table):
     tablename = ujoin(suite, 'traits')
     columns = trait_columns()
     trait = getcolumn('trait', columns)
     priority = getcolumn('priority', columns)
     trait.set_fk(traits_table)
     priority.set_fk(prio_table)
     Table.__init__(self, tablename, columns)
예제 #14
0
 def __init__(self, suite, traits_table, prio_table):
     tablename = ujoin(suite, "traits")
     columns = trait_columns()
     trait = getcolumn("trait", columns)
     priority = getcolumn("priority", columns)
     trait.set_fk(traits_table)
     priority.set_fk(prio_table)
     Table.__init__(self, tablename, columns)
예제 #15
0
 def __init__(self):
     idcol = PkNum("fileid")
     idcol.set_auto_increment("textfile_ident")
     mcol = Name("md5size")
     mcol.constraint.unique = True
     dcol = Text("data")
     columns = [idcol, mcol, dcol]
     Table.__init__(self, "textfiles", columns)
예제 #16
0
 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])
예제 #17
0
 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)
예제 #18
0
 def __init__(self, name, type, section):
     fullparse_columns = [
         PkBigname('package'),
         PkBigname('name'),
         Text('value')]
     type = type.replace('-', '')
     section = section.replace('-', '')
     tablename = fullparse_tablename(name, type, section)
     Table.__init__(self, tablename, fullparse_columns)
예제 #19
0
 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)
예제 #20
0
 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)
예제 #21
0
 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)
예제 #22
0
 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)
예제 #23
0
 def __init__(self):
     source_columns = [
         PkName('name'),
         PkName('type'),
         Bigname('uri'),
         Name('suite'),
         Bigname('remote'),
         Bigname('srcline')]
     Table.__init__(self, 'sources', source_columns)
예제 #24
0
 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)
예제 #25
0
 def __init__(self, name, section='__default__'):
     sourcelist_columns = [
         PkBigname('package'),
         PkBigname('directory'),
         Name('md5sum'),
         Num('size'),
         PkBigname('filename')]
     section = section.replace('-', '')
     tablename = list_tablename(name, 'deb-src', section)
     Table.__init__(self, tablename, sourcelist_columns)
예제 #26
0
 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)
예제 #27
0
 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)
예제 #28
0
 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)
예제 #29
0
 def __init__(self, name, section='__default__'):
     packagelist_columns = [
         PkBigname('package'),
         Name('priority'),
         Name('section'),
         Num('installedsize'),
         Bigname('maintainer'),
         Name('architecture'),
         Name('version'),
         Bigname('filename'),
         Num('size'),
         Name('md5sum'),
         Text('description')]
     section = section.replace('-', '')
     tablename = list_tablename(name, 'deb', section)
     Table.__init__(self, tablename, packagelist_columns)
예제 #30
0
 def __init__(self):
     fcol = PkName('family')
     fcol.set_fk('families')
     pcol = PkName('parent')
     pcol.set_fk('families')
     Table.__init__(self, 'family_parent', [fcol, pcol])
예제 #31
0
 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)
예제 #32
0
 def __init__(self, name):
     Table.__init__(self, name, filelist_columns)
예제 #33
0
 def __init__(self, name, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     columns = [mtype_col, PkName('module')]
     Table.__init__(self, name, columns)
예제 #34
0
 def __init__(self, name):
     Table.__init__(self, name, md5sums_columns)
예제 #35
0
 def __init__(self, name):
     Table.__init__(self, name, status_columns)
예제 #36
0
 def __init__(self):
     pcol = PkName('profile')
     pcol.set_fk('profiles')
     fcol = PkName('family')
     fcol.set_fk('families')
     Table.__init__(self, 'profile_family', [pcol, fcol])
예제 #37
0
 def __init__(self, suite_table):
     columns = profile_columns()
     suite = getcolumn('suite', columns)
     suite.set_fk(suite_table)
     Table.__init__(self, 'profiles', columns)
예제 #38
0
 def __init__(self):
     columns = family_env_columns()
     columns[0].set_fk('families')
     columns[1].set_fk('traits')
     Table.__init__(self, 'family_environment', columns)
예제 #39
0
 def __init__(self):
     fcol = PkName('family')
     fcol.set_fk('families')
     pcol = PkName('parent')
     pcol.set_fk('families')
     Table.__init__(self, 'family_parent', [fcol, pcol])
예제 #40
0
 def __init__(self):
     fs_col = PkName('filesystem')
     Table.__init__(self, 'filesystems', [fs_col])
예제 #41
0
 def __init__(self, suite_table):
     columns = profile_columns()
     suite = getcolumn('suite', columns)
     suite.set_fk(suite_table)
     Table.__init__(self, 'profiles', columns)
예제 #42
0
 def __init__(self):
     tcol = PkBigname('template')
     fcol = Text('templatefile')
     columns = [tcol] + suiteversion_cols() + [fcol]
     Table.__init__(self, 'templates', columns)
예제 #43
0
 def __init__(self, name):
     Table.__init__(self, name, available_columns)
예제 #44
0
 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)
예제 #45
0
 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)
예제 #46
0
 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)
예제 #47
0
 def __init__(self):
     tcol = PkBigname('template')
     fcol = Text('templatefile')
     columns = [tcol] + suiteversion_cols() + [fcol]
     Table.__init__(self, 'templates', columns)
예제 #48
0
 def __init__(self, name='kernels'):
     Table.__init__(self, name, [PkName('kernel')])
예제 #49
0
 def __init__(self):
     fs_col = PkName('filesystem')
     Table.__init__(self, 'filesystems', [fs_col])
예제 #50
0
 def __init__(self, name='mounts'):
     Table.__init__(self, name, mounts_columns())
예제 #51
0
 def __init__(self, name):
     cols = [Name('system')]
     Table.__init__(self, name, system)
예제 #52
0
 def __init__(self, name='machine_types'):
     Table.__init__(self, name, [PkName('machine_type')])
예제 #53
0
 def __init__(self, name='disks'):
     Table.__init__(self, name, [PkName('diskname')])
예제 #54
0
 def __init__(self, suite):
     tablename = ujoin(suite, 'packages')
     Table.__init__(self, tablename, packages_columns())
예제 #55
0
 def __init__(self):
     columns = [PkName('family'),
                Name('type')]
     Table.__init__(self, 'families', columns)
예제 #56
0
 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)
예제 #57
0
 def __init__(self):
     columns = family_env_columns()
     columns[0].set_fk('families')
     Table.__init__(self, 'family_environment', columns)
예제 #58
0
def primary_tables():
    tables = []
    #Textfiles
    tables.append(TextFilesTable())
    #All Suites
    tables.append(Table('suites', suite_columns()))
    #All Traits
    tables.append(PkNameTable('traits', 'trait'))
    #All Priorities
    tables.append(PkNameTable('priorities', 'priority'))
    #All Families
    tables.append(FamilyTable())
    #Family Parents
    tables.append(FamilyParentsTable())
    #Family Environment
    tables.append(FamilyEnviromentTable())
    #All Profiles
    profiles = ProfileTable('suites')
    tables.append(profiles)
    #All Script Names
    scripts = PkNameTable('scriptnames', 'script')
    tables.append(scripts)
    #Profile - Trait relation
    profile_trait_table = ProfileTrait('profiles', 'traits')
    tables.append(profile_trait_table)
    #Profile Environment
    profile_variables = ProfileEnvironment('profiles')
    tables.append(profile_variables)
    #Profile Family
    tables.append(ProfileFamilyTable())
    #Default Environment
    defaultenv = Table('default_environment', defaultenv_columns())
    tables.append(defaultenv)
    #Current Environment
    currentenv = Table('current_environment', currentenv_columns())
    tables.append(currentenv)
    #Disks
    tables.append(DisksTable())
    #Machine Types
    tables.append(MachineTypesTable())
    #Mounts
    tables.append(MountsTable())
    #Kernels
    tables.append(KernelsTable())
    #Partitions
    tables.append(PartitionsTable('partitions', 'disks'))
    #Partition Workspace
    pwcols = [PkName('diskname')] + partition_columns()
    tables.append(Table('partition_workspace', pwcols))
    #Machine Disks
    machine_disks = MachineDisksTable('machine_disks', 'machine_types',
                                      'disks')
    tables.append(machine_disks)
    #Machine Modules
    machine_modules = MachineModulesTable('machine_modules', 'machine_types')
    tables.append(machine_modules)
    #Filesystems
    tables.append(FilesystemsTable())
    #Filesystem Mounts
    tables.append(FilesystemMountsTable('filesystems', 'mounts'))
    #Filesystem Disks
    tables.append(FilesystemDisksTable('filesystems', 'disks'))
    #Machines
    machines = MachinesTable('machine_types', 'kernels', 'profiles',
                             'filesystems')
    tables.append(machines)

    return tables, dict([(t.name, t) for t in tables])
예제 #59
0
 def __init__(self):
     pcol = PkName('profile')
     pcol.set_fk('profiles')
     fcol = PkName('family')
     fcol.set_fk('families')
     Table.__init__(self, 'profile_family', [pcol, fcol])
예제 #60
0
 def __init__(self):
     columns = [PkName('family'), Name('type')]
     Table.__init__(self, 'families', columns)