Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CiscoS300 'show interfaces description' template #1525

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ cisco_nxos_show_vdc.textfsm, .*, cisco_nxos, sh[[ow]] vdc
cisco_nxos_show_vpc.textfsm, .*, cisco_nxos, sh[[ow]] vpc
cisco_nxos_show_vrf.textfsm, .*, cisco_nxos, sh[[ow]] vrf

cisco_s300_show_interfaces_description.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] description
cisco_s300_show_interfaces_switchport.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] switchport
cisco_s300_show_interfaces_status.textfsm, .*, cisco_s300, sh[[ow]] int[[erfaces]] st[[atus]]
cisco_s300_show_mac_address-table.textfsm, .*, cisco_s300, sh[[ow]] mac address-[[table]]
Expand Down
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
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"