-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating the templates to add multiple PON ports (#1930)
- Loading branch information
1 parent
7fcccf0
commit a13dc8a
Showing
3 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
18 changes: 10 additions & 8 deletions
18
ntc_templates/templates/huawei_smartax_display_ont_info_0_1_2.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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
Value Required FSP (\w+\/\s\w+\/\w+) | ||
Value Key ONT_ID (\d+) | ||
Value SERIAL_NUMBER (\w+) | ||
Value CONTROL_FLAG (\w+) | ||
Value RUN_STATE (\w*) | ||
Value CONFIG_STATE (\w*) | ||
Value MATCH_STATE (\w*) | ||
Value SERIAL_NUMBER ([A-Z0-9]{16}) | ||
Value CONTROL_FLAG (active|deactive|configuring) | ||
Value RUN_STATE (online|offline) | ||
Value CONFIG_STATE (normal|mismatch|failing|online|initial) | ||
Value MATCH_STATE (initial|mismatch|match) | ||
Value PROTECT_SIDE (no|yes) | ||
|
||
Start | ||
^\s+- | ||
^\s+F\/S\/P\s+ONT\s+SN\s+Control\s+Run\s+Config\s+Match\s+Protect | ||
^\s+ID\s+flag\s+state\s+state\s+state\s+side -> SNs | ||
^.\s*$$ -> Error | ||
|
||
SNs | ||
^\s*${FSP}\s*${ONT_ID}\s*${SERIAL_NUMBER}\s*${CONTROL_FLAG}\s*(${RUN_STATE}|-)\s*(${CONFIG_STATE}|-)\s*(${MATCH_STATE}|-)\s*${PROTECT_SIDE}\s* -> Record | ||
^\s*${FSP}\s*${ONT_ID}\s*${SERIAL_NUMBER}\s*${CONTROL_FLAG}\s*(-|${RUN_STATE})\s*(-|${CONFIG_STATE})\s*(-|${MATCH_STATE})\s*${PROTECT_SIDE}\s* -> Record | ||
^\s*- | ||
^\s*F\/S\/P\s+(ONT|ONT-ID)\s+Description -> EOF | ||
^. -> Error | ||
^\s*F\/S\/P\s+(ONT|ONT-ID)\s+Description | ||
^\s*$$ | ||
^.-> Error |
25 changes: 25 additions & 0 deletions
25
tests/huawei_smartax/display_ont_info_0/huawei_smartax_display_ont_info_fsp_4.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,25 @@ | ||
----------------------------------------------------------------------------- | ||
F/S/P ONT SN Control Run Config Match Protect | ||
ID flag state state state side | ||
----------------------------------------------------------------------------- | ||
0/ 1/0 0 46VBSM4LFW7QLGAV active online normal match no | ||
------------------------------- ---------------------------------------------- | ||
F/S/P ONT-ID Description | ||
----------------------------------------------------------------------------- | ||
0/ 1/0 0 The boiling consignment budgets. | ||
----------------------------------------------------------------------------- | ||
In port 0/ 1/0, the total of ONTs are: 1, online: 1 | ||
----------------------------------------------------------------------------- | ||
|
||
----------------------------------------------------------------------------- | ||
F/S/P ONT SN Control Run Config Match Protect | ||
ID flag state state state side | ||
----------------------------------------------------------------------------- | ||
0/ 1/2 0 1234567890ABCDEF active online normal match no | ||
----------------------------------------------------------------------------- | ||
F/S/P ONT-ID Description | ||
----------------------------------------------------------------------------- | ||
0/ 1/2 0 ONT_NO_DESCRIPTION | ||
----------------------------------------------------------------------------- | ||
In port 0/ 1/2 , the total of ONTs are: 1, online: 1 | ||
----------------------------------------------------------------------------- |
20 changes: 20 additions & 0 deletions
20
tests/huawei_smartax/display_ont_info_0/huawei_smartax_display_ont_info_fsp_4.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,20 @@ | ||
--- | ||
parsed_sample: | ||
- config_state: "normal" | ||
control_flag: "active" | ||
description: "The boiling consignment budgets." | ||
fsp: "0/ 1/0" | ||
match_state: "match" | ||
ont_id: "0" | ||
protect_side: "no" | ||
run_state: "online" | ||
serial_number: "46VBSM4LFW7QLGAV" | ||
- config_state: "normal" | ||
control_flag: "active" | ||
description: "The boiling consignment budgets." | ||
fsp: "0/ 1/2" | ||
match_state: "match" | ||
ont_id: "0" | ||
protect_side: "no" | ||
run_state: "online" | ||
serial_number: "1234567890ABCDEF" |