Skip to content

Commit

Permalink
status regex includes non-whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Christie committed Dec 19, 2024
1 parent 7cbb9e7 commit 0a89cd5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
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${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

0 comments on commit 0a89cd5

Please sign in to comment.