Zun

Miss 'next' field at list response

Bug #1681537 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Released
Low
feng.shengqin@zte.com.cn

Bug Description

On 'list' operations of containers/images/services, the 'next' field is missing from the response.

Request:

$ TOKEN=$(openstack token issue | awk '/ id /{print $4}')
$ curl -g -i -X GET http://192.168.11.4:9517/v1/containers/?limit=1 -H -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: $TOKEN"

Response:

{
    "containers": [...]
}

Correct response:

{
    "containers": [...],
    "next": "http://192.168.11.4:9517/v1/containers?marker=xxx&....."
}

I think here is the reason why the 'next' field is missing:
* In here https://github.com/openstack/zun/blob/master/zun/api/controllers/base.py#L30 , it read the 'fields' variable to generate response
* The 'next' field is declared in https://github.com/openstack/zun/blob/master/zun/api/controllers/v1/collection.py#L23 , but it was incorrectly override at https://github.com/openstack/zun/blob/master/zun/api/controllers/v1/containers.py#L59

hongbin (hongbin034)
Changed in zun:
importance: Undecided → Low
status: New → Triaged
Changed in zun:
assignee: nobody → feng.shengqin@zte.com.cn (feng-shengqin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

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

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

Reviewed: https://review.openstack.org/455618
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=b47890589e0d8f68f3afa03e338eee91b49ccdf1
Submitter: Jenkins
Branch: master

commit b47890589e0d8f68f3afa03e338eee91b49ccdf1
Author: Feng Shengqin <email address hidden>
Date: Tue Apr 11 17:04:23 2017 +0800

    Miss 'next' field at list response

    Change-Id: Id8510fa66e2407404e82cac73fa9843ba067eee5
    Closes-Bug: #1681537

Changed in zun:
status: In Progress → 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.