Example #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)
 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)
Example #3
0
def template_columns():
    return [
        PkBigname('template'),
        Name('mode'),
        Name('owner'),
        Name('grp_owner'),
        Num('templatefile')
    ]
Example #4
0
def mounts_columns():
    return [
        PkName('mnt_name'),
        Name('mnt_point'),
        Name('fstype'),
        Name('mnt_opts'),
        Name('dump'),
        Name('pass')
    ]
Example #5
0
def packages_columns():
    return [
        PkBigname('package'),
        Name('priority'),
        Bigname('section'),
        Num('installedsize'),
        Bigname('filename'),
        Bigname('maintainer'),
        Bigname('size'),
        Name('md5sum'),
        Bigname('version'),
        Text('description')
    ]
Example #6
0
def profile_columns():
    return [
        PkName('profile'),
        Name('suite'),
        Bigname('template'),
        Text('description')
    ]
Example #7
0
 def __init__(self, suite, traits_table, packages_table):
     packs_column = PkBigname('package')
     packs_column.set_fk(packages_table)
     action_column = Name('action')
     action_column.constraint.default = 'install'
     columns = [packs_column, action_column]
     tablename = ujoin(suite, 'trait', 'package')
     _TraitRelation.__init__(self, traits_table, tablename, columns)
Example #8
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)
Example #9
0
from paella.sqlgen.classes import Column, Table
from paella.sqlgen.defaults import Text
from paella.sqlgen.defaults import PkBigname, Bigname, Name, Num

dpkg_tables = ['available', 'status', 'filelist', 'md5sums', 'conffiles']
other_tables = ['current']

common_columns = [
    PkBigname('package'),
    Name('essential'),
    Name('priority'),
    Name('section'),
    Num('installedsize'),
    Bigname('maintainer'),
    Name('version')
]

#columns for /var/lib/dpkg/status
status_columns = common_columns + [
    Name('status'),
    Text('replaces'),
    Text('provides'),
    Text('predepends'),
    Text('conflicts'),
    Bigname('source'),
    Text('suggests'),
    Text('recommends'),
    Text('depends'),
    Text('conffiles'),
    Text('description'),
    Bigname('origin'),
def suiteversion_cols():
        scol = Name('suite')
        scol.set_fk('suites')
        vcol = PkNum('version')
        return [vcol, scol]
 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)
Example #12
0
def suiteversion_cols():
    scol = Name('suite')
    scol.set_fk('suites')
    vcol = PkNum('version')
    return [vcol, scol]
 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)
Example #14
0
 def __init__(self):
     columns = [PkName('family'), Name('type')]
     Table.__init__(self, 'families', columns)
Example #15
0
def currentenv_columns():
    return [Name('hostname'), Bigname('name'), Text('value')]
Example #16
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)
Example #17
0
 def __init__(self, name):
     cols = [Name('system')]
     Table.__init__(self, name, system)
Example #18
0
def trait_columns():
    return [PkName('trait'), Name('priority'), Text('description')]