Esempio n. 1
0
def get_params(args):
    parser = database_arg_parser(discover_parser, USAGE)
    parser.add_argument('table', nargs=1, help='database table name')
    parser.add_argument('constraints', nargs='?',
                        help='name of constraints file to create')
    params = {}
    flags = database_arg_flags(discover_flags, parser, args, params)
    params['table'] = flags.table[0] if flags.table else None
    params['constraints_path'] = flags.constraints
    return params
Esempio n. 2
0
def get_params(args):
    parser = database_arg_parser(discover_parser, USAGE)
    parser.add_argument('table', nargs=1, help='database table name')
    parser.add_argument('constraints',
                        nargs='?',
                        help='name of constraints file to create')
    params = {}
    flags = database_arg_flags(discover_flags, parser, args, params)
    params['table'] = flags.table[0] if flags.table else None
    params['constraints_path'] = flags.constraints
    return params
Esempio n. 3
0
def get_verify_params(args):
    parser = database_arg_parser(verify_parser, USAGE)
    parser.add_argument('table', nargs=1, help='database table name')
    parser.add_argument('constraints',
                        nargs=1,
                        help='constraints file to verify against')
    params = {}
    flags = database_arg_flags(verify_flags, parser, args, params)
    params['table'] = flags.table[0] if flags.table else None
    params['constraints_path'] = (flags.constraints[0]
                                  if flags.constraints else None)
    return params
Esempio n. 4
0
File: detect.py Progetto: tdda/tdda
def get_detect_params(args):
    parser = database_arg_parser(detect_parser, USAGE)
    parser.add_argument('table', nargs=1, help='database table name')
    parser.add_argument('constraints', nargs=1,
                        help='constraints file to verify against')
    parser.add_argument('outpath', nargs='?',
                        help='file to write detection results to')
    params = {}
    flags = database_arg_flags(detect_flags, parser, args, params)
    params['table'] = flags.table[0] if flags.table else None
    params['constraints_path'] = (flags.constraints[0] if flags.constraints
                                  else None)
    params['outpath'] = flags.outpath
    return params
Esempio n. 5
0
def get_detect_params(args):
    parser = database_arg_parser(detect_parser, USAGE)
    parser.add_argument('table', nargs=1, help='database table name')
    parser.add_argument('constraints',
                        nargs=1,
                        help='constraints file to verify against')
    parser.add_argument('outpath',
                        nargs='?',
                        help='file to write detection results to')
    params = {}
    flags = database_arg_flags(detect_flags, parser, args, params)
    params['table'] = flags.table[0] if flags.table else None
    params['constraints_path'] = (flags.constraints[0]
                                  if flags.constraints else None)
    params['outpath'] = flags.outpath
    return params