Comment 2 for bug 1289124

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/78856
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5cee4f41078ff692a37bb4c553f8faa68c782253
Submitter: Jenkins
Branch: master

commit 5cee4f41078ff692a37bb4c553f8faa68c782253
Author: Steven Kaufer <email address hidden>
Date: Fri Mar 7 04:54:50 2014 +0000

    get volumes API does not handle limit=0

    This bug fixes a regression from bug 1288429, where the "next"
    link is added when the number of volumes returned is the
    maximum limit (even if the "limit" param is not specified).

    The regression is hit when a "limit" of 0 is specified; in this
    case the logic to create the "next" link is still executed and an
    exception is thrown. The fix is to add back in the "if" check that
    implictly checks if the max_items is non-0.

    Test code was also created to verify that a limit of 0 is handled
    correctly.

    Change-Id: I92f9afb9b0e2c627d2c77f67fa026b731903384f
    Closes-bug: 1289124