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:
oliver 2026-08-29 12:30:33 +08:00
parent 3adf8d8b75
commit fbf73cbaaf
12 changed files with 334 additions and 40 deletions

View file

@ -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: