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

BugFix: Removed reliance on static spacing for cisco_ios_show_interfaces_status #614

Merged
merged 1 commit into from
Mar 9, 2020
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
4 changes: 2 additions & 2 deletions templates/cisco_ios_show_interfaces_status.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Start
^Time\s+source\s+is

Begin
^(?=\s{0,9}${PORT}).{9}\s{20}${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^(?=\s{0,9}${PORT}).{9}\s${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ Gi1/0/14 Half Duplex 2950-S notconnect 16 a-half auto Not Present
Gi1/0/15 Multi Space to the notconnect 16 a-half auto 10/100BaseTX
Gi1/0/16 Multi Space to the err-disabled 16 a-half auto 10/100BaseTX
Gi1/0/17 Multi Space disabled 16 a-half auto 10/100BaseTX
Fa1/6 test notconnect 1 auto auto 10/100BaseTX
Po1 ethchl connected trunk a-full a-1000
Original file line number Diff line number Diff line change
@@ -1,128 +1,135 @@
---
parsed_sample:
- duplex: "auto"
- port: "Gi1/0/1"
name: ""
port: "Gi1/0/1"
speed: "auto"
status: "notconnect"
type: "10/100/1000BaseTX"
vlan: "1"
- duplex: "a-full"
duplex: "auto"
speed: "auto"
type: "10/100/1000BaseTX"
- port: "Gi1/0/2"
name: "AccessPoint"
port: "Gi1/0/2"
speed: "a-1000"
status: "connected"
type: "10/100/1000BaseTX"
vlan: "8"
- duplex: "auto"
duplex: "a-full"
speed: "a-1000"
type: "10/100/1000BaseTX"
- port: "Gi1/0/3"
name: "John's Office"
port: "Gi1/0/3"
speed: "auto"
status: "notconnect"
type: "10/100/1000BaseTX"
vlan: "1"
- duplex: "a-full"
duplex: "auto"
speed: "auto"
type: "10/100/1000BaseTX"
- port: "Gi1/0/4"
name: "SingleName"
port: "Gi1/0/4"
speed: "a-100"
status: "connected"
type: "10/100/1000BaseTX"
vlan: "1"
- duplex: "a-full"
duplex: "a-full"
speed: "a-100"
type: "10/100/1000BaseTX"
- port: "Gi1/0/5"
name: "Dashed-Name"
port: "Gi1/0/5"
speed: "a-1000"
status: "connected"
type: "10/100/1000BaseTX"
vlan: "1000"
- duplex: "a-full"
duplex: "a-full"
speed: "a-1000"
type: "10/100/1000BaseTX"
- port: "Gi1/0/6"
name: "Spaced Example"
port: "Gi1/0/6"
speed: "a-100"
status: "connected"
type: "10/100/1000BaseTX"
vlan: "8"
- duplex: "a-full"
duplex: "a-full"
speed: "a-100"
type: "10/100/1000BaseTX"
- port: "Gi1/0/7"
name: "Trunk Example"
port: "Gi1/0/7"
speed: "a-1000"
status: "connected"
type: "1000BaseSX SFP"
vlan: "trunk"
- duplex: "auto"
duplex: "a-full"
speed: "a-1000"
type: "1000BaseSX SFP"
- port: "Gi1/0/8"
name: "SFP Not Present"
port: "Gi1/0/8"
speed: "auto"
status: "notconnect"
type: "Not Present"
vlan: "1"
- duplex: "auto"
name: "SFP Not Present"
port: "Gi1/0/9"
duplex: "auto"
speed: "auto"
status: "notconnect"
type: "Not Present"
- port: "Gi1/0/9"
name: "SFP Not Present"
status: "notconnect"
vlan: "1"
- duplex: "auto"
name: "Management"
port: "Gi1/0/10"
duplex: "auto"
speed: "auto"
type: "Not Present"
- port: "Gi1/0/10"
name: "Management"
status: "notconnect"
type: "10/100BaseTX"
vlan: "routed"
- duplex: "a-half"
name: "2960S Port"
port: "Gi1/0/11"
duplex: "auto"
speed: "auto"
status: "notconnect"
type: "10/100BaseTX"
- port: "Gi1/0/11"
name: "2960S Port"
status: "notconnect"
vlan: "16"
- duplex: "a-half"
name: "Half Duplex 2950"
port: "Gi1/0/12"
duplex: "a-half"
speed: "auto"
status: "notconnect"
type: "10/100BaseTX"
- port: "Gi1/0/12"
name: "Half Duplex 2950"
status: "notconnect"
vlan: "16"
- duplex: "a-half"
name: "Half Duplex 2950-S"
port: "Gi1/0/13"
duplex: "a-half"
speed: "auto"
status: "notconnect"
type: "10/100BaseTX"
vlan: "16"
- duplex: "a-half"
- port: "Gi1/0/13"
name: "Half Duplex 2950-S"
port: "Gi1/0/14"
speed: "auto"
status: "notconnect"
type: "Not Present"
vlan: "16"
- duplex: "a-half"
name: "Multi Space to the"
port: "Gi1/0/15"
duplex: "a-half"
speed: "auto"
status: "notconnect"
type: "10/100BaseTX"
- port: "Gi1/0/14"
name: "Half Duplex 2950-S"
status: "notconnect"
vlan: "16"
- duplex: "a-half"
duplex: "a-half"
speed: "auto"
type: "Not Present"
- port: "Gi1/0/15"
name: "Multi Space to the"
port: "Gi1/0/16"
status: "notconnect"
vlan: "16"
duplex: "a-half"
speed: "auto"
status: "err-disabled"
type: "10/100BaseTX"
- port: "Gi1/0/16"
name: "Multi Space to the"
status: "err-disabled"
vlan: "16"
- duplex: "a-half"
name: "Multi Space"
port: "Gi1/0/17"
duplex: "a-half"
speed: "auto"
status: "disabled"
type: "10/100BaseTX"
- port: "Gi1/0/17"
name: "Multi Space"
status: "disabled"
vlan: "16"
- duplex: "a-full"
duplex: "a-half"
speed: "auto"
type: "10/100BaseTX"
- port: "Fa1/6"
name: "test"
status: "notconnect"
vlan: "1"
duplex: "auto"
speed: "auto"
type: "10/100BaseTX"
- port: "Po1"
name: "ethchl"
port: "Po1"
speed: "a-1000"
status: "connected"
type: ""
vlan: "trunk"
duplex: "a-full"
speed: "a-1000"
type: ""