v2 API should not return images or access records in containers

Bug #1031185 reported by Brian Waldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Brian Waldon
Glance Client
Fix Released
Critical
Brian Waldon

Bug Description

Rather than return an image object in a superfluous dictionary like {'image': {<USEFUL STUFF>}} , just return the {<USEFUL STUFF>}! This also makes sense so our JSON schemas can apply to the whole document, not just a sub-document of a document for which we have no schema. This applies to access records as well.

This does not apply to resources that are containers - {'images': [...], 'next': ...} is actually super useful.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

python-glanceclient needs to be updated ASAP to match the change in response format

Changed in python-glanceclient:
status: New → In Progress
assignee: nobody → Brian Waldon (bcwaldon)
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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/10587

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/10586
Committed: http://github.com/openstack/glance/commit/eeedad333398c6c869214ddccfbb36719ca56429
Submitter: Jenkins
Branch: master

commit eeedad333398c6c869214ddccfbb36719ca56429
Author: Brian Waldon <email address hidden>
Date: Mon Jul 30 20:13:16 2012 -0700

    Simplify image and access_record responses

    This removes the container around individual image and access_record
    entities in GET /images/<ID> and GET /images/<ID>/access/<TENANT>.
    Response bodies used to look like '{"image": {...}}', while now they
    look like '{...}'.

    Fix bug 1031185

    Change-Id: I1eacee2d877f5dde3612b3d4006d4caf489f49e1

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

Reviewed: https://review.openstack.org/10587
Committed: http://github.com/openstack/python-glanceclient/commit/c24ea3f84876ca4087710fc15a94c1a82ec1d5f0
Submitter: Jenkins
Branch: master

commit c24ea3f84876ca4087710fc15a94c1a82ec1d5f0
Author: Brian Waldon <email address hidden>
Date: Mon Jul 30 20:50:27 2012 -0700

    Stop looking for v2 image in container

    The v2 API no longer returns images in JSON containers like
    '{"image": {...}}', so stop trying to decode the responses
    as if it does.

    Fix bug 1031185

    Change-Id: I5209fe76445d4195b12944146a0ef190883f363f

Changed in python-glanceclient:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Revision history for this message
Brian Waldon (bcwaldon) wrote :

python-glanceclient patch in v0.3.0

Changed in python-glanceclient:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-3 → 2012.2
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.