Found a work around, I just had to set some random string to
jclouds.regions property, and after that the location constraint was being
sent to the object store. Only thing is I am seeing a warning that

"WARNING: region xyz not in [abc] " but the object server is getting the
location parameter.


I am not sure if there is a better way.

On Tue, Jan 19, 2016 at 5:12 PM, Ranjith R <[email protected]> wrote:

> Hi,
>      I am trying out jclouds against a cloud object store which is
> supporting the S3 APIs.  for the putBucket request, the object store
> accepts the LocationConstraint and creates the bucket based on value
> provided by the user.  However, I see that jclouds is not sending the
> LocationConstraint parameter when the request is against this S3 type
> provider.
>
> For eg, when I try to create a bucket in amazon s3 after setting a
> location, I see this in the logs.
>
> 00:18:21.884 [pc01-00] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService -
> Sending request 188071658: PUT
> https://testprovisioningcode.s3.amazonaws.com/ HTTP/1.1
> 00:18:21.884 [pc01-00] DEBUG jclouds.wire - >>
> "<CreateBucketConfiguration><LocationConstraint>us-west-1</LocationConstraint></CreateBucketConfiguration>"
> 00:18:21.885 [pc01-00] DEBUG jclouds.headers - >> PUT
> https://testprovisioningcode.s3.amazonaws.com/ HTTP/1.1
> 00:18:21.885 [pc01-00] DEBUG jclouds.headers - >> Host:
> testprovisioningcode.s3.amazonaws.com
>
> When I send the same request against my S3 emulated object store, this is
> the request.
>
> 00:22:10.916 [pc01-00] DEBUG o.j.h.a.ApacheHCHttpCommandExecutorService -
> Sending request 1737215775: PUT http://x.x.98.187/testprovisioningcode
> HTTP/1.1
> 00:22:10.917 [pc01-00] DEBUG jclouds.headers - >> PUT
> http://9.114.98.187/testprovisioningcode HTTP/1.1
> 00:22:10.917 [pc01-00] DEBUG jclouds.headers - >> Date: Tue, 19 Jan 2016
> 05:22:10 GMT
> 00:22:10.917 [pc01-00] DEBUG jclouds.headers - >> Authorization: AWS
> iQU39EfkxHBHGhZWFINP:fhoDEfo8UB5EgSyf1KKeMtkrWXw=
>
>
> Any pointers on how can I specify a location when the provider type is s3
> and not aws-s3?
>
> Thanks,
> Ranjith
>
>
>

Reply via email to