OpenStack Image Registry and Delivery Service (Glance)

file-like objects returned from GET and used to POST do not have the same interface

Reported by Jay Pipes on 2011-04-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Wishlist
Eoghan Glynn

Bug Description

From Vishy's question:

"I'm a bit lost as to why the client returns an iterator for get but then expects a file like object for add. It would be great if both of these worked the same way. Then it would be possible to do something like:

from glance import client

remote = client.Client('glance.provider.com')
local = client.Client('localhost')

metadata, image = remote.get_image(42)
local.add_image(metadata, image)"

There's no reason other than it's never been noticed until now :)

Jay Pipes (jaypipes) wrote :

This should be addressed in early Essex, along with the 2.0 Images API changes...

Changed in glance:
milestone: none → essex-1
Jay Pipes (jaypipes) on 2011-11-03
Changed in glance:
milestone: essex-1 → essex-2
Jay Pipes (jaypipes) on 2011-12-06
Changed in glance:
milestone: essex-2 → essex-3
Eoghan Glynn (eglynn) wrote :

Also maintaining tolerance for the image_data types currently supported by add_image (i.e. file-like or string) would be useful.

Changed in glance:
assignee: nobody → Eoghan Glynn (eglynn)

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

Changed in glance:
status: Triaged → In Progress
Jay Pipes (jaypipes) on 2012-01-23
tags: added: consistency low-hanging-fruit

Reviewed: https://review.openstack.org/3307
Committed: http://github.com/openstack/glance/commit/7094e8926c623a59e5d5fa2b5a9cca13738a79fe
Submitter: Jenkins
Branch: master

commit 7094e8926c623a59e5d5fa2b5a9cca13738a79fe
Author: Eoghan Glynn <email address hidden>
Date: Mon Jan 23 13:22:53 2012 +0000

    Client.add_image() accepts image data as iterable.

    Fixes bug 773562

    Allow the image data to be passed to glance.Client.add_add_image()
    via an iterator, in addition to the previously accepted images types
    (file-like or string).

    Change-Id: I1f90b9875f5610d478a5ed123fbf431501f1c2b6

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-01-25
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers