def primary_tables(): tables = [] # Textfiles tables.append(TextFilesTable()) # Archive Keys tables.append(ArchiveKeyTable()) # All Suites tables.append(SuitesTable()) # Apt Sources Table tables.append(AptSourcesTable()) # Apt Source Packages Table tables.append(AptSourcePackagesTable()) # Suite-AptSource Relation tables.append(SuiteAptSourcesTable()) # 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 = ScriptNames() 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) # Disk Config tables.append(DiskConfigTable()) # Kernels tables.append(KernelsTable()) # Machines tables.append(MachinesTable('kernels', 'profiles', 'diskconfig')) # Machine Parents tables.append(MachineParentsTable('machines')) # Machine Family tables.append(MachineFamilyTable('machines')) # Machine Environment tables.append(MachineEnvironment('machines')) # Machine Scripts tables.append(MachineScript('machines')) return tables, dict([(t.name, t) for t in tables])
def primary_tables(): tables = [] # Textfiles tables.append(TextFilesTable()) # Archive Keys tables.append(ArchiveKeyTable()) # All Suites tables.append(SuitesTable()) # Apt Sources Table tables.append(AptSourcesTable()) # Apt Source Packages Table tables.append(AptSourcePackagesTable()) # Suite-AptSource Relation tables.append(SuiteAptSourcesTable()) # 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)) # MachineTypesTables mtparent = MachineTypeParentsTable('machine_types') tables.append(mtparent) mtfamily = MachineTypeFamilyTable('machine_types') tables.append(mtfamily) mtenviron = MachineTypeEnvironment('machine_types') tables.append(mtenviron) mtscript = MachineTypeScript('machine_types') tables.append(mtscript) # 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])