From 87f3b2339f8dd2d017c6043824d8915c9b04240f Mon Sep 17 00:00:00 2001 From: minefuto Date: Sun, 22 Jun 2025 23:23:05 +0900 Subject: [PATCH] add support for enclosed arg to junos cli --- napalm/junos/junos.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py index 4c8eb9f82..22e6dbc29 100644 --- a/napalm/junos/junos.py +++ b/napalm/junos/junos.py @@ -1102,6 +1102,11 @@ def _process_pipe(cmd, txt): exploded_pipe = pipe.split() pipe_oper = exploded_pipe[0] # always there pipe_args = "".join(exploded_pipe[1:2]) + enclosed_arg = re.match(r'"(.+)"', " ".join(exploded_pipe[1:])) + if enclosed_arg: + pipe_args = enclosed_arg.group().strip('"') + else: + pipe_args = "".join(exploded_pipe[1:2]) # will not throw error when there's no arg pipe_oper_args[pipe_oper] = pipe_args for oper in _OF_MAP.keys():