Implement pagination for route target group introspect output

Bug #1485726 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 route target group introspect output.
Should return a fixed number of entries per page.
Should not examine an unlimited number of route targets groups
in one Task run when a filter is specified.

Should cover the following commands:

ShowRtGroupReq
ShowRtGroupSummaryResp
ShowRtGroupPeerResp

Nischal Sheth (nsheth)
summary: - Implement pagination for route target introspect output
+ Implement pagination for route target group introspect output
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/13188
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/13189
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/13188
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/13189
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/13188
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/13189
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/13188
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/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

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

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

commit a33deea234cd2a7fd087ba5b191b5531b69c1a0b
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

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.