v2 python-glanceclient doesn't support the marker attribute

Bug #1465373 reported by Brad Pokorny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Brad Pokorny

Bug Description

Feel free to comment on whether this is a bug or should be handled with this existing blueprint:
https://blueprints.launchpad.net/python-glanceclient/+spec/glance-client-v2

The v2 glance client implementation ignores the marker attribute if it's passed to the client as part of the kwargs. The v1 client supports it, and it makes it easier to use the client to have it.

Example code to reproduce:

from glanceclient import Client

glance = Client('2', endpoint='https://example.net',
                'TOKEN')

kwargs = {}
kwargs['sort_dir'] = 'desc'
kwargs['sort_key'] = 'created_at'

images_iter = glance.images.list(page_size=1000, limit=2, **kwargs)
images = list(images_iter)

print getattr(images[0], 'id')
print getattr(images[1], 'id')

kwargs['marker'] = getattr(images[1], 'id')

images_iter = glance.images.list(page_size=1000, limit=2, **kwargs)
images = list(images_iter)

print getattr(images[0], 'id')
print getattr(images[1], 'id')

Printed Output:

311811ea-b699-4968-813b-fa6a38367585
a600f0e1-0d48-4e9c-b520-beeec9523483
311811ea-b699-4968-813b-fa6a38367585
a600f0e1-0d48-4e9c-b520-beeec9523483

Specifying the marker, this should print 4 different ID's.

A workaround for this is to specify the maker directly in the endpoint, but that makes working with the client more complicated.

Brad Pokorny (bpokorny)
Changed in python-glanceclient:
assignee: nobody → Brad Pokorny (bpokorny)
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/191961

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