diff --git a/ntc_templates/templates/huawei_smartax_display_ont_optical-info_0_all.textfsm b/ntc_templates/templates/huawei_smartax_display_ont_optical-info_0_all.textfsm new file mode 100644 index 0000000000..8b5a10eaf4 --- /dev/null +++ b/ntc_templates/templates/huawei_smartax_display_ont_optical-info_0_all.textfsm @@ -0,0 +1,15 @@ +Value Key ONT_ID (\d+) +Value RX_POWER (\S+) +Value TX_POWER (\S+) +Value OLT_RX_ONT (\S+) +Value TEMPERATURE (\d+) +Value VOLTAGE (\S+) +Value CURRENT (\d+) +Value DISTANCE (\d+) + +Start + ^\s+ONT\s+Rx\s*power\s+Tx\s*power\s+OLT\s*Rx\s*ONT\s+Temperature\s+Voltage\s+Current\s+Distance + ^\s+ID\s+\(dBm\)\s+\(dBm\)\s+power\(dBm\)\s+\(C\)\s+\(V\)\s+\(mA\)\s+\(m\) + ^\s+${ONT_ID}\s+${RX_POWER}\s+${TX_POWER}\s+${OLT_RX_ONT}\s+${TEMPERATURE}\s+${VOLTAGE}\s+${CURRENT}\s+${DISTANCE} -> Record + ^\s+- + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 97543f3faa..4b7c3ff27c 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -635,6 +635,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*) *$ +huawei_smartax_display_ont_optical-info_0_all.textfsm, .*, huawei_smartax, di[[splay]] ont o[[ptical-info]] \d+ all huawei_smartax_display_sysman_service_state.textfsm, .*, huawei_smartax, di[[splay]] sysman s[[ervice]] s[[tate]] huawei_smartax_display_board_serial-number.textfsm, .*, huawei_smartax, di[[splay]] bo[[ard]] s[[erial-number]]\s* huawei_smartax_display_ont_autofind.textfsm, .*, huawei_smartax, di[[splay]] ont a[[utofind]]\s* diff --git a/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.raw b/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.raw new file mode 100644 index 0000000000..2a37079a1e --- /dev/null +++ b/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.raw @@ -0,0 +1,15 @@ + ----------------------------------------------------------------------------- + ONT Rx power Tx power OLT Rx ONT Temperature Voltage Current Distance + ID (dBm) (dBm) power(dBm) (C) (V) (mA) (m) + ----------------------------------------------------------------------------- + 0 -24.68 3.68 -22.68 38 3.200 6 171 + 1 -24.68 3.86 -23.02 31 3.220 8 170 + 2 -25.68 3.62 -23.77 32 3.200 8 170 + 3 -25.37 3.91 -22.45 31 3.180 7 170 + 4 -25.37 3.76 -22.22 30 3.200 7 170 + 5 -26.57 3.96 -23.88 38 3.220 8 170 + 6 -24.68 3.53 -23.47 36 3.260 8 170 + 7 -25.37 3.71 -23.88 38 3.220 9 170 + 8 -25.37 3.66 -22.93 30 3.180 5 170 + 9 -24.43 3.72 -23.77 38 3.200 8 170 + ----------------------------------------------------------------------------- diff --git a/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.yml b/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.yml new file mode 100644 index 0000000000..13b7f0da6c --- /dev/null +++ b/tests/huawei_smartax/display_ont_optical-info_0_all/huawei_smartax_display_ont_optical-info_0_all.yml @@ -0,0 +1,82 @@ +--- +parsed_sample: + - current: "6" + distance: "171" + olt_rx_ont: "-22.68" + ont_id: "0" + rx_power: "-24.68" + temperature: "38" + tx_power: "3.68" + voltage: "3.200" + - current: "8" + distance: "170" + olt_rx_ont: "-23.02" + ont_id: "1" + rx_power: "-24.68" + temperature: "31" + tx_power: "3.86" + voltage: "3.220" + - current: "8" + distance: "170" + olt_rx_ont: "-23.77" + ont_id: "2" + rx_power: "-25.68" + temperature: "32" + tx_power: "3.62" + voltage: "3.200" + - current: "7" + distance: "170" + olt_rx_ont: "-22.45" + ont_id: "3" + rx_power: "-25.37" + temperature: "31" + tx_power: "3.91" + voltage: "3.180" + - current: "7" + distance: "170" + olt_rx_ont: "-22.22" + ont_id: "4" + rx_power: "-25.37" + temperature: "30" + tx_power: "3.76" + voltage: "3.200" + - current: "8" + distance: "170" + olt_rx_ont: "-23.88" + ont_id: "5" + rx_power: "-26.57" + temperature: "38" + tx_power: "3.96" + voltage: "3.220" + - current: "8" + distance: "170" + olt_rx_ont: "-23.47" + ont_id: "6" + rx_power: "-24.68" + temperature: "36" + tx_power: "3.53" + voltage: "3.260" + - current: "9" + distance: "170" + olt_rx_ont: "-23.88" + ont_id: "7" + rx_power: "-25.37" + temperature: "38" + tx_power: "3.71" + voltage: "3.220" + - current: "5" + distance: "170" + olt_rx_ont: "-22.93" + ont_id: "8" + rx_power: "-25.37" + temperature: "30" + tx_power: "3.66" + voltage: "3.180" + - current: "8" + distance: "170" + olt_rx_ont: "-23.77" + ont_id: "9" + rx_power: "-24.43" + temperature: "38" + tx_power: "3.72" + voltage: "3.200"