Exemplo n.º 1
0
def get(args):
    if args.key and args.value:
        print("Geting data from DB: %s" % args.db_file)
        print("Request data for host(s) with %s %s" % (args.key, args.value))
        pds.get_data(args.db_file, args.key, args.value)
    elif args.key or args.value:
        print("Please give two or zero args\n")
        print(show_subparser_help('get'))
    else:
        print("Showing %s content..." % args.db_file)
        pds.get_all_data(args.db_file)
Exemplo n.º 2
0
def get(args):
    if args.key and args.value:
        print('Данные из БД: {}'.format(args.db_file))
        print('Информация об устройствах с такими параметрами:', args.key,
              args.value)
        pds.get_data(args.db_file, args.key, args.value)
    elif args.key or args.value:
        print('Пожалуйста, введите два или ноль аргументов\n')
        print(show_subparser_help('get'))
    else:
        print('В таблице dhcp такие записи:')
        pds.get_all_data(args.db_file)
def get(args):
    if args.key and args.value:
        print('Data from the database: {}'.format(args.db_file))
        print('Information about devices with the following parameters:',
              args.key, args.value)
        pds.get_data(args.db_file, args.key, args.value)
    elif args.key or args.value:
        print('Please enter two or zero arguments\n')
        print(show_subparser_help('get'))
    else:
        print('The dhcp table has the following entries:')
        pds.get_all_data(args.db_file)
Exemplo n.º 4
0
def get(args):
    if args.key and args.value:
        print('Geting data from DB: {}'.format(args.db_file))
        print('Request data for host(s) with {} {}'.format(
            args.key, args.value))
        pds.get_data(args.db_file, args.key, args.value)
    elif args.key or args.value:
        print('Please give two or zero args\n')
        print(show_subparser_help('get'))
    else:
        print('Showing {} content...'.format(args.db_file))
        pds.get_all_data(args.db_file)
Exemplo n.º 5
0
def get(args):
    if args.key and args.value:
        print("Data from the database: {}".format(args.db_file))
        print(
            "Information about devices with the following parameters:",
            args.key,
            args.value,
        )
        pds.get_data(args.db_file, args.key, args.value)
    elif args.key or args.value:
        print("Please enter two or zero arguments\n")
        print(show_subparser_help("get"))
    else:
        print("The dhcp table has the following entries:")
        pds.get_all_data(args.db_file)