genielibs
genielibs copied to clipboard
get_bgp_neighbors API call CLI command invalid
https://github.com/CiscoTestAutomation/genielibs/blob/5ec17050fcab6335547f9771846627378b113935/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/get.py#L1136
CLI command - show ip bgp {address_family} all summary
is not accepted by IOSXE parser
it should read show ip bgp {address_family} summary
@wgibbons21
show ip bgp {address_family} all summary
It seems the above command is supported for iosxe.
https://github.com/CiscoTestAutomation/genieparser/blob/cc19fcd2f6248d3b08ca8cb35e77c9a6dca50d68/src/genie/libs/parser/iosxe/show_bgp.py#L34
You are welcome to contribute a new api with the show ip bgp {address_family} summary
command. Kindly let me know if you need any help.
@lsheikal Thanks for reviewing! I meant the IOS-XE parser, not the Genie parser. See below:
https://github.com/CiscoTestAutomation/genielibs/blob/5ec17050fcab6335547f9771846627378b113935/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/bgp/get.py#L1136
CLI command -
show ip bgp {address_family} all summary
is not accepted by IOSXE parser it should readshow ip bgp {address_family} summary
Hi @wgibbons21,
I see your point. the API was developed initially to deal with address family vpnv4
or vpnv6
. the command is acceptable. but it seemed missed to handle ipv4 unicast
/ipv6 unicast
in the API.
R1_xe#show ip bgp vpnv4 all summary
BGP router identifier 10.1.1.1, local AS number 65000
BGP table version is 55, main routing table version 55
3 network entries using 768 bytes of memory
3 path entries using 408 bytes of memory
3/3 BGP path/bestpath attribute entries using 912 bytes of memory
2 BGP extended community entries using 500 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2588 total bytes of memory
BGP activity 40/28 prefixes, 47/35 paths, scan interval 60 secs
3 networks peaked at 16:11:51 Oct 7 2021 UTC (22:37:06.184 ago)
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.2.2.2 4 65000 1015 1120 55 0 0 16:52:31 1
10.3.3.3 4 65000 1024 1127 55 0 0 16:58:16 1
so we need to add like if
condition to handle the case between ipv4 unicast
/ipv6 unicast
and vpnv4
/vpnv6
. in case of ipv4 unicast
/ipv6 unicast
, will not have all
in the command.
This might be quick fix. Is this something you can consider to fix by yourself as contribution? we are encouraging users to contribute. if you cannot, no worries. we will take care of it but just let us know.
@tahigash Yes, I will fix and submit a pr. As I was testing just wanted to document the issue to make sure I didn't forget about it. Thanks again!
Facing same issue as the author, isn't there much demand for vpnv4 af?