mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 20:13:15 +08:00
Disable target paging after hop login and keep CLI echo on timeouts.
LLDP discover and config collect were timing out on --More--; send vendor paging-off after nested/bastion auth, and attach session-log tails so failures show where the CLI stuck. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3adf8d8b75
commit
fbf73cbaaf
12 changed files with 334 additions and 40 deletions
|
|
@ -81,13 +81,16 @@ def execute_managed_ne_commands(
|
|||
try:
|
||||
output = _collect_on_device(creds, cmds, read_timeout_sec=read_timeout)
|
||||
except Exception as exc:
|
||||
detail = str(exc)[:4000]
|
||||
return {
|
||||
"ok": False,
|
||||
"device": device,
|
||||
"commands": cmds,
|
||||
"read_timeout_sec": read_timeout,
|
||||
"error": type(exc).__name__,
|
||||
"detail": str(exc)[:2000],
|
||||
"detail": detail,
|
||||
# Preserve whatever echo was captured so LLDP discover / ops can show it.
|
||||
"output": detail,
|
||||
}
|
||||
|
||||
if len(output) > _EXEC_MAX_OUTPUT:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue