def METHOD_NAME(router, iptype, route, proto):
    "Wait until route is present on RIB for protocol."
    logger.info("waiting route {} in {}".format(route, router))
    test_func = partial(
        topotest.router_json_cmp,
        tgen.gears[router],
        "show {} route json".format(iptype),
        {route: [{"protocol": proto}]},
    )
    _, result = topotest.run_and_expect(test_func, None, count=40, wait=1)
    assertmsg = '"{}" OSPF convergence failure'.format(router)
    assert result is None, assertmsg