diff --git a/ntc_templates/templates/huawei_ont_display_port_statistics_portid_0.textfsm b/ntc_templates/templates/huawei_ont_display_port_statistics_portid_0.textfsm new file mode 100644 index 0000000000..0c11c74ff7 --- /dev/null +++ b/ntc_templates/templates/huawei_ont_display_port_statistics_portid_0.textfsm @@ -0,0 +1,21 @@ +Value ETHERNET_PORTID (\d+) +Value RX_UNICAST_PACKETS (\d+) +Value TX_UNICAST_PACKETS (\d+) +Value RX_BROADCAST_PACKETS (\d+) +Value TX_BROADCAST_PACKETS (\d+) +Value RX_MULTICAST_PACKETS (\d+) +Value TX_MULTICAST_PACKETS (\d+) +Value DROPPED_PACKETS (\d+) + +Start + ^\s*Ethernet\s+portid\s*=\s*${ETHERNET_PORTID}\s*$$ + ^\s*Rx\s+unicast\s+packets\s*:\s*${RX_UNICAST_PACKETS}\s*$$ + ^\s*Tx\s+unicast\s+packets\s*:\s*${TX_UNICAST_PACKETS}\s*$$ + ^\s*Rx\s+broadcast\s+packets\s*:\s*${RX_BROADCAST_PACKETS}\s*$$ + ^\s*Tx\s+broadcast\s+packets\s*:\s*${TX_BROADCAST_PACKETS}\s*$$ + ^\s*Rx\s+multicast\s+packets\s*:\s*${RX_MULTICAST_PACKETS}\s*$$ + ^\s*Tx\s+multicast\s+packets\s*:\s*${TX_MULTICAST_PACKETS}\s*$$ + ^\s*Dropped\s+packets\s*:\s*${DROPPED_PACKETS}\s*$$ + ^\s+$$ + ^\s*success!\s*$$ + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 3f2e102534..71f127fdd0 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -672,6 +672,7 @@ hp_procurve_show_vlans.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] vl[[ans]] hp_procurve_show_arp.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ar[[p]] hp_procurve_show_ip.textfsm, .*, (hp|aruba)_procurve, sh[[ow]] ip +huawei_ont_display_port_statistics_portid_0.textfsm, .*, huawei_ont, di[[splay]] p[[ort]] s[[tatistics]] po[[rtid]] \d+ huawei_ont_display_wifi_information.textfsm, .*, huawei_ont, di[[splay]] w[[ifi]] i[[nformation]] huawei_ont_display_epon_ont_info.textfsm, .*, huawei_ont, di[[splay]] ep[[on]] o[[nt]] i[[nfo]] huawei_ont_display_inner_version.textfsm, .*, huawei_ont, di[[splay]] in[[ner]] ve[[rsion]] diff --git a/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.raw b/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.raw new file mode 100644 index 0000000000..303acc587f --- /dev/null +++ b/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.raw @@ -0,0 +1,10 @@ +Ethernet portid = 1 +Rx unicast packets : 4477 +Tx unicast packets : 3390 +Rx broadcast packets : 70780 +Tx broadcast packets : 1 +Rx multicast packets : 4011 +Tx multicast packets : 0 +Dropped packets : 0 + +success! \ No newline at end of file diff --git a/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.yml b/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.yml new file mode 100644 index 0000000000..2e746db99d --- /dev/null +++ b/tests/huawei_ont/display_port_statistics_portid_0/huawei_ont_display_port_statistics_portid_0.yml @@ -0,0 +1,10 @@ +--- +parsed_sample: + - dropped_packets: "0" + ethernet_portid: "1" + rx_broadcast_packets: "70780" + rx_multicast_packets: "4011" + rx_unicast_packets: "4477" + tx_broadcast_packets: "1" + tx_multicast_packets: "0" + tx_unicast_packets: "3390"