netx/netx_api/cli_templates/cisco/cisco_ios_show_interfaces.textfsm
oliver 393fd0e0b4 Switch CLI parsing to TextFSM and polish topology/workbench UX.
Use custom cli_templates plus community ntc-templates for LLDP and port traffic across ZTE/Huawei/Cisco/H3C/Juniper/Nokia, drop regex parsers, and surface Admin/Phy/Prot on port discover. Also batch-add topology NEs and tighten workbench branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 23:06:40 +08:00

19 lines
668 B
Text

Value Required INTERFACE (\S+)
Value LINK_STATUS (.+?)
Value PROTOCOL_STATUS (.+?)
Value DESCRIPTION (.+?)
Value BANDWIDTH (\d+\s+\w+)
Value RATE_PERIOD (\d+)
Value RATE_PERIOD_UNIT (second|minute|hour)
Value INPUT_RATE (\d+)
Value OUTPUT_RATE (\d+)
Start
^${INTERFACE}\s+is\s+${LINK_STATUS},\s*line\s+protocol\s+is\s+${PROTOCOL_STATUS}\s*$$
^\s+Description:\s+${DESCRIPTION}\s*$$
^\s+MTU\s+\d+\s+bytes,\s+BW\s+${BANDWIDTH}(?:/s(?:ec)?)?,
^\s+${RATE_PERIOD}\s+${RATE_PERIOD_UNIT}s?\s+input\s+rate\s+${INPUT_RATE}\s+bits/sec
^\s+\d+\s+(?:second|minute|hour)s?\s+output\s+rate\s+${OUTPUT_RATE}\s+bits/sec -> Record
^\s*$$
^\S+#\s*$$ -> End
^.* -> Start