Example #1
0
def interract_once(net):
    import interract

    if args.watcher_start_event or args.watcher_post_event or args.watcher_probe:
        interract.wait_start_events(args.watcher_start_event)

        interract.post_events(net, netprobes, args.watcher_post_event)

        if args.watcher_probe is not None:
            # interract.wait_process(netprobes[args.watcher_probe])
            interract.wait_reset(args.watcher_reset_event)
            interract.make_watcher_results(args.watcher_log, args.watcher_output, vars.topoFile, pparams, watcher_type = args.watcher_type)
Example #2
0
def interract_mul(net):
    import interract

    if args.watcher_wait_up is not None:
        interract.wait_file(args.watcher_wait_up)
    try:
        for simargs in args.simulations:
            # parse parameters for this simulation
            if args.sim_prepend is not None:
                pre = args.sim_prepend.format(sim = "'%s'" % simargs)
            else:
                pre = simargs
            interract.pre_events(net, netprobes, pre)

            interract.wait_start_events(args.watcher_start_event)

            interract.post_events(net, netprobes, args.watcher_post_event)

            interract.wait_reset(args.watcher_reset_event)
            interract.make_watcher_results(args.watcher_log, args.watcher_output, vars.topoFile, pparams, watcher_type = args.watcher_type)

    except (Exception, SystemExit) as e:
        lg.error(e)