[LIBCLOUD-612] Customize HTTP vendor prefix for Google Storage #356

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@sfriesel
Contributor

sfriesel commented Sep 9, 2014

https://issues.apache.org/jira/browse/LIBCLOUD-612

Google storage uses/expects custom headers like meta data
and storage class to be prefixed with "x-goog" instead of
"x-amz". This enables use of object tagging in the Google
Storage provider.

@sfriesel

This comment has been minimized.

Show comment
Hide comment
@sfriesel

sfriesel Sep 9, 2014

Contributor

Unittests passed on 2.7 and I successfully uploaded an object with metadata and retrieved them again.

>>> bucket.upload_object("testfile", 'testfiles/foobar', extra={'meta_data':{'mytag': 'myvalue'}})
>>> bucket.get_object('testfiles/foobar').meta_data
{'mytag': 'myvalue'}
Contributor

sfriesel commented Sep 9, 2014

Unittests passed on 2.7 and I successfully uploaded an object with metadata and retrieved them again.

>>> bucket.upload_object("testfile", 'testfiles/foobar', extra={'meta_data':{'mytag': 'myvalue'}})
>>> bucket.get_object('testfiles/foobar').meta_data
{'mytag': 'myvalue'}
Customize HTTP vendor prefix for Google Storage
Google storage uses/expects custom headers like meta data
and storage class to be prefixed with "x-goog" instead of
"x-amz". This enables use of object tagging in the Google
Storage provider.
@sfriesel

This comment has been minimized.

Show comment
Hide comment
@sfriesel

sfriesel Sep 11, 2014

Contributor

@Kami Is anything missing? I could provide the whole debug log of the interaction or maybe some credentials for testing if needed

Contributor

sfriesel commented Sep 11, 2014

@Kami Is anything missing? I could provide the whole debug log of the interaction or maybe some credentials for testing if needed

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Sep 11, 2014

Member

@sfriesel I'll have a look asap.

Member

Kami commented Sep 11, 2014

@sfriesel I'll have a look asap.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Sep 11, 2014

Member

I need to spend some more time testing this myself. The reason for this is that we are using S3 compatible API which requires you to send x-amzn headers.

From your pull request, it seems like you can use x-goog headers even if you use the S3 compatible API, but I need to confirm this myself.

Member

Kami commented Sep 11, 2014

I need to spend some more time testing this myself. The reason for this is that we are using S3 compatible API which requires you to send x-amzn headers.

From your pull request, it seems like you can use x-goog headers even if you use the S3 compatible API, but I need to confirm this myself.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Sep 13, 2014

Member

I just tested your changes and verified it works correctly.

While testing the changes I also noticed meta_data is only returned when retrieving information for a single object (get_object), but not when listing objects (list_container_objects).

I will update documentation and add a note about this known limitation.

Member

Kami commented Sep 13, 2014

I just tested your changes and verified it works correctly.

While testing the changes I also noticed meta_data is only returned when retrieving information for a single object (get_object), but not when listing objects (list_container_objects).

I will update documentation and add a note about this known limitation.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Sep 13, 2014

Member

Merged into trunk. Thanks!

Member

Kami commented Sep 13, 2014

Merged into trunk. Thanks!

@asfgit asfgit closed this in d1b6bb7 Sep 13, 2014

@sfriesel sfriesel deleted the sfriesel:gs_meta_data branch Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment