mirror of
https://github.com/hansjone/netx.git
synced 2026-10-16 11:30:50 +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
30
netx_api/cli_templates/zte/zte_zxros_show_interface.textfsm
Normal file
30
netx_api/cli_templates/zte/zte_zxros_show_interface.textfsm
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
Value Filldown IFNAME (\S+)
|
||||
Value Filldown ADMIN_OPER (up|down)
|
||||
Value Filldown DESCRIPTION (.+?)
|
||||
Value Filldown BW_RAW (\d+(?:\.\d+)?\s*[kKmMgGtT]?\s*(?:G?bit|bit)/s(?:ec)?)
|
||||
Value Filldown RATE_PERIOD (\d+)
|
||||
Value Filldown INPUT_BPS ([\d.]+)
|
||||
Value Filldown OUTPUT_BPS ([\d.]+)
|
||||
Value IN_UTIL ([\d.]+)
|
||||
Value OUT_UTIL ([\d.]+)
|
||||
|
||||
Start
|
||||
^${IFNAME}\s+is\s+${ADMIN_OPER}\b
|
||||
^\s*Description:\s*${DESCRIPTION}\s*$$
|
||||
^\s*BW\s+${BW_RAW}
|
||||
^\s*Rate\s+period\s*:\s*${RATE_PERIOD}\s*s -> Rates
|
||||
^\s*$$
|
||||
^.* -> Start
|
||||
|
||||
Rates
|
||||
^\s*Input\s*:\s*${INPUT_BPS}\s*bit/s
|
||||
^\s*Output\s*:\s*${OUTPUT_BPS}\s*bit/s
|
||||
^\s*Peak\s+rate: -> AfterPeak
|
||||
^\s*Intf\s+utilization:\s*input\s*${IN_UTIL}%\s+output\s*${OUT_UTIL}% -> Record
|
||||
^\s*$$
|
||||
^.* -> Rates
|
||||
|
||||
AfterPeak
|
||||
^\s*Intf\s+utilization:\s*input\s*${IN_UTIL}%\s+output\s*${OUT_UTIL}% -> Record
|
||||
^\s*$$
|
||||
^.* -> AfterPeak
|
||||
Loading…
Add table
Add a link
Reference in a new issue