Skip to content

Commit

Permalink
Added template: Huawei SmartAX display ont port state 0 1 eth-state (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Sep 18, 2024
1 parent d39944b commit f54d445
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Value Key ONT_ID (\d+)
Value ONT_PORT_ID (\d+)
Value ONT_PORT_TYPE (\S+)
Value SPEED_MBPS (\S+)
Value DUPLEX (\S+)
Value LINK_STATE (up|down)
Value RING_STATUS (\S+)

Start
^\s+ONT-ID\s+ONT\s*ONT\s*Speed\(Mbps\)\s*Duplex\s*LinkState\s*RingStatus\s*$$
^\s+port-ID\s*Port-type\s*$$
^\s+${ONT_ID}\s+${ONT_PORT_ID}\s+${ONT_PORT_TYPE}\s*(-|${SPEED_MBPS})\s*(-|${DUPLEX})\s*${LINK_STATE}\s*${RING_STATUS} -> Record
^\s+-
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ hp_procurve_show_ip.textfsm, .*, hp_procurve, sh[[ow]] ip
huawei_smartax_display_ont_info_summary_ont.textfsm:huawei_smartax_display_ont_info_summary_sn.textfsm, .*, huawei_smartax, di[[splay]] ont i[[nfo]] su[[mmary]] \S+ *$
huawei_smartax_display_ont_info_0_1_2.textfsm:huawei_smartax_display_ont_info_description.textfsm, .*, huawei_smartax, di[[splay]] ont i[[nfo]] (\d+\s*|\d+ \d+ \d+\s*)\s*[[all]] *$
huawei_smartax_display_ont_port_vlan_0_1_byport_eth_0.textfsm, .*, huawei_smartax, di[[splay]] ont p[[ort]] vl[[an]] \d+ \d+ byport eth \d+\s*
huawei_smartax_display_ont_port_state_0_1_eth-state.textfsm, .*, huawei_smartax, di[[splay]] on[[t]] por[[t]] st[[ate]] \d+ \d+ e[[th-port]]
huawei_smartax_display_ont_port_vlan_0_1_byvlan_0.textfsm, .*, huawei_smartax, di[[splay]] ont p[[ort]] v[[lan]] \d+ \d+ byvlan \d+
huawei_smartax_display_mac-address_ont_0_1_2_0.textfsm, .*, huawei_smartax, di[[splay]] mac-a[[ddress]] o[[nt]] \d+(\/)?\s*\d+(\/)?\s*\d+ \d+ *$
huawei_smartax_display_ont_optical-info_0_all.textfsm, .*, huawei_smartax, di[[splay]] ont o[[ptical-info]] \d+ all
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--------------------------------------------------------------------------
ONT-ID ONT ONT Speed(Mbps) Duplex LinkState RingStatus
port-ID Port-type
--------------------------------------------------------------------------
1 1 GE 1000 full up noloop
1 2 GE - - down noloop
--------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
parsed_sample:
- duplex: "full"
link_state: "up"
ont_id: "1"
ont_port_id: "1"
ont_port_type: "GE"
ring_status: "noloop"
speed_mbps: "1000"
- duplex: ""
link_state: "down"
ont_id: "1"
ont_port_id: "2"
ont_port_type: "GE"
ring_status: "noloop"
speed_mbps: ""

0 comments on commit f54d445

Please sign in to comment.