deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: Blob metadata updates
Date Thu, 18 Aug 2011 07:37:46 GMT
Hi Chris,

basically, what David said... more inline

On 17/08/11 21:00, David Lutterkort wrote:
> On Wed, 2011-08-17 at 11:20 -0400, Chris Lalancette wrote:
>> All,
>>      It seems to me that blob metadata updates aren't quite working in 0.4.0.
>> It looks like BlobHelper::extract_blob_metadata_hash is being fed request.env
>> directly, but I don't think that is right.  If your client does a POST with
>> form parameters like:
>>
>> HTTP-X-Deltacloud-Blobmeta-name=myname
>>
>> Then those parameters are actually available in
>> request.env['rack.request.query_hash'].  The attached patch makes that change

This is true - however, our API defines that the way to *update blob 
metadata* is using request headers 
(http://incubator.apache.org/deltacloud/api#h4_3_11). I don't think we 
ever supported blob header updates using form fields. I mean, I don't 
think this has anything to do with 0.4 as this wouldn't have worked for 
the blob update operation even in 0.3. I checked through the git history 
though this stuff is a little old so i may have missed something and be 
wrong on this.

>> and seems to fix it in my tests.  However, it is also possible that my
>> libdeltacloud client is doing the wrong thing here.  Thoughts?
>>
>
> It's a little confusing since we also take the metadata params as
> request params - but that is only there to support the HTML UI, and only
> done for POST.

As David says, I suspect the confusion stems from the fact that for the 
blob *create* operation using POST, blob metadata is defined using form 
fields (http://incubator.apache.org/deltacloud/api#h4_3_8). The POST 
operation for creating blobs is a special case, and is only there to 
support the HTML interface. More on this in response to your other email 
("Blob Creation")

marios

>
> The intended way to pass metadata is by using request headers, i.e. for
> each key/value pair have a header
>
>          X-Deltacloud-Blobmeta-KEY: VALUE
>
> That's also how they are reported back (as response headers)
>
> David
>
>
>
>


Mime
View raw message