def METHOD_NAME(router, peer):
    "Wait until peer is present on interface."
    logger.info("waiting BFD peer {} in {}".format(peer, router))
    test_func = partial(
        topotest.router_json_cmp,
        tgen.gears[router],
        "show bfd peers json",
        [{"peer": peer, "status": "up"}],
    )
    _, result = topotest.run_and_expect(test_func, None, count=10, wait=1)
    assertmsg = '"{}" BFD convergence failure'.format(router)
    assert result is None, assertmsg