]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 21 Oct 2022 15:23:53 +0000 (15:23 +0000)
Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912)

ospfclient/ospfclient.py

index be8b51f007373ed5c30e4c50074fc84667d54ce8..91b9846a90b38e65ff51231db2224c2063986dc2 100755 (executable)
@@ -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)