From: Lou Berger Date: Wed, 19 Oct 2022 11:52:30 +0000 (+0000) Subject: ospfclient: add 'wait,' action to ospfclient.py - for testing X-Git-Tag: frr-8.3.2~9^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=0bff7a94a1d5bfe409e050d922d811673636de9d;p=matthieu%2Ffrr.git ospfclient: add 'wait,' action to ospfclient.py - for testing Signed-off-by: Lou Berger (cherry picked from commit 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912) --- diff --git a/ospfclient/ospfclient.py b/ospfclient/ospfclient.py index be8b51f007..91b9846a90 100755 --- a/ospfclient/ospfclient.py +++ b/ospfclient/ospfclient.py @@ -1048,6 +1048,12 @@ async def async_main(args): for action in args.actions: _s = action.split(",") what = _s.pop(False) + if what.casefold() == "wait": + stime = int(_s.pop(False)) + logging.info("waiting %s seconds", stime) + await asyncio.sleep(stime) + logging.info("wait complete: %s seconds", stime) + continue ltype = int(_s.pop(False)) if ltype == 11: addr = ip(0)