summaryrefslogtreecommitdiffstats
path: root/ospfclient
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2022-10-19 13:52:30 +0200
committerLou Berger <lberger@labn.net>2022-10-19 17:02:31 +0200
commit20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912 (patch)
treee612dd6e20ecfd69b12b85394b24b84ee7f03ef2 /ospfclient
parentospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250) (diff)
downloadfrr-20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912.tar.xz
frr-20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912.zip
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'ospfclient')
-rwxr-xr-xospfclient/ospfclient.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ospfclient/ospfclient.py b/ospfclient/ospfclient.py
index c7cfc88b9..19561145a 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)