feat(ops): add managed NE management and batch CLI collection

Introduce workbench operations for multi-vendor NE CRUD/connect-test and Netmiko batch collection with job lifecycle controls, log downloads, and paginated run filters.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-27 23:34:29 +08:00
parent 282dbe75af
commit 042c015045
36 changed files with 3695 additions and 17 deletions

17
netx_api/ne_netmiko.py Normal file
View file

@ -0,0 +1,17 @@
"""Shared Netmiko helpers for managed NE connect/collect."""
from __future__ import annotations
def normalize_netmiko_device_type(device_type: str, protocol: str) -> str:
dt = str(device_type or "").strip()
proto = str(protocol or "ssh").strip().lower()
if "zte" in dt.lower():
if dt == "zte":
return f"zte_zxros_{proto}"
if "telnet" not in dt and "ssh" not in dt:
return f"{dt}_{proto}"
return dt
if "telnet" not in dt and "ssh" not in dt:
return f"{dt}_{proto}"
return dt