mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 02:00:46 +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
|
|
@ -260,10 +260,20 @@ def _sample_targets_shared_session(device_id: str, target_ids: list[str]) -> tup
|
|||
holder: dict[str, Any] = {}
|
||||
|
||||
def _run_session() -> tuple[int, str]:
|
||||
from .ne_netmiko import disable_target_paging
|
||||
|
||||
conn = open_netmiko_connection(creds, session_timeout=budget)
|
||||
holder["conn"] = conn
|
||||
local_errors = 0
|
||||
try:
|
||||
try:
|
||||
disable_target_paging(
|
||||
conn,
|
||||
vendor=str(creds.get("vendor") or ""),
|
||||
device_type=str(creds.get("device_type") or ""),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
for tid, ifname in ifaces:
|
||||
if holder.get("timed_out"):
|
||||
raise TimeoutError("port_traffic_aborted")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue