glance client expects image ID only, should use base resource

Bug #1475001 reported by David Moreau Simard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Confirmed
Wishlist
Unassigned
python-openstackclient
Fix Released
Medium
David Moreau Simard

Bug Description

openstack image save works fine with API v1 - we pass the whole image object as expected by glanceclient:
https://github.com/openstack/python-openstackclient/blob/1af89f757c1edf44067de964cb6ca8dffbb1969e/openstackclient/image/v1/image.py#L450
to
https://github.com/openstack/python-glanceclient/blob/16ab18b64d44a3eb1767308b4b25ac7a6a6c1aee/glanceclient/v1/images.py#L134

However, this has changed with API v2 - glanceclient only expects to be receiving the image id, not the whole object:
https://github.com/openstack/python-openstackclient/blob/1af89f757c1edf44067de964cb6ca8dffbb1969e/openstackclient/image/v2/image.py#L222
to
https://github.com/openstack/python-glanceclient/blob/16ab18b64d44a3eb1767308b4b25ac7a6a6c1aee/glanceclient/v2/images.py#L185

Hence, Openstackclient ends up trying to find an image_id to download whom's ID is the whole object and returns a 404, appropriately.

Changed in python-openstackclient:
assignee: nobody → David Moreau Simard (dmsimard)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Revision history for this message
Steve Martinelli (stevemar) wrote : Re: image save with --os-image-api-version 2 returns a 404

we can fix this for openstackclient, but glanceclient should be using base resources so its consumers can use it with either objects or ids

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

Reviewed: https://review.openstack.org/202247
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=c830d96e4f3af5a8ce7e903fae02e01409ffdfdd
Submitter: Jenkins
Branch: master

commit c830d96e4f3af5a8ce7e903fae02e01409ffdfdd
Author: David Moreau Simard <email address hidden>
Date: Wed Jul 15 15:40:51 2015 -0400

    Fix image save with API v2

    Glanceclient v2 no longer expects the whole image
    object, just the image id.

    Change-Id: I8f34acfa50ca2d50eb7c9eb1dd5114c4621ad158
    Closes-bug: #1475001

Changed in python-openstackclient:
status: In Progress → Fix Committed
summary: - image save with --os-image-api-version 2 returns a 404
+ glance client expects image ID only, should use base resource
Changed in python-openstackclient:
importance: Undecided → Medium
Changed in python-openstackclient:
milestone: none → 1.6.0
status: Fix Committed → Fix Released
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

Looks like desirable feature but not an issue.

Changed in python-glanceclient:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Kairat Kushaev (kkushaev)
importance: Medium → Wishlist
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/275248

Changed in python-glanceclient:
status: Confirmed → In Progress
Ian Cordasco (icordasc)
Changed in python-glanceclient:
status: In Progress → Confirmed
assignee: Kairat Kushaev (kkushaev) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by Kairat Kushaev (<email address hidden>) on branch: master
Review: https://review.openstack.org/275248

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.