Skip to content

Commit

Permalink
Enhancement: split IP_ADDRESS_MASK into its two parts IP_ADDRESS and (#…
Browse files Browse the repository at this point in the history
…1429)

PREFIX_LENGTH
  • Loading branch information
mjbear committed Aug 7, 2023
1 parent 4899142 commit 4b9fe3d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Value INTERFACE (\S+)
Value PROCESS (\d+)
Value AREA (\d+)
Value IP_ADDRESS_MASK (\d+\.\d+\.\d+\.\d+/\d+)
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+)
Value PREFIX_LENGTH (\d+)
Value COST (\d+)
Value STATE (\S+)
Value NEIGHBORS_FC (\d+/\d+)

Start
^${INTERFACE}\s+${PROCESS}\s+${AREA}\s+${IP_ADDRESS_MASK}\s+${COST}\s+${STATE}\s+${NEIGHBORS_FC} -> Record
^${INTERFACE}\s+${PROCESS}\s+${AREA}\s+${IP_ADDRESS}\/${PREFIX_LENGTH}\s+${COST}\s+${STATE}\s+${NEIGHBORS_FC} -> Record
# Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
Original file line number Diff line number Diff line change
@@ -1,86 +1,98 @@
---
parsed_sample:
- interface: "Lo0"
process: "1"
area: "0"
ip_address_mask: "172.16.0.11/32"
- area: "0"
cost: "1"
state: "LOOP"
interface: "Lo0"
ip_address: "172.16.0.11"
neighbors_fc: "0/0"
- interface: "Se0/0/0.100"
prefix_length: "32"
process: "1"
area: "0"
ip_address_mask: "172.16.1.1/30"
state: "LOOP"
- area: "0"
cost: "50"
state: "P2P"
interface: "Se0/0/0.100"
ip_address: "172.16.1.1"
neighbors_fc: "1/1"
- interface: "Fa0/0"
prefix_length: "30"
process: "1"
area: "0"
ip_address_mask: "10.0.0.5/24"
state: "P2P"
- area: "0"
cost: "1"
state: "BDR"
interface: "Fa0/0"
ip_address: "10.0.0.5"
neighbors_fc: "1/1"
- interface: "Fa0/1"
prefix_length: "24"
process: "1"
area: "11"
ip_address_mask: "10.1.2.1/24"
state: "BDR"
- area: "11"
cost: "1"
state: "DR"
interface: "Fa0/1"
ip_address: "10.1.2.1"
neighbors_fc: "0/0"
- interface: "Tu1610"
prefix_length: "24"
process: "1"
area: "0"
ip_address_mask: "0.0.0.0/0"
state: "DR"
- area: "0"
cost: "50"
state: "P2P"
interface: "Tu1610"
ip_address: "0.0.0.0"
neighbors_fc: "0/0"
- interface: "Lo5"
prefix_length: "0"
process: "1"
area: "0"
ip_address_mask: "10.48.8.5/32"
state: "P2P"
- area: "0"
cost: "1"
state: "LOOP"
interface: "Lo5"
ip_address: "10.48.8.5"
neighbors_fc: "0/0"
- interface: "Lo4"
prefix_length: "32"
process: "1"
area: "0"
ip_address_mask: "10.48.8.4/32"
cost: "1"
state: "LOOP"
- area: "0"
cost: "1"
interface: "Lo4"
ip_address: "10.48.8.4"
neighbors_fc: "0/0"
- interface: "Tu1603"
prefix_length: "32"
process: "1"
area: "0"
ip_address_mask: "0.0.0.0/0"
state: "LOOP"
- area: "0"
cost: "50"
state: "DOWN"
interface: "Tu1603"
ip_address: "0.0.0.0"
neighbors_fc: "0/0"
- interface: "Tu1602"
prefix_length: "0"
process: "1"
area: "0"
ip_address_mask: "0.0.0.0/0"
state: "DOWN"
- area: "0"
cost: "50"
state: "P2P"
interface: "Tu1602"
ip_address: "0.0.0.0"
neighbors_fc: "0/0"
- interface: "PO4/0"
prefix_length: "0"
process: "1"
area: "0"
ip_address_mask: "10.1.232.6/30"
cost: "6"
state: "P2P"
- area: "0"
cost: "6"
interface: "PO4/0"
ip_address: "10.1.232.6"
neighbors_fc: "1/1"
- interface: "Se3/2:0"
prefix_length: "30"
process: "1"
area: "0"
ip_address_mask: "10.1.224.218/30"
cost: "6"
state: "P2P"
- area: "0"
cost: "6"
interface: "Se3/2:0"
ip_address: "10.1.224.218"
neighbors_fc: "1/1"
- interface: "Se3/1:0"
prefix_length: "30"
process: "1"
area: "0"
ip_address_mask: "10.1.225.150/30"
cost: "6"
state: "P2P"
- area: "0"
cost: "6"
interface: "Se3/1:0"
ip_address: "10.1.225.150"
neighbors_fc: "1/1"
prefix_length: "30"
process: "1"
state: "P2P"

0 comments on commit 4b9fe3d

Please sign in to comment.