You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
show ip interfaces: fix exception with BGP unnumbered (sonic-net#3695)
* show ip interfaces: fix exception with BGP unnumbered
Without this patch an exception is thrown when running `show ip interfaces`
when BGP Unnumbered is configured:
```
root@sw1:~# show ip interfaces
Traceback (most recent call last):
File "/usr/local/bin/ipintutil", line 280, in <module>
main()
File "/usr/local/bin/ipintutil", line 273, in main
ip_intfs = get_ip_intfs(af, namespace, display)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/ipintutil", line 236, in get_ip_intfs
ip_intfs_in_ns = get_ip_intfs_in_namespace(af, namespace, display)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/ipintutil", line 149, in get_ip_intfs_in_namespace
bgp_peer = get_bgp_peer()
^^^^^^^^^^^^^^
File "/usr/local/bin/ipintutil", line 51, in get_bgp_peer
local_addr = data[neighbor_ip]['local_addr']
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'local_addr'
```
This patch will allow the command to complete successfully. It shouldn't
be necessary to actually query FRR for neighbor details, the prior version
didn't, it just echo'd back config details.
Signed-off-by: Brad House (@bradh352)
* add coverage for exception handled by this PR
---------
Signed-off-by: Brad House (@bradh352)
0 commit comments