Skip to content

Commit

Permalink
New template: Huawei smartax display service-port all (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Sep 17, 2024
1 parent f77b661 commit 0c92f5f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Value INDEX (\d+)
Value VLAN_ID (\d+)
Value VLAN_ATTR (\S+)
Value PORT_TYPE (\S+)
Value FSP (\d+\/\d+\s*\/\d+)
Value ONT_ID (\d+)
Value GEM_INDEX (\d+)
Value FLOW_TYPE (\S+)
Value VLAN_ACCESS (\d+)
Value RX (\S+)
Value TX (\S+)
Value STATE (\S+)


Start
^Switch-Oriented\s*Flow\s*List
^\s*-
^\s*INDEX\s+VLAN\s+VLAN\s+PORT\s+F\/\s*S\/\s*P\s*VPI\s*VCI\s*FLOW\s*FLOW\s*RX\s*TX\s*STATE\s*$$
^\s*ID\s*ATTR\s*TYPE\s*TYPE\s*PARA\s*$$ -> ServicePorts
^\s*$$
^. -> Error

ServicePorts
^\s*${INDEX}\s*${VLAN_ID}\s*${VLAN_ATTR}\s*${PORT_TYPE}\s*${FSP}\s*${ONT_ID}\s*${GEM_INDEX}\s*${FLOW_TYPE}\s*${VLAN_ACCESS}\s*(-|${RX})\s*(-|${TX})\s*${STATE}\s* -> Record
^\s*.
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ huawei_smartax_display_ont_snmp-profile_0_all.textfsm, .*, huawei_smartax, di[[s
huawei_smartax_display_ont_gemport_0_ontid_0.textfsm, .*, huawei_smartax, di[[splay]] ont g[[emport]] \d+ ontid \d+\s*
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_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_temperature.textfsm, .*, huawei_smartax, di[[splay]] tem[[perature]]\s*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Switch-Oriented Flow List
-----------------------------------------------------------------------------
INDEX VLAN VLAN PORT F/ S/ P VPI VCI FLOW FLOW RX TX STATE
ID ATTR TYPE TYPE PARA
-----------------------------------------------------------------------------
5827 2 common gpon 0/1 /0 0 1 vlan 2 - - up
-----------------------------------------------------------------------------
Total : 1 (Up/Down : 1/0)
Note : F--Frame, S--Slot, P--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, vxl--vxlan.
When FLOW TYPE is plist, the value of FLOW PARA is a byte in
hexadecimal format and indicates a priority list. Eight bits
of its binary value indicate priorities 0-7 from the least
significant bit to the most significant bit. Value 1 indicates
that the priority is used. For example, if FLOW PARA is 0x23 and
its binary format is 0010 0011, priorities 0, 1 and 5 are used
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- flow_type: "vlan"
fsp: "0/1 /0"
gem_index: "1"
index: "5827"
ont_id: "0"
port_type: "gpon"
rx: ""
state: "up"
tx: ""
vlan_access: "2"
vlan_attr: "common"
vlan_id: "2"

0 comments on commit 0c92f5f

Please sign in to comment.