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

@ -134,12 +134,16 @@ def _discover_one_target(
"error": detail,
}
if not exec_out.get("ok"):
err = str(exec_out.get("error") or exec_out.get("detail") or "exec_failed")[:500]
raw = str(exec_out.get("output") or exec_out.get("detail") or "")
err = str(exec_out.get("detail") or exec_out.get("error") or "exec_failed")[:4000]
return {
**base,
"ok": False,
"command": cmd,
"parser_key": pkey,
"parser_stub": bool(is_stub),
"error": err,
"raw_preview": _raw_preview(raw or err),
}
raw = str(exec_out.get("output") or "")