Comment 17 for bug 1485726

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

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

commit 1daccd58653d7fbea482aacf222f1bafae384800
Author: Nischal Sheth <email address hidden>
Date: Tue Aug 18 08:53:41 2015 -0700

Support pagination of output for rtarget group 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 introspect commands to bgp_peer.sandesh
- Move code from rtarget_group_mgr.cc to bgp_show_rtarget_group.cc
- Use class template BgpShowHandler to avoid code duplication
- Implement iteration limit to avoid hogging CPU from introspect
- Make some typedefs in RTargetGroupMgr private
- Add unit tests to cover combinations of page and iteration limits

Change-Id: I526b983b03024d248f5220d4692b0ef5880dcb9a
Closes-Bug: 1485726