Implement pagination for bgp neighbor introspect output

Bug #1479427 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Released
Wishlist
Nischal Sheth
Trunk
Fix Committed
Wishlist
Nischal Sheth

Bug Description

Implement pagination for bgp neighbor introspect output.
Should return a fixed number of entries per page.
Should not examine an unlimited number of neighbors in one
Task run when a filter is specified.

Nischal Sheth (nsheth)
description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/12965
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/12966
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/12966
Committed: http://github.org/Juniper/contrail-controller/commit/25c1f02f74491995d5ec8a50eb44c86f313215a9
Submitter: Zuul
Branch: master

commit 25c1f02f74491995d5ec8a50eb44c86f313215a9
Author: Nischal Sheth <email address hidden>
Date: Tue Jul 28 17:38:45 2015 -0700

Support pagination of output for bgp neighbor introspect

Limit the maximum number of entries displayed on a single page for
both regular and summary requests. A next_batch link is generated
if there are more entries to be displayed.

Also limit maximum number of entries examined in one invocation of
the callback routine. This comes into play when there is a search
string specified and many entries don't match it. A partial page
is saved in user-allocated data and the next invocation of callback
appends to it. This is repeated till there's a full page or there
are no more entries in the table.

Following changes are implemented:

- Move code from bgp_sandesh.cc to bgp_show_neighbor.cc
- Use class template BgpShowHandler to avoid code duplication
- Implement iteration limit to avoid hogging CPU from introspect
- Add unit tests to cover combinations of page and iteration limits
- Remove older unit tests which were limited in scope
- Sprinkle const as required

Change-Id: I4ef1848fb315ebbf4738e21f313cf60c255b7912
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/12965
Committed: http://github.org/Juniper/contrail-controller/commit/2992f17d9ee5cdbb50ef76965b9019b37aeb4554
Submitter: Zuul
Branch: R2.20

commit 2992f17d9ee5cdbb50ef76965b9019b37aeb4554
Author: Nischal Sheth <email address hidden>
Date: Tue Jul 28 17:38:45 2015 -0700

Support pagination of output for bgp neighbor introspect

Limit the maximum number of entries displayed on a single page for
both regular and summary requests. A next_batch link is generated
if there are more entries to be displayed.

Also limit maximum number of entries examined in one invocation of
the callback routine. This comes into play when there is a search
string specified and many entries don't match it. A partial page
is saved in user-allocated data and the next invocation of callback
appends to it. This is repeated till there's a full page or there
are no more entries in the table.

Following changes are implemented:

- Move code from bgp_sandesh.cc to bgp_show_neighbor.cc
- Use class template BgpShowHandler to avoid code duplication
- Implement iteration limit to avoid hogging CPU from introspect
- Add unit tests to cover combinations of page and iteration limits
- Remove older unit tests which were limited in scope
- Sprinkle const as required

Change-Id: I4ef1848fb315ebbf4738e21f313cf60c255b7912
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/13066
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/13067
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13067
Committed: http://github.org/Juniper/contrail-controller/commit/9bb6adfa5e4328306f0e5f51806ca74db602616a
Submitter: Zuul
Branch: master

commit 9bb6adfa5e4328306f0e5f51806ca74db602616a
Author: Nischal Sheth <email address hidden>
Date: Fri Aug 14 09:36:28 2015 -0700

Make bgp_show_neighbor_test more robust

Change-Id: I2d4c00473eff275f185e312f7cc78f8eeb5690f7
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13066
Committed: http://github.org/Juniper/contrail-controller/commit/fa7d745d1c330708bb6b2ee88133a04a550d14d3
Submitter: Zuul
Branch: R2.20

commit fa7d745d1c330708bb6b2ee88133a04a550d14d3
Author: Nischal Sheth <email address hidden>
Date: Fri Aug 14 09:36:28 2015 -0700

Make bgp_show_neighbor_test more robust

Change-Id: I2d4c00473eff275f185e312f7cc78f8eeb5690f7
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/13091
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/13092
Submitter: Nischal Sheth (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13092
Committed: http://github.org/Juniper/contrail-controller/commit/316336a32889fe391a939d9291cc5da275665a15
Submitter: Zuul
Branch: master

commit 316336a32889fe391a939d9291cc5da275665a15
Author: Nischal Sheth <email address hidden>
Date: Sat Aug 15 22:03:22 2015 -0700

Make bgp_show_neighbor_test more robust

Ensure all neighbors are marked deleted before running introspect.
This is required because the introspect command is run only once.

Change-Id: I17d21a4da969d51a2c0ba36afd6b97aa8fc67f2e
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13091
Committed: http://github.org/Juniper/contrail-controller/commit/1b79ac298e7d5b2340f31f7a769b6c9f364748d8
Submitter: Zuul
Branch: R2.20

commit 1b79ac298e7d5b2340f31f7a769b6c9f364748d8
Author: Nischal Sheth <email address hidden>
Date: Sat Aug 15 22:03:22 2015 -0700

Make bgp_show_neighbor_test more robust

Ensure all neighbors are marked deleted before running introspect.
This is required because the introspect command is run only once.

Change-Id: I17d21a4da969d51a2c0ba36afd6b97aa8fc67f2e
Closes-Bug: 1479427

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22-dev

Review in progress for https://review.opencontrail.org/13927
Submitter: Vinay Vithal Mahuli (<email address hidden>)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.