forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CiscoS300 'show interfaces description' template (networktocode#1525)
Update ntc_templates/templates/cisco_s300_show_interfaces_description.textfsm
- Loading branch information
1 parent
bd98337
commit 6319bee
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
ntc_templates/templates/cisco_s300_show_interfaces_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,21 @@ | ||
Value INTERFACE (\S+) | ||
Value DESCRIPTION (\S.*?) | ||
|
||
Start | ||
^\s*Port\s+Description\s*$$ -> Column1 | ||
^\s*Ch\s+Description\s*$$ -> Column2 | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Column1 | ||
^(\s*-*)*\s*$$ | ||
^\s*Ch\s+Description\s*$$ -> Column2 | ||
^\s*${INTERFACE}(\s+${DESCRIPTION})?\s*$$ -> Record | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Column2 | ||
^(\s*-*)*\s*$$ | ||
^\s*${INTERFACE}(\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
41 changes: 41 additions & 0 deletions
41
tests/cisco_s300/show_interfaces_description/cisco_s300_show_interfaces_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,41 @@ | ||
Port Description | ||
------- ----------- | ||
fa1 Test | ||
fa2 Printer | ||
fa3 Socket_7/7 | ||
fa4 Socket_7/3 | ||
fa5 | ||
fa6 | ||
fa7 | ||
fa8 Camera | ||
fa9 Camera | ||
fa10 Camera | ||
fa11 | ||
fa12 Socket_7/2 | ||
fa13 Socket_7/4 | ||
fa14 Socket_7/8 | ||
fa15 | ||
fa16 | ||
fa17 | ||
fa18 | ||
fa19 | ||
fa20 | ||
fa21 | ||
fa22 | ||
fa23 AP | ||
fa24 AP | ||
gi1 | ||
gi2 | ||
gi3 | ||
gi4 Eltex2124-8 - gi1/0/5 | ||
|
||
Ch Description | ||
------- ----------- | ||
Po1 | ||
Po2 | ||
Po3 | ||
Po4 | ||
Po5 | ||
Po6 | ||
Po7 | ||
Po8 |
74 changes: 74 additions & 0 deletions
74
tests/cisco_s300/show_interfaces_description/cisco_s300_show_interfaces_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,74 @@ | ||
--- | ||
parsed_sample: | ||
- description: "Test" | ||
interface: "fa1" | ||
- description: "Printer" | ||
interface: "fa2" | ||
- description: "Socket_7/7" | ||
interface: "fa3" | ||
- description: "Socket_7/3" | ||
interface: "fa4" | ||
- description: "" | ||
interface: "fa5" | ||
- description: "" | ||
interface: "fa6" | ||
- description: "" | ||
interface: "fa7" | ||
- description: "Camera" | ||
interface: "fa8" | ||
- description: "Camera" | ||
interface: "fa9" | ||
- description: "Camera" | ||
interface: "fa10" | ||
- description: "" | ||
interface: "fa11" | ||
- description: "Socket_7/2" | ||
interface: "fa12" | ||
- description: "Socket_7/4" | ||
interface: "fa13" | ||
- description: "Socket_7/8" | ||
interface: "fa14" | ||
- description: "" | ||
interface: "fa15" | ||
- description: "" | ||
interface: "fa16" | ||
- description: "" | ||
interface: "fa17" | ||
- description: "" | ||
interface: "fa18" | ||
- description: "" | ||
interface: "fa19" | ||
- description: "" | ||
interface: "fa20" | ||
- description: "" | ||
interface: "fa21" | ||
- description: "" | ||
interface: "fa22" | ||
- description: "AP" | ||
interface: "fa23" | ||
- description: "AP" | ||
interface: "fa24" | ||
- description: "" | ||
interface: "gi1" | ||
- description: "" | ||
interface: "gi2" | ||
- description: "" | ||
interface: "gi3" | ||
- description: "Eltex2124-8 - gi1/0/5" | ||
interface: "gi4" | ||
- description: "" | ||
interface: "Po1" | ||
- description: "" | ||
interface: "Po2" | ||
- description: "" | ||
interface: "Po3" | ||
- description: "" | ||
interface: "Po4" | ||
- description: "" | ||
interface: "Po5" | ||
- description: "" | ||
interface: "Po6" | ||
- description: "" | ||
interface: "Po7" | ||
- description: "" | ||
interface: "Po8" |