mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 02:53:17 +08:00
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:
parent
282dbe75af
commit
042c015045
36 changed files with 3695 additions and 17 deletions
17
netx_api/ne_netmiko.py
Normal file
17
netx_api/ne_netmiko.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue