glanceclient image-list has no support for limit

Bug #1415035 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Flavio Percoco

Bug Description

python-glanceclient's support for v2 has a built-in implementation for pagination. This is a nice and useful feature to have. Unfortunately, it does not have support for *limiting* the number of images that should be retrieved from the server. I believe that, in addition to page-size, there should be a limit CLI parameter (and keyword) supported in glanceclient.

Changed in python-glanceclient:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/150416

Changed in python-glanceclient:
status: New → In Progress
Louis Taylor (kragniz)
Changed in python-glanceclient:
status: In Progress → Triaged
Louis Taylor (kragniz)
Changed in python-glanceclient:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/150416
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=93c9bc1fe0ae3f5c95395e7a883fdffcc79d7151
Submitter: Jenkins
Branch: master

commit 93c9bc1fe0ae3f5c95395e7a883fdffcc79d7151
Author: Flavio Percoco <email address hidden>
Date: Tue Jan 27 14:20:27 2015 +0100

    Add a `--limit` parameter to list operations

    In v2, we use the link header during paginations to know when there are
    more images available in the server that could be returned in the same
    request. This way, it's possible to iterate over the generator returned
    by list and consume the images in the server.

    However, it's currently not possible to tell glanceclient the exact
    number of images we want, which basically means that it'll *always* go
    through the whole list of images in the server unless the limit is
    implemented by the consumer.

    DocImpact
    Change-Id: I9f65a40d4eafda6320e5c7d94d03fcd1bbc93e33
    Closes-bug: #1415035

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz)
Changed in python-glanceclient:
status: Fix Committed → Fix Released
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.