You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2013/07/17 18:14:31 UTC

[jclouds-karaf] Add --signed-url option to blob read and write (#20)

This will allow future automation to script jclouds-cli and visualize
conformance of various optional features and semantic quirks.
You can merge this Pull Request by running:

  git pull https://github.com/maginatics/jclouds-karaf signed-url

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-karaf/pull/20

-- Commit Summary --

  * Add --signed-url option to blob read and write

-- File Changes --

    M commands/src/main/java/org/jclouds/karaf/commands/blobstore/BlobReadCommand.java (5)
    M commands/src/main/java/org/jclouds/karaf/commands/blobstore/BlobStoreCommandBase.java (33)
    M commands/src/main/java/org/jclouds/karaf/commands/blobstore/BlobWriteCommand.java (6)

-- Patch Links --

https://github.com/jclouds/jclouds-karaf/pull/20.patch
https://github.com/jclouds/jclouds-karaf/pull/20.diff


Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by Andrew Gaul <no...@github.com>.
Committed to master and 1.6.x.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20#issuecomment-21226420

Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-karaf-pull-requests #5](https://jclouds.ci.cloudbees.com/job/jclouds-karaf-pull-requests/5/) UNSTABLE
Looks like there's a problem with this pull request

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20#issuecomment-21128102

Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by Andrew Gaul <no...@github.com>.
Closed #20.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20

Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by BuildHive <no...@github.com>.
[jclouds ยป jclouds-karaf #201](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-karaf/201/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20#issuecomment-21128122

Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by Andrew Phillips <no...@github.com>.
Could itself looks good to me, by the way.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20#issuecomment-21271360

Re: [jclouds-karaf] Add --signed-url option to blob read and write (#20)

Posted by Andrew Phillips <no...@github.com>.
> @@ -149,7 +165,18 @@ public void write(BlobStore blobStore, String bucket, String blobName, Blob blob
>           }
>        }
>  
> -      blobStore.putBlob(bucket, blob, options);
> +      if (signedRequest) {
> +         BlobStoreContext context = blobStore.getContext();
> +         HttpRequest request = context.getSigner().signPutBlob(bucket, blob);
> +         HttpClient httpClient = context.utils().http();
> +         HttpResponse response = httpClient.invoke(request);
> +         int statusCode = response.getStatusCode();
> +         if (statusCode != 200 && statusCode != 201) {
> +            throw new IOException(response.getStatusLine());
> +         }

Curious why we're having to essentially circumvent the "normal" `blobStore.put` logic and do our own request management here. Would it make more sense to add `putSignedBlob` and `getSignedBlob` to BlobStore itself? Then this would also be available outside karaf..?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-karaf/pull/20/files#r5300628