-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add show_port_description for alcatel_sros (#1912)
Co-authored-by: Michael Bear <[email protected]>
- Loading branch information
1 parent
db6b793
commit 649998f
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
ntc_templates/templates/alcatel_sros_show_port_description.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,11 @@ | ||
Value PORT_ID (\S+) | ||
Value DESCRIPTION (.+) | ||
|
||
Start | ||
^=+\s*$$ | ||
^\s*$$ | ||
^Port\s+Descriptions\s+on\s+Slot\s+\S+\s*$$ | ||
^Port\s+Id\s+Description\s*$$ | ||
^${PORT_ID}\s+${DESCRIPTION}\s*$$ -> Record | ||
^-+\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
35 changes: 35 additions & 0 deletions
35
tests/alcatel_sros/show_port_description/show_port_description.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,35 @@ | ||
=============================================================================== | ||
Port Descriptions on Slot 1 | ||
=============================================================================== | ||
Port Id Description | ||
------------------------------------------------------------------------------- | ||
1/1/1 some_gig1_test | ||
1/1/2 some2_gig1_test | ||
1/1/3 some3_gig1_test | ||
1/1/4 some4_gig1_test | ||
1/1/5 some5_gig1_test | ||
1/1/6 10/100/Gig Ethernet SFP | ||
1/1/7 10/100/Gig Ethernet SFP | ||
1/1/8 10/100/Gig Ethernet SFP | ||
1/1/9 10/100/Gig Ethernet SFP | ||
1/1/10 10/100/Gig Ethernet SFP | ||
1/1/11 10/100/Gig Ethernet SFP | ||
1/1/12 TEST_AGG_TOGGLE | ||
1/1/13 TNET_RAN_TEST1 | ||
1/1/14 TNET_RAN_TEST2 | ||
1/1/15 test 1 | ||
1/1/16 test 2 | ||
1/1/17 TEST_3 | ||
1/1/18 TNET_RAN_TEST3 | ||
1/1/19 TNET_RAN_TEST4 | ||
1/1/20 TNET_RAN_TEST5 | ||
1/5/1 10-Gig Ethernet | ||
1/5/2 10-Gig Ethernet | ||
|
||
=============================================================================== | ||
Port Descriptions on Slot A | ||
=============================================================================== | ||
Port Id Description | ||
------------------------------------------------------------------------------- | ||
A/1 10/100 Ethernet TX | ||
=============================================================================== |
48 changes: 48 additions & 0 deletions
48
tests/alcatel_sros/show_port_description/show_port_description.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,48 @@ | ||
--- | ||
parsed_sample: | ||
- description: "some_gig1_test" | ||
port_id: "1/1/1" | ||
- description: "some2_gig1_test" | ||
port_id: "1/1/2" | ||
- description: "some3_gig1_test" | ||
port_id: "1/1/3" | ||
- description: "some4_gig1_test" | ||
port_id: "1/1/4" | ||
- description: "some5_gig1_test" | ||
port_id: "1/1/5" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/6" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/7" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/8" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/9" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/10" | ||
- description: "10/100/Gig Ethernet SFP" | ||
port_id: "1/1/11" | ||
- description: "TEST_AGG_TOGGLE" | ||
port_id: "1/1/12" | ||
- description: "TNET_RAN_TEST1" | ||
port_id: "1/1/13" | ||
- description: "TNET_RAN_TEST2" | ||
port_id: "1/1/14" | ||
- description: "test 1" | ||
port_id: "1/1/15" | ||
- description: "test 2" | ||
port_id: "1/1/16" | ||
- description: "TEST_3" | ||
port_id: "1/1/17" | ||
- description: "TNET_RAN_TEST3" | ||
port_id: "1/1/18" | ||
- description: "TNET_RAN_TEST4" | ||
port_id: "1/1/19" | ||
- description: "TNET_RAN_TEST5" | ||
port_id: "1/1/20" | ||
- description: "10-Gig Ethernet" | ||
port_id: "1/5/1" | ||
- description: "10-Gig Ethernet" | ||
port_id: "1/5/2" | ||
- description: "10/100 Ethernet TX" | ||
port_id: "A/1" |