Beispiel #1
0
def parser(stdout, stderr):
    output = {}
    if stdout:
        output = parseSpaceTable(stdout)
        output = tableToDict(output, 'name')

    return {'output': output}
Beispiel #2
0
def parser(stdout, stderr):
    columnsNames = [
        'username', 'password', 'uid', 'gid', 'idInfo', 'homeDir', 'shell'
    ]
    output = parseCharDelimitedTable(stdout, ':', columnsNames)
    output = tableToDict(output, 'username')
    return {'output': output}
Beispiel #3
0
def parser(stdout, stderr):
    columnsNames = [
        'username', 'password', 'lastPasswordChange', 'minimum', 'maximum',
        'warn', 'inactive', 'expire'
    ]
    output = parseCharDelimitedTable(stdout, ':', columnsNames)
    output = tableToDict(output, 'username')
    return {'output': output}
Beispiel #4
0
def parser(stdout, stderr):
    output = {}
    columns = [
        'installtime', 'buildtime', 'name', 'version', 'release', 'arch',
        'vendor', 'packager', 'distribution', 'disttag'
    ]
    if stdout:
        output = parseCharDelimitedTable(stdout, '|', columns)
        output = tableToDict(output, 'name')

    return {'output': output}
Beispiel #5
0
def parser(stdout, stderr):
    columnsNames = ['groupName', 'password', 'gid', 'groupList']
    output = parseCharDelimitedTable(stdout, ':', columnsNames)
    output = tableToDict(output, 'groupName')
    return {'output': output}
Beispiel #6
0
def parser_services(stdout, stderr):
    output = parseTable(stdout)
    output = tableToDict(output, 'unit')
    return {'output': output}