-
Notifications
You must be signed in to change notification settings - Fork 557
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
Fix get_bgp_neighbors_detail IOS-XE #1185
Fix get_bgp_neighbors_detail IOS-XE #1185
Conversation
…curs often when sh bgp ipv6 uni sum)
@@ -34,7 +34,8 @@ BGP using 39527928 total bytes of memory | |||
BGP activity 3436532/2710503 prefixes, 19215241/17575537 paths, scan interval 60 secs | |||
|
|||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | |||
2001:559::1 4 7922 6944479 138054 116434201 0 0 12w2d 45646 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure your changes don't break the existing behaviour, please don't change this file and provide a separate test case with the output you're seeing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The show_ip_bgp_all_sum.txt
is the base for the whole test. Following your suggestion I've added a new neighbor to the list and kept all the original neighbors in place. Please let me know if this makes sense to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually prefer to avoid changing this file when fixing a bug (as probably you won't see both outputs, i.e., in both 12:22:20
and 12w2d
format at the same time -- but never say never Cisco is Cisco lol), and have a separate test case; that means, another set of files under a directory, e.g., test/ios/mocked_data/test_get_bgp_neighbors_detail/<some test case name>/
.
But this change is small enough we can leave this pass...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right, it all makes sense now. I wasn't quite sure how the test framework works. Thank you for the explanation, I'll keep it in mind for the next time!
@@ -3,7 +3,7 @@ BGP neighbor is 2001:559::1, remote AS 7922, external link | |||
Description: Comcast IPv6 Transit | |||
Inherits from template PEER-SESSION-AS7922 for session parameters | |||
BGP version 4, remote router ID 68.86.1.1 | |||
BGP state = Established, up for 12w2d | |||
BGP state = Established, up for 12:22:20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All understood, I've reverted the the file to the previous version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @petrmarciniak
@@ -34,7 +34,8 @@ BGP using 39527928 total bytes of memory | |||
BGP activity 3436532/2710503 prefixes, 19215241/17575537 paths, scan interval 60 secs | |||
|
|||
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd | |||
2001:559::1 4 7922 6944479 138054 116434201 0 0 12w2d 45646 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually prefer to avoid changing this file when fixing a bug (as probably you won't see both outputs, i.e., in both 12:22:20
and 12w2d
format at the same time -- but never say never Cisco is Cisco lol), and have a separate test case; that means, another set of files under a directory, e.g., test/ios/mocked_data/test_get_bgp_neighbors_detail/<some test case name>/
.
But this change is small enough we can leave this pass...
The get_bgp_neighbors_detail function for IOS-XE crashes as it fails to parse the
sh ip bgp all sum
output correctly when:E.g. the following line would fail to be parsed:
As a fix I've updated the corresponding TextFSM templates (as well as the test input and correct result).