mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 23:24:22 +08:00
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>
This commit is contained in:
parent
60186a12e3
commit
393fd0e0b4
41 changed files with 1771 additions and 1075 deletions
0
netx_api/cli_templates/cisco/.gitkeep
Normal file
0
netx_api/cli_templates/cisco/.gitkeep
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue