Skip to content

Commit

Permalink
Added template for Huawei SmartAX: display_ont_port_vlan_0_1_byport_e…
Browse files Browse the repository at this point in the history
…th_0 (#1796)
  • Loading branch information
evilmonkey19 authored Jul 30, 2024
1 parent e4491e2 commit 9dc7f14
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Value PORT_ID (\d+)
Value PORT_TYPE (\S+)
Value C_VLAN (\d+)
Value C_PRI (\d+)
Value ETH_TYPE (\S+)
Value VLAN_TYPE (\S+)
Value S_VLAN (\d+)
Value S_PRI (\d+)
Value S_PRI_POLICY (\S+)
Value Fillup NATIVE_VLAN (\d+)
Value Fillup DEFAULT_PRIORITY (\d+)
Value Fillup DOWNSTREAM_MODE (\S+)
Value Fillup MISMATCH_POLICY (\S+)

Start
^\s*Port\s*Port\s*C-VLAN\s*C-PRI\s*ETH-type\s*VLAN-type\s*S-VLAN\s*S-PRI\s*S-PRI\s*
^\s*type\s*ID\s*POLICY
^\s+${PORT_TYPE}\s+${PORT_ID}\s+(-|${C_VLAN})\s+(-|${C_PRI})\s+(-|${ETH_TYPE})\s+(-|${VLAN_TYPE})\s+(-|${S_VLAN})\s*(-|${S_PRI})\s*(-|${S_PRI_POLICY})\s* -> Record
^\s*Native\s*VLAN\s*:\s*${NATIVE_VLAN}\s*
^\s*Default\s*priority\s*:\s*${DEFAULT_PRIORITY}\s*
^\s*Downstream\s*mode\s*:\s*${DOWNSTREAM_MODE}\s*
^\s*Mismatch\s*policy\s*:\s*${MISMATCH_POLICY}\s*
^\s*
^. -> Error

EOF
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,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_port_vlan_0_1_byport_eth_0.textfsm, .*, huawei_smartax, di[[splay]] ont p[[ort]] vl[[an]] \d+ \d+ byport eth \d+\s*
huawei_smartax_display_ont_port_vlan_0_1_byvlan_0.textfsm, .*, huawei_smartax, di[[splay]] ont p[[ort]] v[[lan]] \d+ \d+ byvlan \d+
huawei_smartax_display_ont_optical-info_0_all.textfsm, .*, huawei_smartax, di[[splay]] ont o[[ptical-info]] \d+ all
huawei_smartax_display_ont_snmp-profile_0_all.textfsm, .*, huawei_smartax, di[[splay]] ont s[[nmp-profile]] \d+ all
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--------------------------------------------------------------------
Port Port C-VLAN C-PRI ETH-type VLAN-type S-VLAN S-PRI S-PRI
type ID POLICY
--------------------------------------------------------------------
eth 1 - 2 - Translation 1 7 -
eth 2 - 2 - Translation 1 7 -
--------------------------------------------------------------------
Native VLAN : 1
Default priority: 0
Downstream mode : operation
Mismatch policy : discard
--------------------------------------------------------------------
Notes: IPoE indicates IPv4-IPoE, * indicates transparent attribute of
the vlan, In the Ethernet encapsulation list, the hexadecimal digits
indicate the user-defined Ethernet encapsulation type
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
parsed_sample:
- c_pri: "2"
c_vlan: ""
default_priority: "0"
downstream_mode: "operation"
eth_type: ""
mismatch_policy: "discard"
native_vlan: "1"
port_id: "1"
port_type: "eth"
s_pri: "7"
s_pri_policy: ""
s_vlan: "1"
vlan_type: "Translation"
- c_pri: "2"
c_vlan: ""
default_priority: "0"
downstream_mode: "operation"
eth_type: ""
mismatch_policy: "discard"
native_vlan: "1"
port_id: "2"
port_type: "eth"
s_pri: "7"
s_pri_policy: ""
s_vlan: "1"
vlan_type: "Translation"

0 comments on commit 9dc7f14

Please sign in to comment.