Skip to content

Commit

Permalink
status regex includes non-whitespace (#1941)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Bear <[email protected]>
  • Loading branch information
tfchristie-wi and mjbear authored Jan 6, 2025
1 parent e638efd commit 5235423
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Interfaces
^\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_ID}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}:?\s+${VLAN_ID}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}\s*$$ -> Record
^\s*${PORT}\s+${NAME}\s+${STATUS}:?(\s+\S+)?\s+${VLAN_ID}\s+${DUPLEX}\s+${SPEED}\s*${TYPE}\s*$$ -> Record
^-+
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ Gi1/0/18 Monitoring Port monitoring routed a-full auto 10/100/1000Ba
Gi1/0/19 No Description notconnect: 1 a-full a-100 10/100/1000BaseTX
Gi1/0/20 No Description connected: 1 a-full a-100 10/100/1000BaseTX
Gi1/0/21 Monitoring Port monitoring unassigned a-full auto 10/100/1000BaseT
Gi1/0/22 addl status text notconnect: TD 1 a-full a-100 10/100/1000BaseTX
Gi1/0/23 addl status text connected: TDR 1 a-full a-100 10/100/1000BaseTX
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
Expand Up @@ -168,6 +168,22 @@ parsed_sample:
status: "monitoring"
type: "10/100/1000BaseT"
vlan_id: "unassigned"
- duplex: "a-full"
fc_mode: ""
name: "addl status text"
port: "Gi1/0/22"
speed: "a-100"
status: "notconnect"
type: "10/100/1000BaseTX"
vlan_id: "1"
- duplex: "a-full"
fc_mode: ""
name: "addl status text"
port: "Gi1/0/23"
speed: "a-100"
status: "connected"
type: "10/100/1000BaseTX"
vlan_id: "1"
- duplex: "auto"
fc_mode: ""
name: "test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Port Name Status Vlan Duplex Speed Type
Fa0/1 *** connected to U notconnect 150 auto auto 10/100BaseTX
Fa0/2 funky trunky port notconnect trunk auto auto 10/100BaseTX
Fa0/2 funky trunk port notconnect trunk auto auto 10/100BaseTX
Fa0/3 routed magic notconnect routed auto auto 10/100BaseTX
Fa0/4 uplink notconnect 123 auto auto 10/100BaseTX
Fa0/4 downlink notconnect 456 auto auto 10/100BaseTX
Fa0/4 suspended customer disabled 789 auto auto 10/100BaseTX
Fa0/5 downlink notconnect 456 auto auto 10/100BaseTX
Fa0/6 suspended customer disabled 789 auto auto 10/100BaseTX
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parsed_sample:
vlan_id: "150"
- duplex: "auto"
fc_mode: ""
name: "funky trunky port"
name: "funky trunk port"
port: "Fa0/2"
speed: "auto"
status: "notconnect"
Expand All @@ -35,15 +35,15 @@ parsed_sample:
- duplex: "auto"
fc_mode: ""
name: "downlink"
port: "Fa0/4"
port: "Fa0/5"
speed: "auto"
status: "notconnect"
type: "10/100BaseTX"
vlan_id: "456"
- duplex: "auto"
fc_mode: ""
name: "suspended customer"
port: "Fa0/4"
port: "Fa0/6"
speed: "auto"
status: "disabled"
type: "10/100BaseTX"
Expand Down

0 comments on commit 5235423

Please sign in to comment.