Пример #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):
     scol = PkName('script')
     tcol = Name('type')
     tcol.set_fk('scriptnames')
     fcol = Text('scriptfile')
     columns = [scol, tcol] + suiteversion_cols() + [fcol]
     Table.__init__(self, 'scripts', columns)
Пример #3
0
def template_columns():
    return [
        PkBigname('template'),
        Name('mode'),
        Name('owner'),
        Name('grp_owner'),
        Num('templatefile')
    ]
Пример #4
0
def mounts_columns():
    return [
        PkName('mnt_name'),
        Name('mnt_point'),
        Name('fstype'),
        Name('mnt_opts'),
        Name('dump'),
        Name('pass')
    ]
Пример #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')
    ]
Пример #6
0
def profile_columns():
    return [
        PkName('profile'),
        Name('suite'),
        Bigname('template'),
        Text('description')
    ]
Пример #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)
Пример #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)
Пример #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'),
Пример #10
0
def suiteversion_cols():
        scol = Name('suite')
        scol.set_fk('suites')
        vcol = PkNum('version')
        return [vcol, scol]
Пример #11
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)
Пример #12
0
def suiteversion_cols():
    scol = Name('suite')
    scol.set_fk('suites')
    vcol = PkNum('version')
    return [vcol, scol]
Пример #13
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)
Пример #14
0
 def __init__(self):
     columns = [PkName('family'), Name('type')]
     Table.__init__(self, 'families', columns)
Пример #15
0
def currentenv_columns():
    return [Name('hostname'), Bigname('name'), Text('value')]
Пример #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)
Пример #17
0
 def __init__(self, name):
     cols = [Name('system')]
     Table.__init__(self, name, system)
Пример #18
0
def trait_columns():
    return [PkName('trait'), Name('priority'), Text('description')]