Skip to content

Commit

Permalink
split PREFIX into its parts of NETWORK and PREFIX_LENGTH
Browse files Browse the repository at this point in the history
(alcatel_sros_show_router_bgp_routes_vpn-ipv4)
  • Loading branch information
mjbear committed Aug 8, 2023
1 parent 0b835de commit 3622556
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Value IN_OUT_USE (\*>i|u\*>i|\*i)
Value RD (\d+\:\d+)
Value Required PREFIX (\d+\.\d+\.\d+\.\d+\/[1-9][0-9]?)
Value Required NETWORK (\d+(\.\d+){3})
Value Required PREFIX_LENGTH (\d{1,2})
Value LOCAL_PREF (\d+)
Value MED (None|d\+)
Value NEXT_HOP (\d+\.\d+\.\d+\.\d+)
Expand All @@ -12,6 +13,6 @@ Start
^----------- -> Prefix

Prefix
^${IN_OUT_USE}\s+${RD}\:${PREFIX}\s+${LOCAL_PREF}\s+${MED}
^${IN_OUT_USE}\s+${RD}\:${NETWORK}\/${PREFIX_LENGTH}\s+${LOCAL_PREF}\s+${MED}
^\s+${NEXT_HOP}\s+${PATH_ID}\s+${LABEL}
^\s+${AS_PATH} -> Record
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
parsed_sample:
- med: "None"
as_path: "No As-Path"
label: "262132"
rd: "65500:11"
path_id: "None"
prefix: "192.0.2.4/32"
next_hop: "10.11.5.5"
- as_path: "No As-Path"
in_out_use: "*>i"
local_pref: "100"
- med: "None"
as_path: "No As-Path"
label: "262132"
rd: "65500:11"
local_pref: "100"
med: "None"
network: "192.0.2.4"
next_hop: "10.11.5.5"
path_id: "None"
prefix: "192.0.2.14/32"
next_hop: "192.0.2.2"
prefix_length: "32"
rd: "65500:11"
- as_path: "No As-Path"
in_out_use: "u*>i"
label: "262132"
local_pref: "100"
med: "None"
network: "192.0.2.14"
next_hop: "192.0.2.2"
path_id: "None"
prefix_length: "32"
rd: "65500:11"

0 comments on commit 3622556

Please sign in to comment.