Add Huawei/Cisco port traffic monitoring and keep Cisco CLI on send_command.

Extend port discovery/sampling beyond ZTE, harden IOSv session prep, and avoid send_command_timing so Building configuration does not truncate config sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-07-31 21:30:46 +08:00
parent 1c8d512701
commit 0d85b87be7
11 changed files with 544 additions and 27 deletions

View file

@ -1,4 +1,4 @@
"""Vendor → port traffic CLI command matrix (ZTE first)."""
"""Vendor → port traffic CLI command matrix (ZTE / Huawei / Cisco)."""
from __future__ import annotations
@ -22,6 +22,18 @@ def commands_for_vendor(vendor: str, device_type: str = "") -> PortTrafficComman
detail_template="show interface {ifname}",
vendor_key=key,
)
if key == "huawei":
return PortTrafficCommands(
brief="display interface brief",
detail_template="display interface {ifname}",
vendor_key=key,
)
if key == "cisco":
return PortTrafficCommands(
brief="show ip interface brief",
detail_template="show interfaces {ifname}",
vendor_key=key,
)
return None