Glance API support for “multipart/form-data” contentType

Registered by Yehia Beyh on 2013-03-06

Adding or modifying an image metadata using the Glance API/API is done by specifying the metadata in the HTTP headers that begins with the prefix “x-image-meta-“. Some internet browsers such as Internet Explorer ignore the HTTP headers thus making it impossible to upload an image and set the metadata on the image successfully.

In addition, the _upload function in api/v#/images.py only supports “application/octet-stream” contentType. In order to overcome this limitation, we propose support for “multipart/form-data” contentType. Given a response and mapping of image metadata, injects the Response with a set of HTTP headers for the image metadata. Each main image metadata field is injected as a HTTP header with key 'x-image-meta-<FIELD>' except for the properties field, which is further broken out into a set of 'x-image-meta-property-<KEY>' headers.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Low
Drafter:
None
Direction:
Needs approval
Assignee:
Yehia Beyh
Definition:
New
Series goal:
None
Implementation:
Informational Informational
Milestone target:
None

Related branches

Sprints

Whiteboard

It looks like multipart/form data is just another way to encode/send http headers, so this should be a pretty non-disruptive change
-markwash

Any code available here to review? -markwash

Jeremiah Patterson will be submitting the code on 6/11. -Yehia

Gerrit topic: https://review.openstack.org/#q,topic:bp/support-for-multipart-form-data-contenttype,n,z

Addressed by: https://review.openstack.org/32651
    blueprint support-for-multipart-form-data-contenttype

Looks like maybe folks are okay with just using v2 for this use case--which is fine. I think there is also room to implement support for it in v1 as an optional middleware. But since it seems like interest has dropped off I'm removing this from the list for now. (markwash)

markwash rejected 2014-02-14

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.