OS API: Limit and marker filters for flavors do not work

Bug #912922 reported by Daryl Walleck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Philip Knouff

Bug Description

In testing, I noticed that applying the limit or marker filters when listing flavors appears to have no effect on the response. See the following two examples:

curl -i -H "X-Auth-Token: 8ad370f6-fe8b-441b-af89-0d08f7e3a898" http://localhost:8774/v1.1/dwalleck-project/flavors?limit=2

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2177
Date: Fri, 06 Jan 2012 21:04:35 GMT
Connection: close

{"flavors": [{"id": "1", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/1", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/1", "rel": "bookmark"}], "name": "256 slice"}, {"id": "4", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/4", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/4", "rel": "bookmark"}], "name": "2GB slice"}, {"id": "5", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/5", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/5", "rel": "bookmark"}], "name": "4GB slice"}, {"id": "3", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/3", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/3", "rel": "bookmark"}], "name": "1GB slice"}, {"id": "6", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/6", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/6", "rel": "bookmark"}], "name": "8GB slice"}, {"id": "8", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/8", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/8", "rel": "bookmark"}], "name": "30GB slice"}, {"id": "2", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/2", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/2", "rel": "bookmark"}], "name": "512 slice"}, {"id": "7", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/7", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/7", "rel": "bookmark"}], "name": "15.5GB slice"}]}

(received: all flavors. Expected: two flavors returned with a "next" link to the next set of results)

curl -i -H "X-Auth-Token: 8ad370f6-fe8b-441b-af89-0d08f7e3a898" http://localhost:8774/v1.1/dwalleck-project/flavors?marker=1
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2177
Date: Fri, 06 Jan 2012 21:07:56 GMT
Connection: close

{"flavors": [{"id": "1", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/1", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/1", "rel": "bookmark"}], "name": "256 slice"}, {"id": "4", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/4", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/4", "rel": "bookmark"}], "name": "2GB slice"}, {"id": "5", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/5", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/5", "rel": "bookmark"}], "name": "4GB slice"}, {"id": "3", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/3", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/3", "rel": "bookmark"}], "name": "1GB slice"}, {"id": "6", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/6", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/6", "rel": "bookmark"}], "name": "8GB slice"}, {"id": "8", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/8", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/8", "rel": "bookmark"}], "name": "30GB slice"}, {"id": "2", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/2", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/2", "rel": "bookmark"}], "name": "512 slice"}, {"id": "7", "links": [{"href": "http://localhost:8774/v1.1/dwalleck-project/flavors/7", "rel": "self"}, {"href": "http://localhost:8774/dwalleck-project/flavors/7", "rel": "bookmark"}], "name": "15.5GB slice"}]}

(received: all flavors. Expected: all flavors except the flavor with id 1)

Brian Waldon (bcwaldon)
Changed in nova:
importance: Undecided → Low
status: New → Triaged
Changed in nova:
assignee: nobody → Philip Knouff (philip-knouff)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3316
Committed: http://github.com/openstack/nova/commit/48f4e140ec929d8abec6145088df9db758ecda9a
Submitter: Jenkins
Branch: master

commit 48f4e140ec929d8abec6145088df9db758ecda9a
Author: Philip Knouff <email address hidden>
Date: Mon Jan 23 15:03:00 2012 -0500

    Fixed limiting for flavors

    Fixes bug #912922
    Change-Id: Iea5a070b83e35fe19480e1bd4ee96f2a67a7c0d3

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.