-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New template: Huawei smartax display service-port all (#1835)
- Loading branch information
1 parent
f77b661
commit 0c92f5f
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
ntc_templates/templates/huawei_smartax_display_service-port_all.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/huawei_smartax/display_service-port_all/huawei_smartax_display_service-port_all.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
14 changes: 14 additions & 0 deletions
14
tests/huawei_smartax/display_service-port_all/huawei_smartax_display_service-port_all.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |