From f1c27357d93d02de642787a5db19f67935537d21 Mon Sep 17 00:00:00 2001 From: posntw <104687115+posntw@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:19:40 +0300 Subject: [PATCH 1/2] Update regex --- mb_netmgmt/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mb_netmgmt/__main__.py b/mb_netmgmt/__main__.py index db0d78e..67ee89f 100755 --- a/mb_netmgmt/__main__.py +++ b/mb_netmgmt/__main__.py @@ -130,7 +130,7 @@ def get_cli_patterns(): b"[\r\n\x00\x1b\[K]RP/\d+/(?:RS?P)?\d+\/CPU\d+:[^#]+(?:\([^\)]+\))?#$" ) # based on IOS XR driver of Exscript patterns.append( - b"[\r\n\x00\x1b\[K](?P[\w/ .:,\(\)\-\?]*)(?P\[[\w/.,():\-]*\])?(?(default)(?P(?:\?|: ?| |)$)|(?P: $))" + b"[\r\n\x00\x1b\[K](?P[\w/ .:,>\(\)\-\?]*)(?P\[[\w/.,():\-]*\])?(?(default)(?P(?:\?|: ?| |)$)|(?P: $))" ) # Interactive prompt patterns.append(b"[\r\n\x00\x1b\[K] --More-- $") # Terminal paging return patterns From 5b7f573ee0ee4f4c657555f87cbe5f64765a4e22 Mon Sep 17 00:00:00 2001 From: posntw <104687115+posntw@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:23:02 +0300 Subject: [PATCH 2/2] Update test_mb_netmgmt.py --- test/test_mb_netmgmt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_mb_netmgmt.py b/test/test_mb_netmgmt.py index 08f4a50..3bbbecd 100644 --- a/test/test_mb_netmgmt.py +++ b/test/test_mb_netmgmt.py @@ -42,6 +42,7 @@ (b"\rDo you wish to continue?[confirm(y/n)]", True), (b"\r --More-- ", True), (b"\rSending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:", False), + (b"\rProceed with switchover 0/8/CPU0 -> 0/7/CPU0? [confirm]", True), ]