-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c58ea4
commit aeb509a
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.txt
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,7 @@ | ||
Vlan Port Oper Status Path Cost Role Loop Guard Note | ||
-----+-------+------------+---------+-------+----------+------ | ||
1 1/1/7 DIS 0 DIS DIS | ||
3200 0/1 FORW 1 DESG DIS | ||
3200 0/32 FORW 3 DESG DIS | ||
3201 1/1/15 FORW 4 DESG DIS | ||
3201 1/1/16 FORW 4 DESG DIS |
36 changes: 36 additions & 0 deletions
36
tests/ale_aos8_show_spantree_ports/ale_aos8_show_spantree_ports.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,36 @@ | ||
--- | ||
- cist_param: '1' | ||
port: '1/1/7' | ||
oper_status: 'DIS' | ||
path_cost: '0' | ||
role: 'DIS' | ||
loop_guard: 'DIS' | ||
note: '' | ||
- cist_param: '3200' | ||
port: '0/1' | ||
oper_status: 'FORW' | ||
path_cost: '1' | ||
role: 'DESG' | ||
loop_guard: 'DIS' | ||
note: '' | ||
- cist_param: '3200' | ||
port: '0/32' | ||
oper_status: 'FORW' | ||
path_cost: '3' | ||
role: 'DESG' | ||
loop_guard: 'DIS' | ||
note: '' | ||
- cist_param: '3201' | ||
port: '1/1/15' | ||
oper_status: 'FORW' | ||
path_cost: '4' | ||
role: 'DESG' | ||
loop_guard: 'DIS' | ||
note: '' | ||
- cist_param: '3201' | ||
port: '1/1/16' | ||
oper_status: 'FORW' | ||
path_cost: '4' | ||
role: 'DESG' | ||
loop_guard: 'DIS' | ||
note: '' |
15 changes: 15 additions & 0 deletions
15
textfsm_aos/templates/ale_aos8_show_spantree_ports.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,15 @@ | ||
Value cist_param (\d{1,4}) | ||
Value port ((\d{1,2}\/)+\d*) | ||
Value oper_status (\w+) | ||
Value path_cost (\d+) | ||
Value role (\w+) | ||
Value loop_guard (ENA|DIS) | ||
Value note (.*) | ||
|
||
Start | ||
^\s+(Bridge|Msti|Vlan)\s+Port\s+Oper Status\s+Path Cost\s+Role\s+Loop Guard\s+Note$$ | ||
^[-+\+]+\s*$$ -> Spantree_ports | ||
|
||
Spantree_ports | ||
^\s+${cist_param}\s+${port}\s+${oper_status}\s+${path_cost}\s+${role}\s+${loop_guard}\s+${note}\s*$$ -> Record | ||
^. -> 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