Skip to content

Commit

Permalink
Updating template for Huawei SmartAX: display ont info summary ont
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 committed Dec 20, 2024
1 parent 7cbb9e7 commit f8cb39c
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
Value Filldown PORT (\S+)
Value Key ONT_ID (\d+)
Value RUN_STATE (\w+)
Value Required RUN_STATE (\w+)
Value LAST_UPTIME (\S+\s*\S+)
Value LAST_DOWNTIME (\S+\s*\S+)
Value LAST_DOWNCAUSE (\S+)

Start
^\s+-
^\s+ONT\s+Run\s+Last\s+Last\s+Last
^\s+ID\s+State\s+UpTime\s+DownTime\s+DownCause -> ONTs
^\s*Command\s*is\s*being\s*executed\.\s*Please\s*wait\s*$$
^\s*-
^\s+ID\s+State\s+UpTime\s+DownTime\s+DownCause\s*$$ -> ONTs
^\s+ONT\s+Run\s+Last\s+Last\s+Last\s*$$
^\s*In\s*port\s*${PORT},\s*the\s*total\s*of\s*ONTs\s*are:\s*\d+,\s*online:\s*\d+\s*$$
^\s*\d+\s*\S+\s*(-|\S+)\s*(-|\d+)\s+(-?\d+\.\d+\/-?\d+\.\d+|\S+)\s+\S+\s*$$
^\s+ID\s+\(m\)\s+\(dBm\)
^. -> Error

ONTs
^\s*-+\s*$$
^\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
^\s+ONT\s+SN\s+Type\s+Distance\s+Rx\/Tx\s+power\s+Description\s*$$ -> Start
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ Value RX_TX_POWER_DBM (-?\d+\.\d+\/-?\d+\.\d+|\S+)
Value DESCRIPTION (\S+)

Start
^\s*Command\s*is\s*being\s*executed\.\s*Please\s*wait\s*$$
^\s*In\s*port\s*\S+,\s*the\s*total\s*of\s*ONTs\s*are:\s*\d+,\s*online:\s*\d+\s*$$
^\s*ONT\s*Run\s*Last\s*Last\s*Last\s*$$
^\s*ID\s*State\s*UpTime\s*DownTime\s*DownCause\s*$$
^\s*\d+\s*\S+\s*(-|\S+\s\S+)\s*(-|\S+\s*\S+)\s*\S+\s*$$
^\s+-
^\s+ONT\s+SN\s+Type\s+Distance\s+Rx\/Tx\s+power\s+Description
^\s+ID\s+\(m\)\s+\(dBm\) -> SNs
^\s+-\s*$$
^\s*$$
^. -> Error

SNs
^\s+-\s*$$
^\s+${ONT_ID}\s+${SERIAL_NUMBER}\s+${ONT_MODEL_TYPE}\s+${DISTANCE_M}\s+${RX_TX_POWER_DBM}\s+${DESCRIPTION} -> Record
^\s+-
^\s*$$
^. -> Error
^\s*$$ -> Start
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "0"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -17,6 +18,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "1"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -27,6 +29,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "2"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -37,6 +40,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "3"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -47,6 +51,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "4"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -57,6 +62,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "5"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -67,6 +73,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "6"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -77,6 +84,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "7"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -87,6 +95,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "8"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -97,6 +106,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "9"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -107,6 +117,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "10"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -117,6 +128,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "11"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -127,6 +139,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "12"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -137,6 +150,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "13"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -147,6 +161,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "14"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -157,6 +172,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "15"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -167,6 +183,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "16"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -177,6 +194,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "17"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -187,6 +205,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "18"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -197,6 +216,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "19"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -207,6 +227,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "20"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -217,6 +238,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "21"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Expand All @@ -227,6 +249,7 @@ parsed_sample:
last_uptime: "2000-01-01 00:00:00"
ont_id: "22"
ont_model_type: "AB1234C5"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-10.12/2.03"
serial_number: "1234567890ABCDEF"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parsed_sample:
last_uptime: "2000-01-06 07:43:46"
ont_id: "0"
ont_model_type: "EG8145X6-10"
port: "0/2/11"
run_state: "online"
rx_tx_power_dbm: "-7.92/2.21"
serial_number: "1234567890ABCDEF"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ parsed_sample:
last_uptime: "1/1/2000 00:00:00"
ont_id: "0"
ont_model_type: "P612E"
port: "0/1/0"
run_state: "online"
rx_tx_power_dbm: "-22.84/2.12"
serial_number: "AAAAAAAAAAAAAAAA"
Expand All @@ -17,6 +18,7 @@ parsed_sample:
last_uptime: "1/1/2000 00:00:00"
ont_id: "1"
ont_model_type: "P871E-G"
port: "0/1/0"
run_state: "offline"
rx_tx_power_dbm: "-/-"
serial_number: "AAAAAAAAAAAAAAAA"
Loading

0 comments on commit f8cb39c

Please sign in to comment.