]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
authorLou Berger <lberger@labn.net>
Wed, 19 Oct 2022 11:52:30 +0000 (11:52 +0000)
committerLou Berger <lberger@labn.net>
Wed, 19 Oct 2022 15:02:31 +0000 (15:02 +0000)
Signed-off-by: Lou Berger <lberger@labn.net>
ospfclient/ospfclient.py

index c7cfc88b9c0fac89100094a3f4d219b3f3ba5315..19561145a09484fe45afdcb1dfc0fbb802397306 100755 (executable)
@@ -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)