Implement pagination for instance config introspect output

Bug #1478154 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 instance config 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)
Changed in juniperopenstack:
assignee: nobody → Nischal Sheth (nsheth)
importance: Undecided → Medium
milestone: none → r2.30-fcs
tags: added: contrail-control quench
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

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

commit 48541a2aca5963138689ffb908ea4af4bbc03762
Author: Nischal Sheth <email address hidden>
Date: Fri Jul 24 14:26:15 2015 -0700

Support pagination of output for instance config introspect

Limit the maximum number of entries displayed on a single page. A
next_batch link is generated if there are more entries to display.

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:

- Add class template BgpShowHandler to facilitate code reuse
- Move code from bgp_sandesh.cc to bgp_show_config.cc
- Implement iteration limit to avoid hogging CPU from introspect
- Reuse typed tests to also cover instance config
- Fix a few typos in comments for typed tests

Change-Id: I48389edd40fd099539210723690d6cbad317efa8
Closes-Bug: 1478154

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

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

commit d69d6d50c85e88b9ada9557d6cc7840cb20a999f
Author: Nischal Sheth <email address hidden>
Date: Fri Jul 24 14:26:15 2015 -0700

Support pagination of output for instance config introspect

Limit the maximum number of entries displayed on a single page. A
next_batch link is generated if there are more entries to display.

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:

- Add class template BgpShowHandler to facilitate code reuse
- Move code from bgp_sandesh.cc to bgp_show_config.cc
- Implement iteration limit to avoid hogging CPU from introspect
- Reuse typed tests to also cover instance config
- Fix a few typos in comments for typed tests

Change-Id: I48389edd40fd099539210723690d6cbad317efa8
Closes-Bug: 1478154

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.