-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: cisco_ios_show_interfaces_status - Capture FC lines (#839)
- Loading branch information
Showing
4 changed files
with
183 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
Value PORT (\S+) | ||
Value NAME (.+?) | ||
Value STATUS (err-disabled|disabled|connected|notconnect|inactive) | ||
Value STATUS (err-disabled|disabled|connected|notconnect|inactive|up|down) | ||
Value VLAN (\S+) | ||
Value DUPLEX (\S+) | ||
Value SPEED (\S+) | ||
Value TYPE (.*) | ||
Value FC_MODE (\S+) | ||
|
||
Start | ||
^Port -> Begin | ||
# Capture time-stamp if vty line has command time-stamping turned on | ||
^Load\s+for\s+ | ||
# Capture time-stamp if vty line has command time-stamping turned on | ||
^Time\s+source\s+is | ||
^-+\s*$$ | ||
^Port\s+Name\s+Status\s+Vlan\s+Duplex\s+Speed\s+Type -> Interfaces | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Begin | ||
Interfaces | ||
#Match fc... | ||
^\s*${PORT}\s+is\s+${STATUS}\s+Port\s+mode\s+is\s+${FC_MODE}\s*$$ -> Record | ||
^\s*${PORT}\s+is\s+${STATUS}\s+\(${TYPE}\)\s*$$ -> 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 | ||
^-+ | ||
^\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
20 changes: 20 additions & 0 deletions
20
tests/cisco_ios/show_interfaces_status/cisco_ios_show_interfaces_status2.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,20 @@ | ||
|
||
-------------------------------------------------------------------------------- | ||
Port Name Status Vlan Duplex Speed Type | ||
-------------------------------------------------------------------------------- | ||
fc2/1 is up Port mode is NP | ||
fc2/2 is up Port mode is NP | ||
fc2/3 is up Port mode is NP | ||
fc2/4 is up Port mode is NP | ||
fc2/5 is down (SFP not present) | ||
fc2/6 is down (SFP not present) | ||
Eth1/1 XXXXXXX1_bond1_Act connected 111 full 1000 SFP-1000BAS | ||
Eth1/2 XXXXXXX3_bond1_Act connected 112 full 1000 SFP-1000BAS | ||
Eth1/3 YYYYYYYY1_ha1 connected 115 full 1000 SFP-1000BAS | ||
Eth1/4 ZZZZZZZZZZZZZ1_tru connected trunk full 10G 10Gbase-SR | ||
Eth1/5 ZZZZZZZZZZZZZ1_tru connected trunk full 10G 10Gbase-SR | ||
Eth1/6 AAAAAAAAA1_po2 connected trunk full 1000 SFP-1000BAS | ||
Eth1/7 BBBBBBBB10-1 connected 4093 full 10G Fabric Exte | ||
Eth1/8 BBBBBBBB10-1 connected 4093 full 10G Fabric Exte | ||
Eth1/9 BBBBBBBB11-1 connected 4093 full 10G Fabric Exte | ||
Eth1/10 BBBBBBBB11-1 connected 4093 full 10G Fabric Exte |
130 changes: 130 additions & 0 deletions
130
tests/cisco_ios/show_interfaces_status/cisco_ios_show_interfaces_status2.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,130 @@ | ||
--- | ||
parsed_sample: | ||
- port: "fc2/1" | ||
name: "" | ||
status: "up" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "" | ||
fc_mode: "NP" | ||
- port: "fc2/2" | ||
name: "" | ||
status: "up" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "" | ||
fc_mode: "NP" | ||
- port: "fc2/3" | ||
name: "" | ||
status: "up" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "" | ||
fc_mode: "NP" | ||
- port: "fc2/4" | ||
name: "" | ||
status: "up" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "" | ||
fc_mode: "NP" | ||
- port: "fc2/5" | ||
name: "" | ||
status: "down" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "SFP not present" | ||
fc_mode: "" | ||
- port: "fc2/6" | ||
name: "" | ||
status: "down" | ||
vlan: "" | ||
duplex: "" | ||
speed: "" | ||
type: "SFP not present" | ||
fc_mode: "" | ||
- port: "Eth1/1" | ||
name: "XXXXXXX1_bond1_Act" | ||
status: "connected" | ||
vlan: "111" | ||
duplex: "full" | ||
speed: "1000" | ||
type: "SFP-1000BAS" | ||
fc_mode: "" | ||
- port: "Eth1/2" | ||
name: "XXXXXXX3_bond1_Act" | ||
status: "connected" | ||
vlan: "112" | ||
duplex: "full" | ||
speed: "1000" | ||
type: "SFP-1000BAS" | ||
fc_mode: "" | ||
- port: "Eth1/3" | ||
name: "YYYYYYYY1_ha1" | ||
status: "connected" | ||
vlan: "115" | ||
duplex: "full" | ||
speed: "1000" | ||
type: "SFP-1000BAS" | ||
fc_mode: "" | ||
- port: "Eth1/4" | ||
name: "ZZZZZZZZZZZZZ1_tru" | ||
status: "connected" | ||
vlan: "trunk" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "10Gbase-SR" | ||
fc_mode: "" | ||
- port: "Eth1/5" | ||
name: "ZZZZZZZZZZZZZ1_tru" | ||
status: "connected" | ||
vlan: "trunk" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "10Gbase-SR" | ||
fc_mode: "" | ||
- port: "Eth1/6" | ||
name: "AAAAAAAAA1_po2" | ||
status: "connected" | ||
vlan: "trunk" | ||
duplex: "full" | ||
speed: "1000" | ||
type: "SFP-1000BAS" | ||
fc_mode: "" | ||
- port: "Eth1/7" | ||
name: "BBBBBBBB10-1" | ||
status: "connected" | ||
vlan: "4093" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "Fabric Exte" | ||
fc_mode: "" | ||
- port: "Eth1/8" | ||
name: "BBBBBBBB10-1" | ||
status: "connected" | ||
vlan: "4093" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "Fabric Exte" | ||
fc_mode: "" | ||
- port: "Eth1/9" | ||
name: "BBBBBBBB11-1" | ||
status: "connected" | ||
vlan: "4093" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "Fabric Exte" | ||
fc_mode: "" | ||
- port: "Eth1/10" | ||
name: "BBBBBBBB11-1" | ||
status: "connected" | ||
vlan: "4093" | ||
duplex: "full" | ||
speed: "10G" | ||
type: "Fabric Exte" | ||
fc_mode: "" |