Implement pagination for multicast introspect output

Bug #1479428 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 multicast introspect output.
Should return a fixed number of entries per page.
Should not examine an unlimited number of multicast tables 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] master

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

commit fcc0f5cb8954baa032fdeb16ddde88cb1220f492
Author: Nischal Sheth <email address hidden>
Date: Thu Aug 13 15:39:51 2015 -0700

Support pagination of output for multicast manager introspect

Limit the maximum number of entries displayed on a single page.
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_multicast_manager.cc
- Use class template BgpShowHandler to avoid code duplication
- Implement iteration limit to avoid hogging CPU from introspect
- Reuse type parameterized tests to also cover multicast manager
- Remove older unit test which was limited in scope
- Sprinkle const as required

Change-Id: I190cfbaaa58ac52ce63fb6bd916c040ab100e742
Closes-Bug: 1479428

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

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

commit f4d00e1dfd4f318bbc027213e12afe366a338f0b
Author: Nischal Sheth <email address hidden>
Date: Thu Aug 13 15:39:51 2015 -0700

Support pagination of output for multicast manager introspect

Limit the maximum number of entries displayed on a single page.
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_multicast_manager.cc
- Use class template BgpShowHandler to avoid code duplication
- Implement iteration limit to avoid hogging CPU from introspect
- Reuse type parameterized tests to also cover multicast manager
- Remove older unit test which was limited in scope
- Sprinkle const as required

Change-Id: I190cfbaaa58ac52ce63fb6bd916c040ab100e742
Closes-Bug: 1479428

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.