diff options
| author | Lou Berger <lberger@labn.net> | 2022-10-19 11:52:30 +0000 |
|---|---|---|
| committer | Lou Berger <lberger@labn.net> | 2022-10-19 15:02:31 +0000 |
| commit | 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912 (patch) | |
| tree | e612dd6e20ecfd69b12b85394b24b84ee7f03ef2 /ospfclient/ospfclient.py | |
| parent | 0b91fce78b0bcd601e1c9eff44dbac1e847038cc (diff) | |
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'ospfclient/ospfclient.py')
| -rwxr-xr-x | ospfclient/ospfclient.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |
