Skip to content

Commit

Permalink
Fixed issue with type (#427)
Browse files Browse the repository at this point in the history
Added OR operator and regex to type to be able to capture Fabric Exte in output for nxos_show_interface_status template
  • Loading branch information
FragmentedPacket authored Jul 23, 2019
1 parent 117da8a commit 3626a8e
Show file tree
Hide file tree
Showing 5 changed files with 559 additions and 512 deletions.
2 changes: 1 addition & 1 deletion templates/cisco_nxos_show_interface_status.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Value STATUS (\S+)
Value VLAN (\d+|routed|trunk|--)
Value DUPLEX (\S+)
Value SPEED (\S+)
Value TYPE (\S+)
Value TYPE (\S+|\S+\s+\S+)

Start
^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s+${TYPE}\s*$$ -> Record
Expand Down
Original file line number Diff line number Diff line change
@@ -1,75 +1,66 @@
---
parsed_sample:

- port: "mgmt0"
name: "--"
status: "connected"
vlan: "routed"
duplex: "full"
speed: "1000"
type: "--"

- port: "Eth1/1"
name: "interface1"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- port: "Eth1/2"
name: "interface2"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- port: "Eth1/3"
name: "interface3"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR"

- port: "Eth1/4"
name: "interface4"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR"

- port: "Eth1/5"
name: "interface5"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- port: "Eth1/6"
name: "interface6"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- port: Eth1/7
name: "interface7"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- port: "Eth1/8"
name: "interface8"
status: "connected"
vlan: "trunk"
duplex: "full"
speed: "10G"
type: "10Gbase-SR-S"

- duplex: full
name: --
port: mgmt0
speed: '1000'
status: connected
type: --
vlan: routed
- duplex: full
name: interface1
port: Eth1/1
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
- duplex: full
name: interface2
port: Eth1/2
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
- duplex: full
name: interface3
port: Eth1/3
speed: 10G
status: connected
type: 10Gbase-SR
vlan: trunk
- duplex: full
name: interface4
port: Eth1/4
speed: 10G
status: connected
type: 10Gbase-SR
vlan: trunk
- duplex: full
name: interface5
port: Eth1/5
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
- duplex: full
name: interface6
port: Eth1/6
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
- duplex: full
name: interface7
port: Eth1/7
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
- duplex: full
name: interface8
port: Eth1/8
speed: 10G
status: connected
type: 10Gbase-SR-S
vlan: trunk
Loading

0 comments on commit 3626a8e

Please sign in to comment.