v2 image-list: '--limit' doesn't work

Bug #1429088 reported by Stuart McLaren
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Louis Taylor

Bug Description

This should return 20 images:

$ ./tools/with_venv.sh glance --os-image-api-version 2 image-list --page-size 1 --limit 20
venv develop-inst-nodeps: /mnt/ubuntu/git/python-glanceclient
venv runtests: PYTHONHASHSEED='0'
venv runtests: commands[0] | glance --os-image-api-version 2 image-list --page-size 1 --limit 20
+--------------------------------------+------+
| ID | Name |
+--------------------------------------+------+
| a3a360d7-a417-4046-bca3-cf154731c297 | img1 |
+--------------------------------------+------+
______________________________________________________________________ summary ______________________________________________________________________
  venv: commands succeeded
  congratulations :)

This should return 4 images:

$ ./tools/with_venv.sh glance --os-image-api-version 2 image-list --limit 4
venv develop-inst-nodeps: /mnt/ubuntu/git/python-glanceclient
venv runtests: PYTHONHASHSEED='0'
venv runtests: commands[0] | glance --os-image-api-version 2 image-list --limit 4
+--------------------------------------+-------+
| ID | Name |
+--------------------------------------+-------+
| a3a360d7-a417-4046-bca3-cf154731c297 | img1 |
| 6b27ecf8-4d07-40f4-8e76-4404eca7cb53 | img20 |
| 1afe973a-af19-4e2d-8ba3-c059c9c0ba7e | img19 |
| b833e241-f262-467d-8f19-ca543ce0a11f | img18 |
| 9758dbe0-a098-47df-8349-52a4a4e2d6a9 | img17 |
| 76a534f6-479b-4c52-be14-e9dad8fc54d3 | img16 |
| 771d6733-dc50-491a-8948-d69ab3a6bd15 | img15 |
| 4f0e7407-2715-4fd2-8d2f-712778591962 | img14 |
| 778a708f-fa84-4c7d-ae57-4c05a1528bb9 | img13 |
| 26e75225-9acb-4c2d-b835-00f20311c337 | img12 |
| 8b00ab43-3118-4b20-9e55-29ee3d295a1c | img11 |
| 23ede7d9-7bd4-4016-815f-bf7f7abc0950 | img10 |
| 29a751f8-0be1-42b4-8131-7362444abb0a | img9 |
| c384b6de-6fd4-4aaf-ba9b-7d7bbd756438 | img8 |
| ebffc5eb-cf38-4892-8361-37574d0ad11e | img7 |
| 8abba99b-ef4c-4296-9051-cd4137499fca | img6 |
| e85cf8e6-bd41-4c49-8cd2-8c3be6a81f7c | img5 |
| 3dc0b7a9-0d97-4531-8575-efe0aeb1fcf2 | img4 |
| 032375ff-fba8-4d27-bee6-70575d41e338 | img3 |
| 79e1ad9d-2bef-4cf5-a948-d13e9045e442 | img2 |
| 7ebd95be-e533-4a67-a88a-dbbf6205f080 | img1 |
| cc36587e-4411-4034-ad6a-89a3a9711e65 | img20 |
| 28585f83-bf81-472d-85a5-076a1962ddcb | img19 |
| 2db21fdf-1c38-4287-9e08-cfa57e5f801a | img18 |
| c32a52c4-27a2-4667-9ad2-237bd7587619 | img17 |
| b232d053-748d-4afa-b064-1148cdab00e1 | img16 |
| 056fa80d-515f-45e3-b345-91ffe36815b3 | img15 |
| cbc6d19c-a5db-4147-8e79-6b57138f2ab4 | img14 |
| 6df9f070-efb1-4ae6-96dd-f7448ea2a14a | img13 |
| 537c888a-d305-41ed-b45a-f8c64520f3c6 | img12 |
| e104e17e-3760-40f7-b911-38811946f9cf | img11 |
| a5570e3a-25ea-48e2-9cee-72e62b28b704 | img10 |
| 13db962b-7d4a-442e-a279-6a34678e2af7 | img9 |
| 4af2efe8-cb77-4b2d-99c3-523170eaf53f | img8 |
| 3610d67f-4518-4ba1-a633-d730269d0866 | img7 |
| 1ec042bd-ee1c-4022-b35f-84679dc9c5fe | img6 |
| 18f76fda-027f-42d5-a291-43f2de1e45d6 | img5 |
| 7c9827a6-f9fc-4489-8df3-952e1ed2c775 | img4 |
| 2691d881-3889-46c6-95bf-c4ea42f195f5 | img3 |
| 37ef0087-d502-4229-a28f-840c12b1ecbb | img2 |
| 17de7b47-fa4e-4325-a191-d76dfd660250 | img1 |
| 6cbf4c74-132a-410f-824e-6cbb14e491a4 | img20 |
| 34593dfe-4c57-49be-979e-a5c65601de80 | img19 |
| 78303db5-a3b7-436e-84f1-227ac53ea969 | img18 |
| fa435b31-8c93-4456-9f2a-f96189cfd9bb | img17 |
| 95ac8a8b-eb1e-4684-a668-565fbd809154 | img16 |
| 8530d16c-e9fd-4273-b3d1-c8808344c278 | img15 |
| b7f4be95-1ad0-4662-8b55-bd1ac49ad124 | img14 |
| eed6cfa1-3f71-44b1-b947-1a7c8b4a76c2 | img13 |
| e972f6b2-e963-4f30-afce-fd2fcf5fc1ff | img12 |
| 43ba53a0-0c79-4167-b2d0-f9e8c4223eec | img11 |
| 0c24c7a4-239e-468d-a6e2-c597137540f5 | img10 |
| 41840529-556f-4354-8b47-b5b57efea41b | img9 |
| 6375486f-abb3-42ee-9fa7-cdd832777a2e | img8 |
| f0e99a2b-a981-4f6b-8ff2-f02a5a11b039 | img7 |
| 8b9b81e3-ce2a-4bdc-b129-59caf27b913a | img6 |
| ce89ec9b-8554-46c5-8672-53806f347883 | img5 |
| bfa2aa55-7a86-4126-8227-8e2ec7a1ac36 | img4 |
| f8ef9a4c-84cb-461d-9577-4d1d77f3a278 | img3 |
| 51b01a02-35fa-49db-a8f1-e89c142a49b4 | img2 |
| 74530abf-54a2-45f3-ac94-23c37e9e215d | img1 |
+--------------------------------------+-------+
______________________________________________________________________ summary ______________________________________________________________________
  venv: commands succeeded
  congratulations :)

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

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

commit a9a692b351ea87841045fbe6c1c86d70e1af5fea
Author: Louis Taylor <email address hidden>
Date: Fri Mar 6 13:18:11 2015 +0000

    v2: read limit for list from --limit in shell

    Previously this was read from the --page-size argument, which lead to
    incorrect behaviour.

    Change-Id: I08ecda95eca0ff524e28a1d5371ce6c73dfc548e
    Closes-Bug: #1429088

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
milestone: none → v0.17.0
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.