napalm icon indicating copy to clipboard operation
napalm copied to clipboard

IOS ip_bgp_neigh.tpl Doesn't match VRFs with hyphens

Open kaibabbob opened this issue 4 years ago • 0 comments

Description of Issue/Question

I have found that the textsfm template (ip_bgp_neigh.tpl) used by get_bgp_neighbors_detail doesn't match VRFs with hyphens such as "MY-VRF" because the regex is only looking for a word (\w+)

Value VRF (\w+)   

One fix would be to change \w+ to \S+ which will match hyphenated words.

Note: Please check https://guides.github.com/features/mastering-markdown/ to see how to properly format your request.

Did you follow the steps from https://github.com/napalm-automation/napalm#faq

(Place an x between the square brackets where applicable)

  • [x] Yes
  • [] No

Setup

napalm version

(Paste verbatim output from pip freeze | grep napalm between quotes below)

napalm==3.2.0

Network operating system version

(Paste verbatim output from show version - or equivalent - between quotes below)

Cisco IOS XE Software, Version 16.12.04
Cisco IOS Software [Gibraltar], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.12.4, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 09-Jul-20 21:59 by mcpre


Cisco IOS-XE software, Copyright (c) 2005-2020 by cisco Systems, Inc.
All rights reserved.  Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0.  The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY.  You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0.  For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.


ROM: 16.9(4r)

router1 uptime is 13 weeks, 3 days, 17 hours, 14 minutes
Uptime for this control processor is 13 weeks, 3 days, 17 hours, 17 minutes
System returned to ROM by Reload Command at 01:03:50 EST Sun Sep 13 2020
System restarted at 01:08:24 EST Sun Sep 13 2020
System image file is "bootflash:asr1000-universalk9.16.12.04.SPA.bin"
Last reload reason: Reload Command



This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
[email protected].

License Type: Smart License is permanent
License Level: adventerprise
Next reload license Level: adventerprise

The current crypto throughput level is 0 kbps


Smart Licensing Status: REGISTERED/AUTHORIZED

cisco ASR1002-HX (2KH) processor (revision 2KH) with 6837306K/6147K bytes of memory.
Processor board ID FXxxxxxx
Crypto Hardware Module absent
8 Gigabit Ethernet interfaces
8 Ten Gigabit Ethernet interfaces
32768K bytes of non-volatile configuration memory.
16777216K bytes of physical memory.
29401087K bytes of eUSB flash at bootflash:.
0K bytes of WebUI ODM Files at webui:.

Configuration register is 0x2102

Steps to Reproduce the Issue

Configure BGP with a hyphenated VRF

router bgp 64001
 !
 address-family ipv4 vrf MY-VRF
  neighbor 10.0.2.1 remote-as 64001

Error Traceback

(Paste the complete traceback of the exception between quotes below)


kaibabbob avatar Dec 16 '20 23:12 kaibabbob