netx/netx_api/ne_netmiko.py
oliver 042c015045 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>
2026-05-27 23:34:29 +08:00

17 lines
553 B
Python

"""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