From 8f2a28d7d5aaadbcc6aa9c1e54706aa5849287cd Mon Sep 17 00:00:00 2001 From: rtkennedy Date: Fri, 3 Jul 2020 05:06:55 -0600 Subject: [PATCH] Bugfix: Dual line support - cisco_nxos_show_ip_bgp_summary (#772) Co-authored-by: Robert Kennedy --- templates/cisco_nxos_show_ip_bgp_summary.textfsm | 2 ++ .../cisco_nxos_show_ip_bgp_summary.raw | 2 ++ .../cisco_nxos_show_ip_bgp_summary.yml | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/templates/cisco_nxos_show_ip_bgp_summary.textfsm b/templates/cisco_nxos_show_ip_bgp_summary.textfsm index e32e9ce4da..b5873c3139 100644 --- a/templates/cisco_nxos_show_ip_bgp_summary.textfsm +++ b/templates/cisco_nxos_show_ip_bgp_summary.textfsm @@ -15,6 +15,8 @@ Start ^BGP\s+router\s+identifier\s+${ROUTER_ID},\s+[Ll]ocal\s+[Aa][Ss]\s+number\s+${LOCAL_AS} ^Neighbor\s+V\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up/Down\s+State/PfxRcd\s*$$ ^${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}\s*$$ -> Record + ^${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}\s*$$ -> Record ^BGP\s+table\s+version ^\d+\s+network\s+entries ^BGP attribute entries diff --git a/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.raw b/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.raw index 94729aad66..1968fd7b51 100644 --- a/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.raw +++ b/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.raw @@ -17,3 +17,5 @@ Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.0.8 4 65007 12250936 9181571 512185203 0 0 1y10w 82 10.0.0.9 4 65008 222146 14368489 512185203 0 0 22w0d 0 10.0.0.10 4 65009 26930508 942614 512185203 0 0 1y10w Idle (Admin) +10.0.0.11 4 65010 + 2655204 14931352 512185206 0 0 1w5d 4452 diff --git a/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.yml b/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.yml index f7933948fb..f522cb7bac 100644 --- a/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.yml +++ b/tests/cisco_nxos/show_ip_bgp_summary/cisco_nxos_show_ip_bgp_summary.yml @@ -132,3 +132,14 @@ parsed_sample: out_queue: "0" up_down: "1y10w" state_pfxrcd: "Idle (Admin)" + - router_id: "2.2.2.3" + local_as: "102" + vrf: "default" + bgp_neigh: "10.0.0.11" + neigh_as: "65010" + msg_rcvd: "2655204" + msg_sent: "14931352" + in_queue: "0" + out_queue: "0" + up_down: "1w5d" + state_pfxrcd: "4452"