Skip to content
Open
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
@@ -1,6 +1,6 @@
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value STATUS (connected|notconnec|down|disabled|sfpAbsent|xcvrAbsen|channelDo|noOperMem)
Value VLAN_ID (\d+|routed|trunk|f-path|--)
Value DUPLEX (\S+)
Value SPEED (\S+)
Expand All @@ -9,6 +9,9 @@ Value TYPE (\S+(\s\S+)*)
Start
^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN_ID}\s+${DUPLEX}\s+${SPEED}(?:\s+${TYPE})?\s*$$ -> Record
^[Pp]ort\s+[Nn]ame\s+[Ss]tatus\s+[Vv]lan\s+[Dd]uplex\s+[Ss]peed\s+[Tt]ype\s*$$
^Interface\s+Name\s+Status\s+(Reason\s+){2}description\s*$$
^${PORT}\s+${NAME}\s+${STATUS}\s+admin\s+down\s+\S+\s+\S+\s*$$ -> Record
^${PORT}\s+${NAME}\s+${STATUS}\s+\S+(\s+\S+)?\s+.*?\s*$$ -> Record
^-+
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
mgmt0 -- connected routed full a-1000 --
Eth1/1 TEST1 connected routed full a-10G 10Gbase-SR
Eth1/2 TEST2 connected trunk full a-10G 10Gbase-SR
Eth1/3 TEST3 disabled routed auto auto 10Gbase-SR

-------------------------------------------------------------------------------
Interface Name Status Reason Reason description
-------------------------------------------------------------------------------
Tunnel13 Test Tun13 connected none none
Tunnel40 Test Tun40 down admin down Administratively down
Tunnel41 Test Tun41 down sourceNotConfigure tunnel source is not configured
Tunnel42 Test Tun42 down destinationNotConf tunnel destination is not configured

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
parsed_sample:
- duplex: "full"
name: "--"
port: "mgmt0"
speed: "a-1000"
status: "connected"
type: "--"
vlan_id: "routed"
- duplex: "full"
name: "TEST1"
port: "Eth1/1"
speed: "a-10G"
status: "connected"
type: "10Gbase-SR"
vlan_id: "routed"
- duplex: "full"
name: "TEST2"
port: "Eth1/2"
speed: "a-10G"
status: "connected"
type: "10Gbase-SR"
vlan_id: "trunk"
- duplex: "auto"
name: "TEST3"
port: "Eth1/3"
speed: "auto"
status: "disabled"
type: "10Gbase-SR"
vlan_id: "routed"
- duplex: ""
name: "Test Tun13"
port: "Tunnel13"
speed: ""
status: "connected"
type: ""
vlan_id: ""
- duplex: ""
name: "Test Tun40"
port: "Tunnel40"
speed: ""
status: "down"
type: ""
vlan_id: ""
- duplex: ""
name: "Test Tun41"
port: "Tunnel41"
speed: ""
status: "down"
type: ""
vlan_id: ""
- duplex: ""
name: "Test Tun42"
port: "Tunnel42"
speed: ""
status: "down"
type: ""
vlan_id: ""
Loading