Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template to parse show mpls forwarding labels #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
18 changes: 18 additions & 0 deletions templates/cisco_xr_show_mpls_forwarding.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value Filldown LOCAL_LABEL (\d+)
Value Required OUTGOING_LABEL (\S+)
Value Required PREFIX (No ID|\S+\s+\S+\s+\S+\W+\d+\W+|Aggregate)
Value Required OUTGOING_INTF (\S+)
Value Required NEXT_HOP (\S+)
Value Required BYTE (\d+)

Start
^.+UTC
^Local.* -> Labels

Labels
^${LOCAL_LABEL}\s+${OUTGOING_LABEL}\s+${PREFIX}\s+${OUTGOING_INTF}\s+${NEXT_HOP}\s+${BYTE} -> Record
^(\s+|\d+)\s+${OUTGOING_LABEL}\s+${PREFIX}\s+${OUTGOING_INTF}\s+${NEXT_HOP}\s+${BYTE} -> Record
^${LOCAL_LABEL}\s+${OUTGOING_LABEL}\s+${PREFIX}\s+${OUTGOING_INTF}\s+${NEXT_HOP}\s+\\
^\s+${BYTE} -> Record
^\s+${OUTGOING_LABEL}\s+${PREFIX}\s+${OUTGOING_INTF}\s+${NEXT_HOP}\s+\\
^\s+${BYTE} -> Record
2 changes: 2 additions & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,12 @@ cisco_xr_show_controller_fabric_plane_all.template, .*, cisco_xr, sh[[ow]] contr
cisco_xr_show_configuration_commit_list.template, .*, cisco_xr, sh[[ow]] conf[[iguration]] c[[ommit]] l[[ist]]
cisco_xr_show_asic-errors_all_location.template, .*, cisco_xr, sh[[ow]] asic-er[[rors]] all loc[[ation]]
cisco_xr_show_dhcp_ipv4_proxy_binding.template, .*, cisco_xr, sh[[ow]] dh[[cp]] ipv4 p[[roxy]] b[[inding]]
cisco_xr_show_mpls_forwarding.template, .*, cisco_xr, sh[[ow]] mp[[ls]] forwarding label[s]
cisco_xr_show_mpls_ldp_neighbor_brief.template, .*, cisco_xr, sh[[ow]] mp[[ls]] ld[[p]] neigh[[bor]] br[[ief]]
cisco_xr_admin_show_environment_fan.template, .*, cisco_xr, adm[[in]] sh[[ow]] env[[ironment]] f[[an]]
cisco_xr_show_cdp_neighbors_detail.template, .*, cisco_xr, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]]
cisco_xr_show_cef_drops_location.template, .*, cisco_xr, sh[[ow]] cef drops loc[[ation]]
cisco_xr_show_cef_mpls.template, .*, cisco_xr, sh[[ow]] cef mpls local-label
cisco_xr_show_ip_interface_brief.template, .*, cisco_xr, sh[[ow]] ip int[[erface]] br[[ief]]
cisco_xr_show_redundancy_summary.template, .*, cisco_xr, sh[[ow]] redun[[dancy]] summ[[ary]]
cisco_xr_show_interface_brief.template, .*, cisco_xr, sh[[ow]] int[[erface]] br[[ief]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
parsed_sample:


- local_label: "24897"
outgoing_label: "Pop"
prefix: "No ID"
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
- local_label: "24897"
outgoing_label: "Pop"
prefix: "No ID"
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
- local_label: "24898"
outgoing_label: "Pop"
prefix: "No ID"
outgoing_intf: "BE302"
next_hop: "172.20.34.1"
byte: "0"
- local_label: "24898"
outgoing_label: "Pop"
prefix: "No ID"
outgoing_intf: "BE302"
next_hop: "172.20.34.1"
byte: "0"
- local_label: 34066
outgoing_label: "Pop"
prefix: "SR Pfx (idx 66)"
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
- local_label: 34067
outgoing_label: "Pop"
prefix: SR Pfx (idx 67)
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
- local_label: 34070
outgoing_label: "Pop"
prefix: "SR Pfx (idx 70)"
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
- local_label: 34071
outgoing_label: "Pop"
prefix: "SR Pfx (idx 71)"
outgoing_intf: "BE303"
next_hop: "172.20.35.1"
byte: "0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Wed Sep 15 22:05:11.394 UTC


Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
24897 Pop No ID BE303 172.20.35.1 0
Pop No ID BE303 172.20.35.1 0
24898 Pop No ID BE302 172.20.34.1 0
Pop No ID BE302 172.20.34.1 0
34066 Pop SR Pfx (idx 66) BE303 172.20.35.1 0
34067 Pop SR Pfx (idx 67) BE303 172.20.35.1 0
34070 Pop SR Pfx (idx 70) BE303 172.20.35.1 0
34071 Pop SR Pfx (idx 71) BE303 172.20.35.1 0