-
Notifications
You must be signed in to change notification settings - Fork 558
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
Merged
mirceaulinic
merged 9 commits into
napalm-automation:develop
from
petrmarciniak:fix-ios-ip-bgp-all-sum
Apr 29, 2020
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a44ead8
match even if BGP neighbor information is spread across two lines (oc…
e7f9e9d
test case input adjusted
6eb435b
match also hh:mm:ss established time, etc.
8afac77
adjust test case for hh:mm:ss established time
224f070
match also hh:mm:ss established time, etc.
5c4787b
Merge branch 'develop' into fix-ios-ip-bgp-all-sum
petrmarciniak cf371cb
reverted to original test case + added new test neighbor
7ea684d
Merge branch 'fix-ios-ip-bgp-all-sum' of https://github.com/petrmarci…
002de61
Merge branch 'develop' into fix-ios-ip-bgp-all-sum
mirceaulinic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 128 additions & 0 deletions
128
..._data/test_get_bgp_neighbors_detail/normal/show_ip_bgp_ipv6_unicast_neigh_2001_559__3.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
|
||
BGP neighbor is 2001:559::3, 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 | ||
Last read 00:00:01, last write 00:00:35, hold time is 180, keepalive interval is 60 seconds | ||
Neighbor sessions: | ||
1 active, is not multisession capable (disabled) | ||
Neighbor capabilities: | ||
Route refresh: advertised and received(new) | ||
Four-octets ASN Capability: advertised and received | ||
Address family IPv6 Unicast: advertised and received | ||
Graceful Restart Capability: advertised and received | ||
Remote Restart timer is 120 seconds | ||
Address families advertised by peer: | ||
IPv6 Unicast (was preserved | ||
Enhanced Refresh Capability: advertised | ||
Multisession Capability: | ||
Stateful switchover support enabled: NO for session 1 | ||
Message statistics: | ||
InQ depth is 0 | ||
OutQ depth is 0 | ||
|
||
Sent Rcvd | ||
Opens: 1 1 | ||
Notifications: 0 0 | ||
Updates: 2480 6974616 | ||
Keepalives: 136309 69 | ||
Route Refresh: 0 0 | ||
Total: 138790 6974686 | ||
Do log neighbor state changes (via global configuration) | ||
Default minimum time between advertisement runs is 30 seconds | ||
|
||
For address family: IPv6 Unicast | ||
Session: 2001:559::3 | ||
BGP table version 117061141, neighbor version 117061129/117061141 | ||
Output queue size : 0 | ||
Index 1, Advertise bit 0 | ||
1 update-group member | ||
Inherits from template PEER-POLICY-COMCAST-IPv6 | ||
My AS number is allowed for 10 number of times | ||
NEXT_HOP is always this router for eBGP paths | ||
Inbound path policy configured | ||
Outbound path policy configured | ||
Incoming update prefix filter list is BGP-BOGONS-IPv6-IN | ||
Outgoing update prefix filter list is BGP-TRANSIT-IPv6-OUT | ||
Route map for incoming advertisements is BGP-COMCAST-IPv6-IN | ||
Route map for outgoing advertisements is BGP-TRANSIT-IPv6-OUT | ||
Slow-peer detection is disabled | ||
Slow-peer split-update-group dynamic is disabled | ||
Sent Rcvd | ||
Prefix activity: ---- ---- | ||
Prefixes Current: 2 45717 (Consumes 6948984 bytes) | ||
Prefixes Total: 4958 8328487 | ||
Implicit Withdraw: 4956 7470835 | ||
Explicit Withdraw: 0 811935 | ||
Used as bestpath: n/a 45715 | ||
Used as multipath: n/a 0 | ||
Used as secondary: n/a 0 | ||
|
||
Outbound Inbound | ||
Local Policy Denied Prefixes: -------- ------- | ||
Other Policies: 112415977 n/a | ||
Total: 112415977 0 | ||
Number of NLRIs in the update sent: max 2, min 0 | ||
Last detected as dynamic slow peer: never | ||
Dynamic slow peer recovered: never | ||
Refresh Epoch: 1 | ||
Last Sent Refresh Start-of-rib: never | ||
Last Sent Refresh End-of-rib: never | ||
Last Received Refresh Start-of-rib: never | ||
Last Received Refresh End-of-rib: never | ||
Sent Rcvd | ||
Refresh activity: ---- ---- | ||
Refresh Start-of-RIB 0 0 | ||
Refresh End-of-RIB 0 0 | ||
|
||
Address tracking is enabled, the RIB does have a route to 2001:559::3 | ||
Connections established 1; dropped 0 | ||
Last reset never | ||
External BGP neighbor configured for connected checks (single-hop no-disable-connected-check) | ||
Interface associated: GigabitEthernet0/0/4 (peering address in same link) | ||
Transport(tcp) path-mtu-discovery is enabled | ||
Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 seconds | ||
SSO is disabled | ||
Connection state is ESTAB, I/O status: 1, unread input bytes: 0 | ||
Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 1 | ||
Local host: 2001:559::2, Local port: 21958 | ||
Foreign host: 2001:559::3, Foreign port: 179 | ||
Connection tableid (VRF): 0 | ||
Maximum output segment queue size: 50 | ||
|
||
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) | ||
|
||
Event Timers (current time is 0x1BED85262): | ||
Timer Starts Wakeups Next | ||
Retrans 138767 0 0x0 | ||
TimeWait 0 0 0x0 | ||
AckHold 2425311 1956394 0x0 | ||
SendWnd 0 0 0x0 | ||
KeepAlive 0 0 0x0 | ||
GiveUp 0 0 0x0 | ||
PmtuAger 7470660 7470659 0x1BED853C2 | ||
DeadWait 0 0 0x0 | ||
Linger 0 0 0x0 | ||
ProcessQ 0 0 0x0 | ||
|
||
iss: 3500006922 snduna: 3502837353 sndnxt: 3502837353 | ||
irs: 2409182929 rcvnxt: 3188305548 | ||
|
||
sndwnd: 65022 scale: 0 maxrcvwnd: 16384 | ||
rcvwnd: 16164 scale: 0 delrcvwnd: 220 | ||
|
||
SRTT: 1000 ms, RTTO: 1003 ms, RTV: 3 ms, KRTT: 0 ms | ||
minRTT: 1 ms, maxRTT: 1000 ms, ACK hold: 200 ms | ||
uptime: -1 ms, Sent idletime: 1099 ms, Receive idletime: 1299 ms | ||
Status Flags: active open | ||
Option Flags: nagle, path mtu capable | ||
IP Precedence value : 6 | ||
|
||
Datagrams (max data segment is 1440 bytes): | ||
Rcvd: 2561857 (out of order: 0), with data: 2431970, total data bytes: 779122618 | ||
Sent: 2570215 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0), with data: 2570215, total data bytes: 105639038 | ||
|
||
Packets received in fast path: 0, fast processed: 0, slow path: 0 | ||
fast lock acquisition failures: 0, slow path: 0 | ||
TCP Semaphore 0x7F2543BB2160 FREE |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
and12w2d
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!