mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +08:00
fix(ne-exec): allow no-more in managed NE CLI pipe whitelist
Support Huawei-style display ... | no-more alongside existing read-only pipe filters. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
33af0efc98
commit
a6a5abc9ef
2 changed files with 2 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ _FORBIDDEN_LINE_SEPARATORS = ("\u2028", "\u2029", "\x85", "\x0b", "\x0c")
|
|||
|
||||
# Pipe segments allowed after show/display (output filtering only).
|
||||
_ALLOWED_PIPE_SEGMENT_RE = re.compile(
|
||||
r"(?i)^(include|exclude|begin|section|count|match|grep|one-line)(\s|$)"
|
||||
r"(?i)^(include|exclude|begin|section|count|match|grep|one-line|no-more)(\s|$)"
|
||||
)
|
||||
_BLOCKED_PIPE_SEGMENT_RE = re.compile(r"(?i)\b(redirect|append|tee|send)\b")
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class NeExecValidationTests(unittest.TestCase):
|
|||
"show run | match hostname",
|
||||
"show run | grep hostname",
|
||||
"show run | one-line",
|
||||
"display current-configuration | no-more",
|
||||
"show run | include x | include y",
|
||||
):
|
||||
with self.subTest(cmd=cmd):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue