def family_env_columns(): return [ PkName('family'), PkName('trait'), PkBigname('name'), Text('value') ]
def __init__(self, suite, traits_table): tablename = ujoin(suite, 'scripts') script_column = PkName('script') script_column.set_fk('scriptnames') sfile_column = Oid('scriptfile') script_columns = [script_column, sfile_column] _TraitRelation.__init__(self, traits_table, tablename, script_columns)
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, 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, 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, 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, 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): scol = PkName('script') tcol = Name('type') tcol.set_fk('scriptnames') fcol = Text('scriptfile') columns = [scol, tcol] + suiteversion_cols() + [fcol] Table.__init__(self, 'scripts', columns)
def profile_columns(): return [ PkName('profile'), Name('suite'), Bigname('template'), Text('description') ]
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 mounts_columns(): return [ PkName('mnt_name'), Name('mnt_point'), Name('fstype'), Name('mnt_opts'), Name('dump'), Name('pass') ]
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, 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, 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, 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 __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, 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, 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, traits_table, tablename, other_columns): RelationalTable.__init__(self, tablename, traits_table, PkName('trait'), other_columns)
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)
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, 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, name='kernels'): Table.__init__(self, name, [PkName('kernel')])
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): fcol = PkName('family') fcol.set_fk('families') pcol = PkName('parent') pcol.set_fk('families') Table.__init__(self, 'family_parent', [fcol, pcol])
def partition_columns(): return [PkName('partition'), Num('start'), Num('size'), Num('Id')]
def __init__(self, profiles_table, tablename, other_columns): RelationalTable.__init__(self, tablename, profiles_table, PkName('profile'), other_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, name, disks_table): diskname_col = PkName('diskname') diskname_col.set_fk(disks_table) columns = [diskname_col] + partition_columns() 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, 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 defaultenv_columns(): return [PkName('section'), PkBigname('option'), Text('value')]
def __init__(self, name='machine_types'): Table.__init__(self, name, [PkName('machine_type')])
def __init__(self, name='disks'): Table.__init__(self, name, [PkName('diskname')])
def __init__(self): fs_col = PkName('filesystem') Table.__init__(self, 'filesystems', [fs_col])
def trait_columns(): return [PkName('trait'), Name('priority'), Text('description')]
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])
def __init__(self): columns = [PkName('family'), Name('type')] Table.__init__(self, 'families', columns)