Implement pagination for routing instance introspect output

Bug #1475803 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 routing instance introspect output.
Should return a fixed number of entries per page.
Should not examine an unlimited number of instances in one
Task run when a filter is specified.

Nischal Sheth (nsheth)
tags: added: quench
description: updated
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/12568
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/12569
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/12568
Committed: http://github.org/Juniper/contrail-controller/commit/0f98cc72fb6c3e0d15be13e8a3a7369593a706d6
Submitter: Zuul
Branch: R2.20

commit 0f98cc72fb6c3e0d15be13e8a3a7369593a706d6
Author: Nischal Sheth <email address hidden>
Date: Thu Jul 16 13:31:32 2015 -0700

Support pagination of output for routing instance 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_routing_instance.cc
- Use templates to reuse code for regular and summary requests
- 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: I9ef440fc569828be5dd34bd9ce699c95f9bf5aac
Closes-Bug: 1475803

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

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

commit ef6aafd774939085dfcf9a31bcb40e58c16d401f
Author: Nischal Sheth <email address hidden>
Date: Thu Jul 16 13:31:32 2015 -0700

Support pagination of output for routing instance 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_routing_instance.cc
- Use templates to reuse code for regular and summary requests
- 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: I9ef440fc569828be5dd34bd9ce699c95f9bf5aac
Closes-Bug: 1475803

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

Review in progress for https://review.opencontrail.org/12616
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/12617
Submitter: Nischal Sheth (<email address hidden>)

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

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

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

Review in progress for https://review.opencontrail.org/12686
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/12667
Committed: http://github.org/Juniper/contrail-controller/commit/b369057bf9444c9d5187ae5f1789432b486d2673
Submitter: Zuul
Branch: master

commit b369057bf9444c9d5187ae5f1789432b486d2673
Author: Nischal Sheth <email address hidden>
Date: Tue Jul 28 09:20:55 2015 -0700

Reduce duplicate code in implementation of routing instance introspect

Use BgpShowHandler template to eliminate a bunch of duplicate code.

Change-Id: I6d77c2b5cabf0a1e586419b379d84d8cbe13e64d
Closes-Bug: 1475803

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

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

commit 66181ff80f69f39698d96b1d6e2dd0fd3d63ef84
Author: Nischal Sheth <email address hidden>
Date: Tue Jul 28 09:20:55 2015 -0700

Reduce duplicate code in implementation of routing instance introspect

Use BgpShowHandler template to eliminate a bunch of duplicate code.

Change-Id: I6d77c2b5cabf0a1e586419b379d84d8cbe13e64d
Closes-Bug: 1475803

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.