From 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912 Mon Sep 17 00:00:00 2001 From: Lou Berger Date: Wed, 19 Oct 2022 11:52:30 +0000 Subject: [PATCH] ospfclient: add 'wait,' action to ospfclient.py - for testing Signed-off-by: Lou Berger --- ospfclient/ospfclient.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ospfclient/ospfclient.py b/ospfclient/ospfclient.py index c7cfc88b9c..19561145a0 100755 --- a/ospfclient/ospfclient.py +++ b/ospfclient/ospfclient.py @@ -1099,6 +1099,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)