image list displays a maximum of 25 images
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| python-openstackclient |
Fix Released
|
High
|
Unassigned | ||
| python-openstackclient (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
1. Set env vars for HP Helion Public Cloud [1]
export OS_TENANT_NAME=xxx
export OS_USERNAME=xxx
export OS_PASSWORD=xxx
export OS_AUTH_URL=https:/
export OS_REGION_
2. List images
$ openstack image list
...
[25 images displayed]
...
If you go to the Images page [2], you see that there are 103 images available.
[1] https:/
[2] https:/
whats the output of # glance image-list?
looks like glanceclient has an option for page size:
https:/
page_size = kwargs.
I wonder how horizon and glance CLI handle this, or HP public cloud for that matter.
horizon has a setting and glanceclient CLI has a page-size option:
glance CLI:
https:/
@utils.
horizon:
https:/
def image_list_
limit = getattr(settings, 'API_RESULT_LIMIT', 1000)
page_size = utils.get_
Also... looks like OSC had this at one point?
@Everett, want to try using `openstack image list --page-size 120` ?
Just tried `openstack image list --page-size 120` and got the same 25 images only result. Note that `openstack help image list` doesn't mention anything about --page-size.
`glance image-list` returns 103 images.
Cool. I wasn't expecting --page-size to show up in the help output, that option is suppressed for some reason.
Looking at this a bit further... apparently this option never worked. Glance is using pagination (and filtering?) so this is getting ugly really fast.
Added a 'limit' option, and that seems to solve things. Don't know if it agrees with dtroyers vision of handling paging going forward thought.
steve:python-
29
steve:python-
33
Tested with >25 images created.
Not sure how to glanceclient is warping this to get everything by default. Also not sure if that's something we want to encourage.
FYI - the limit option does not exist in the current OSC code / release. Just something I'm playing around with in my env.
@Everett, is this using v1 or v2 of the images API?
Looks like HP is using v1 API [1].
$ openstack --debug image list
...
DEBUG: openstackclient
DEBUG: keystoneclient.
Hmmmmm...tried this on Rackspace too expecting the v2 API [2]. It returns the same 25 only images but I get this wackiness.
$ openstack --debug image list
...
DEBUG: openstackclient
DEBUG: keystoneclient.
I'm not too sure what to make of that. https:/
[1] https:/
[2] https:/
Change abandoned by Steve Martinelli (<email address hidden>) on branch: master
Review: https:/
Reason: i'll revisit this after the summit
Correction: The current releases only contains the code for v1 API and not for v2. Is there any reason for that? From a user perspective it is a clear regression over the use of the old glance CLI tool.
This fix should be backported to the Ubuntu packages.
This bug was fixed in the package python-
---------------
python-
* debian/
be listed. (LP: #1443089)
-- Chuck Short <email address hidden> 2016年12月12日 08:33:47 -0500