Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_bgp_neighbors API call CLI command invalid #80

Open
wgibbons21 opened this issue Oct 5, 2021 · 5 comments
Open

get_bgp_neighbors API call CLI command invalid #80

wgibbons21 opened this issue Oct 5, 2021 · 5 comments
Assignees

Comments

@wgibbons21
Copy link

cmd = "show ip bgp {} all summary".format(address_family)

CLI command - show ip bgp {address_family} all summary is not accepted by IOSXE parser
it should read show ip bgp {address_family} summary

@lsheikal
Copy link
Contributor

lsheikal commented Oct 7, 2021

@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.

@wgibbons21
Copy link
Author

@lsheikal Thanks for reviewing! I meant the IOS-XE parser, not the Genie parser. See below:
image
image

@tahigash
Copy link
Contributor

tahigash commented Oct 8, 2021

cmd = "show ip bgp {} all summary".format(address_family)

CLI command - show ip bgp {address_family} all summary is not accepted by IOSXE parser it should read show 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.

@wgibbons21
Copy link
Author

wgibbons21 commented Oct 8, 2021

@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!

@sngx13
Copy link

sngx13 commented Jun 22, 2022

Facing same issue as the author, isn't there much demand for vpnv4 af?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants