Skip to content

Commit

Permalink
Updated: Huawei smartax display mac address ont 0 1 2 0 (#1846)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Sep 23, 2024
1 parent f68dfcc commit 92fb59f
Show file tree
Hide file tree
Showing 12 changed files with 627 additions and 12 deletions.
25 changes: 25 additions & 0 deletions ntc_templates/templates/huawei_smartax_display_mac-address.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Value SERVICE_PORT_INDEX (\d+)
Value BUNDLE_INDEX (\d+)
Value TYPE (eth|gpon|epon)
Value Required MAC ([0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4})
Value MAC_TYPE (static|dynamic)
Value FSP (\d+\s*\/\d+\s*\/\d+)
Value ONT_ID (\d+)
Value GEM_INDEX (\d+)
Value VLAN_ID (\d+)


Start
^\s*It\s*will\s*take\s*some\s*time,\s*please\s*wait...
^\s*-
^\s*SRV-P\s*BUNDLE\s*TYPE\s*MAC\s*MAC\s*TYPE\s*F\s*\/S\s*\/P\s*VPI\s*VCI\s*VLAN\s*ID\s*$$
^\s*INDEX\s*INDEX\s*$$ -> MACs
^\s*$$
^. -> Error

MACs
^\s*(-|${SERVICE_PORT_INDEX})\s*(-|${BUNDLE_INDEX})\s*${TYPE}\s*${MAC}\s*${MAC_TYPE}\s*${FSP}\s*(-|${ONT_ID})\s*(-|${GEM_INDEX})\s*${VLAN_ID} -> Record
^\s*-
^\s*Total:\s*\d+ -> EOF
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ Value FSP (\d+\/\s*\d+\/\d+)
Value ONT_ID (\d+)
Value ONT_PORT_TYPE (\S+)
Value ONT_PORT_ID (\d+)
Value MAC (\S+)
Value MAC (\w+-\w+-\w+)
Value VLAN (\d+)

Start
^\s*-
^\s*F\/S\/P\s+ONTID\s+ONT\s+ONT\s+MAC-ADDRESS\s+VLAN\s*$$
^\s*port-type\s+port-ID\s*$$ -> Macs
^\s*F\/S\/P\s+ONTID\s+ONT\s+ONT\s+MAC-ADDRESS\s+VLAN
^\s*port-type\s+port-ID -> Macs
^\s*$$
^. -> Error

Macs
^\s*${FSP}\s+${ONT_ID}\s+${ONT_PORT_TYPE}\s+${ONT_PORT_ID}\s+${MAC}\s+${VLAN}\s*$$ -> Record
^\s*${FSP}\s+${ONT_ID}\s+${ONT_PORT_TYPE}\s+${ONT_PORT_ID}\s+${MAC}\s+(-|${VLAN}) -> Record
^\s*-
^\s*Total:\s*\d+
^\s*Total:\s*\d+\s*$$ -> EOF
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Start
^\s+ID\s+State\s+UpTime\s+DownTime\s+DownCause -> ONTs

ONTs
^\s+${ONT_ID}\s+${RUN_STATE}\s+${LAST_UPTIME}\s+${LAST_DOWNTIME}\s+${LAST_DOWNCAUSE} -> Record
^\s+${ONT_ID}\s+${RUN_STATE}\s+(-|${LAST_UPTIME})\s*(-|${LAST_DOWNTIME})\s+(-|${LAST_DOWNCAUSE}) -> Record
^\s+-
^\s+ONT\s+SN\s+Type\s+Distance\s+Rx\/Tx\s+power\s+Description
^\s+ID\s+\(m\)\s+\(dBm\) -> EOF
Expand Down
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ huawei_smartax_display_board_serial-number.textfsm, .*, huawei_smartax, di[[spla
huawei_smartax_display_service-port_all.textfsm, .*, huawei_smartax, disp[[lay]] ser[[vice-port]] a[[ll]] *$
huawei_smartax_display_ont_autofind.textfsm, .*, huawei_smartax, di[[splay]] ont a[[utofind]]\s*
huawei_smartax_display_ont_info_0_1.textfsm, .*, huawei_smartax, di[[splay]] ont i[[nfo]] (by-sn \w*\s*|\d+ \d+\s*|\d+ \d+ \d+ \d+\s*)
huawei_smartax_display_mac-address.textfsm, .*, huawei_smartax, display mac-address\s*
huawei_smartax_display_temperature.textfsm, .*, huawei_smartax, di[[splay]] tem[[perature]]\s*
huawei_smartax_display_port_info.textfsm, .*, huawei_smartax, di[[splay]] port i[[nfo]]\s*
huawei_smartax_display_sysuptime.textfsm, .*, huawei_smartax, di[[splay]] sys[[uptime]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
It will take some time, please wait...
-----------------------------------------------------------------------
SRV-P BUNDLE TYPE MAC MAC TYPE F /S /P VPI VCI VLAN ID
INDEX INDEX
-----------------------------------------------------------------------
1 - gpon aaaa-aaaa-aaaa static 0 /1 /0 1 1 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
- - eth aaaa-aaaa-aaaa dynamic 0 /1 /1 - - 1
-----------------------------------------------------------------------
Total: 10
Note: F--Frame, S--Slot, P--Port, F/S/P indicates PW Index for PW,
A--The MAC address is learned or configured on the aggregation
port,
VPI indicates ONT ID for PON, VCI indicates GEM index for GPON,
v/e--vlan/encap, pritag--priority-tagged,
ppp--pppoe, ip--ipoe, ip4--ipv4oe, ip6--ipv6oe
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
parsed_sample:
- bundle_index: ""
fsp: "0 /1 /0"
gem_index: "1"
mac: "aaaa-aaaa-aaaa"
mac_type: "static"
ont_id: "1"
service_port_index: "1"
type: "gpon"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
- bundle_index: ""
fsp: "0 /1 /1"
gem_index: ""
mac: "aaaa-aaaa-aaaa"
mac_type: "dynamic"
ont_id: ""
service_port_index: ""
type: "eth"
vlan_id: "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---------------------------------------------------------------
F/S/P ONTID ONT ONT MAC-ADDRESS VLAN
port-type port-ID
---------------------------------------------------------------
0/ 1/0 0 WLAN 4 aaaa-aaaa-aaaa -
---------------------------------------------------------------
Total: 1
Note: When the ONT port-type is WLAN, the ONT port-ID indicates WLAN SSID index
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
parsed_sample:
- fsp: "0/ 1/0"
mac: "aaaa-aaaa-aaaa"
ont_id: "0"
ont_port_id: "4"
ont_port_type: "WLAN"
vlan: ""
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
parsed_sample:
- description: "huawei_ont_0"
distance_m: "1"
last_downcause: "-"
last_downtime: "07:43:46 -"
last_uptime: "2000-01-06"
last_downcause: ""
last_downtime: ""
last_uptime: "2000-01-06 07:43:46"
ont_id: "0"
ont_model_type: "EG8145X6-10"
run_state: "online"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
parsed_sample:
- description: "P612E"
distance_m: "42"
last_downcause: "-"
last_downtime: "00:00:00 -"
last_uptime: "1/1/2000"
last_downcause: ""
last_downtime: ""
last_uptime: "1/1/2000 00:00:00"
ont_id: "0"
ont_model_type: "P612E"
run_state: "online"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Command is being executed. Please wait
------------------------------------------------------------------------------
In port 0/1/0, the total of ONTs are: 37, online: 36
------------------------------------------------------------------------------
ONT Run Last Last Last
ID State UpTime DownTime DownCause
------------------------------------------------------------------------------
0 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
1 online 05/09/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
2 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
3 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
4 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
5 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
6 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
7 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
8 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
9 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
10 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
11 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
12 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
13 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
14 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
15 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
16 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
17 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
18 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
19 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
20 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
21 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
22 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
23 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
24 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
25 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
26 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
27 offline - - -
28 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
29 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
30 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
31 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
32 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
33 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
34 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
35 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
36 online 01/01/2000 01:01:01 01/01/2000 01:01:01 dying-gasp
------------------------------------------------------------------------------
ONT SN Type Distance Rx/Tx power Description
ID (m) (dBm)
------------------------------------------------------------------------------
0 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
1 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
2 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
3 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
4 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
5 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
6 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
7 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
8 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
9 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
10 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
11 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
12 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
13 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
14 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
15 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
16 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
17 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
18 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
19 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
20 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
21 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
22 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
23 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
24 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
25 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
26 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
27 AAAAAAAAAAAAAAAA - - -/- AAAA
28 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
29 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
30 AAAAAAAAAAAAAAAA P612E 100 -10.00/1.00 AAAA
31 AAAAAAAAAAAAAAAA A111A-A 100 -10.00/1.00 AAAA
32 AAAAAAAAAAAAAAAA A111A 100 -10.00/1.00 AAAA
33 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
34 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
35 AAAAAAAAAAAAAAAA AA1111A1 100 -10.00/1.00 AAAA
36 AAAAAAAAAAAAAAAA A111A-A 100 -10.00/1.00 AAAA
------------------------------------------------------------------------------
Loading

0 comments on commit 92fb59f

Please sign in to comment.