diff --git a/templates/cisco_xr_show_ip_bgp_summary.template b/templates/cisco_xr_show_ip_bgp_summary.template new file mode 100644 index 0000000000..99f30c3a27 --- /dev/null +++ b/templates/cisco_xr_show_ip_bgp_summary.template @@ -0,0 +1,25 @@ +Value Filldown ROUTER_ID (\d+\.\d+\.\d+\.\d+) +Value Filldown LOCAL_AS (\d+) +Value BGP_NEIGH (\d+\.\d+\.\d+\.\d+) +Value NEIGH_AS (\d+) +Value MSG_RCVD (\d+) +Value MSG_SENT (\d+) +Value IN_QUEUE (\d+) +Value OUT_QUEUE (\d+) +Value UP_DOWN (\S+) +Value STATE_PFXRCD (\S+) + + +Start + ^.*\s+${ROUTER_ID}.*number\s+${LOCAL_AS} -> Begin + +Begin + ^Neighbor\s+.*Spk -> Neighbors + +Neighbors + ^${BGP_NEIGH}\s+\d+\s+${NEIGH_AS}\s+${MSG_RCVD}\s+${MSG_SENT}\s+\d+\s+${IN_QUEUE}\s+${OUT_QUEUE}\s+${UP_DOWN}\s+${STATE_PFXRCD} -> Record + ^\s+$$ + ^$$ + ^.* -> Error "LINE NOT FOUND" + +EOF diff --git a/templates/index b/templates/index index 04ecff448a..98c953423e 100644 --- a/templates/index +++ b/templates/index @@ -165,6 +165,7 @@ cisco_xr_show_cdp_neighbors_detail.template, .*, cisco_xr, sh[[ow]] c[[dp]] neig 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]] cisco_xr_admin_show_platform.template, .*, cisco_xr, adm[[in]] sh[[ow]] pla[[tform]] +cisco_xr_show_ip_bgp_summary.template, .*, cisco_xr, sh[[ow]] ip b[[gp]] s[[ummary]] cisco_xr_show_isis_neighbors.template, .*, cisco_xr, sh[[ow]] isis ne[[ighbors]] cisco_xr_show_rsvp_neighbors.template, .*, cisco_xr, sh[[ow]] rs[[vp]] neigh[[bors]] cisco_xr_show_ospf_neighbor.template, .*, cisco_xr, sh[[ow]] ospf nei[[ghbor]] diff --git a/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.parsed b/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.parsed new file mode 100644 index 0000000000..531b9e8454 --- /dev/null +++ b/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.parsed @@ -0,0 +1,51 @@ +--- + +parsed_sample: + + +- state_pfxrcd : 'Idle' + neigh_as : '64924' + local_as : '64200' + out_queue : '0' + msg_sent : '64731' + bgp_neigh : '10.10.17.161' + up_down : '00:00:00' + in_queue : '0' + router_id : '30.67.35.78' + msg_rcvd : '36190' + + +- state_pfxrcd : 'Active' + neigh_as : '64727' + local_as : '64200' + out_queue : '0' + msg_sent : '70941' + bgp_neigh : '10.10.128.240' + up_down : '2d14h' + in_queue : '0' + router_id : '30.67.35.78' + msg_rcvd : '68750' + + +- state_pfxrcd : '82' + neigh_as : '64727' + local_as : '64200' + out_queue : '0' + msg_sent : '76220' + bgp_neigh : '10.10.132.240' + up_down : '7w2d' + in_queue : '0' + router_id : '30.67.35.78' + msg_rcvd : '74112' + + +- state_pfxrcd : '82' + neigh_as : '64727' + local_as : '64200' + out_queue : '0' + msg_sent : '74575' + bgp_neigh : '10.10.140.240' + up_down : '4d10h' + in_queue : '0' + router_id : '30.67.35.78' + msg_rcvd : '72363' diff --git a/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.raw b/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.raw new file mode 100644 index 0000000000..f18cb8dc10 --- /dev/null +++ b/tests/cisco_xr/show_ip_bgp_summary/cisco_xr_show_ip_bgp_summary.raw @@ -0,0 +1,22 @@ +Mon Dec 18 11:13:26.959 UTC +BGP router identifier 30.67.35.78, local AS number 64200 +BGP generic scan interval 60 secs +Non-stop routing is enabled +BGP table state: Active +Table ID: 0xe0000000 RD version: 94623 +BGP main routing table version 94623 +BGP NSR Initial initsync version 2 (Reached) +BGP NSR/ISSU Sync-Group versions 0/0 +BGP scan interval 60 secs + +BGP is operating in STANDALONE mode. + + +Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer +Speaker 94623 94623 94623 94623 94623 0 + +Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd +10.10.17.161 0 64924 36190 64731 0 0 0 00:00:00 Idle +10.10.128.240 0 64727 68750 70941 0 0 0 2d14h Active +10.10.132.240 0 64727 74112 76220 94623 0 0 7w2d 82 +10.10.140.240 0 64727 72363 74575 94623 0 0 4d10h 82 \ No newline at end of file