Ejemplo n.º 1
0
def main():
    args = build_help()
    configure_logging(logger, args.debug)

    print(run(args.vendor, args.hostname, args.user, args.password, args.strategy,
              args.optional_args, args.config_file, args.dry_run))
    sys.exit(0)
Ejemplo n.º 2
0
def main():
    args = build_help(configure=True)
    configure_logging(logger, args.debug)

    print(run(args.vendor, args.hostname, args.user, args.password, args.strategy,
              args.optional_args, args.config_file, args.dry_run))
    sys.exit(0)
def main():
    args = build_help(validate=True)
    configure_logging(logger, args.debug)

    logger.debug('Getting driver for OS "{driver}"'.format(driver=args.vendor))
    driver = get_network_driver(args.vendor)

    optional_args = parse_optional_args(args.optional_args)
    logger.debug('Connecting to device "{}" with user "{}" and optional_args={}'.format(
                 args.hostname, args.user, optional_args))

    with driver(args.hostname, args.user, args.password, optional_args=optional_args) as device:
        logger.debug('Generating compliance report')
        print(json.dumps(device.compliance_report(args.validation_file), indent=4))
        logger.debug('Closing session')
    sys.exit(0)
def main():
    args = build_help(validate=True)
    configure_logging(logger, args.debug)

    logger.debug('Getting driver for OS "{driver}"'.format(driver=args.vendor))
    driver = get_network_driver(args.vendor)

    optional_args = parse_optional_args(args.optional_args)
    logger.debug('Connecting to device "{}" with user "{}" and optional_args={}'.format(
                 args.hostname, args.user, optional_args))

    with driver(args.hostname, args.user, args.password, optional_args=optional_args) as device:
        logger.debug('Generating compliance report')
        print(json.dumps(device.compliance_report(args.validation_file), indent=4))
        logger.debug('Closing session')
    sys.exit(0)
def main():
    args = build_help(connect_test=True)
    configure_logging(logger, args.debug)

    logger.debug('Getting driver for OS "{driver}"'.format(driver=args.vendor))
    driver = get_network_driver(args.vendor)

    optional_args = parse_optional_args(args.optional_args)
    logger.debug('Connecting to device "{}" with user "{}" and optional_args={}'.format(
                 args.hostname, args.user, optional_args))

    with driver(args.hostname,
                args.user,
                args.password,
                optional_args=optional_args) as device:
        logger.debug('Successfully connected to the device: {}'.format(device.hostname))
        print('Successfully connected to the device')
    sys.exit(0)
Ejemplo n.º 6
0
def main():
    args = build_help(connect_test=True)
    configure_logging(logger, args.debug)

    logger.debug('Getting driver for OS "{driver}"'.format(driver=args.vendor))
    driver = get_network_driver(args.vendor)

    optional_args = parse_optional_args(args.optional_args)
    logger.debug(
        'Connecting to device "{}" with user "{}" and optional_args={}'.format(
            device=args.hostname, user=args.user, optional_args=optional_args))

    with driver(args.hostname,
                args.user,
                args.password,
                optional_args=optional_args) as device:
        logger.debug('Successfully connected to the device: {}'.format(device))
        print('Successfully connected to the device')
    sys.exit(0)
Ejemplo n.º 7
0
def main():
    args = build_help()
    helpers.configure_logging(logger, debug=args.debug)
    logger.debug("Starting napalm's debugging tool")
    check_installed_packages()
    run_tests(args)
Ejemplo n.º 8
0
def main():
    args = build_help()
    helpers.configure_logging(logger, debug=args.debug)
    logger.debug("Starting napalm's debugging tool")
    check_installed_packages()
    run_tests(args)