Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Jeremy Daggett
Closed #94. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#event-157977966

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Jeremy Daggett
Pushed to master de8348d --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-53605683

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
+metadata.getContentType()); +putRequestBuilder.addHeader(HttpHeaders.CONTENT_LENGTH, + String.valueOf(input.size())); +putRequestBuilder.payload(input); +putRequest = putRequestBuilder.build(); +Payload

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
+ HttpResponse response; + try { +HttpRequest putRequest; +putRequest = signer.signPutBlob(containerName, blob2, 600); +MutableContentMetadata metadata = blob2.getMetadata() + .getContentMetadata(); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
+fail(Failed signed put test: + e); + } + + // test signed get + try { +HttpRequest getRequest = signer.signGetBlob(containerName, + blobName); +assertNotNull(getRequest, regionId= + regionId + , container= +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
+putRequest = signer.signPutBlob(containerName, blob2, 600); +MutableContentMetadata metadata = blob2.getMetadata() + .getContentMetadata(); +HttpRequest.Builder? putRequestBuilder = putRequest.toBuilder() +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
@@ -74,7 +92,8 @@ public void testListBlobs() throws InterruptedException, ExecutionException { } @Test - public void testSignBlob() throws InterruptedException, ExecutionException { + public void testSign() throws InterruptedException, ExecutionException, Can just throw

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
@@ -83,13 +102,65 @@ public void testSignBlob() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
@@ -83,13 +102,65 @@ public void testSignBlob() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Jeremy Daggett
+putRequest = signer.signPutBlob(containerName, blob2, 600); +MutableContentMetadata metadata = blob2.getMetadata() + .getContentMetadata(); +HttpRequest.Builder? putRequestBuilder = putRequest.toBuilder() +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-27 Thread Andrew Gaul
+ .contentType(MediaType.OCTET_STREAM.toString()).build(); + BlobRequestSigner signer = ctx.getSigner(regionId); + HttpResponse response; + try { +HttpRequest putRequest; +putRequest = signer.signPutBlob(containerName, blob2,

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Jeremy Daggett
Closed #94. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#event-157475729

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Jeremy Daggett
Reopened #94. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#event-157475754

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Jeremy Daggett
@shrinandj Just closed and reopened to kick the build again. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-53468326

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread BuildHive
[jclouds » jclouds-labs-openstack #1611](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1611/) FAILURE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Jeremy Daggett
} - String blobName = Iterables.getLast(blobs).getName(); - HttpRequest request = ctx.getSigner(regionId).signGetBlob(containerName, blobName); It looks like the `getSigner(regionId)` was used here, but removed! --- Reply to this email directly or view it on

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #377](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/377/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #380](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/380/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread BuildHive
[jclouds » jclouds-labs-openstack #1614](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1614/) FAILURE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread BuildHive
[jclouds » jclouds-labs-openstack #1616](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1616/) 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:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #381](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/381/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-53488674

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Shri Javadekar
Not sure what to make of the failures above. The checkstyle violations are not in my commit. Apparently they are in the neutron-api that I have not touched. Any ideas? --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-26 Thread Jeremy Daggett
@@ -83,13 +101,65 @@ public void testSignBlob() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-25 Thread BuildHive
[jclouds » jclouds-labs-openstack #1605](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1605/) FAILURE Looks like there's a problem with this pull request [(what's this?)](https://www.cloudbees.com/what-is-buildhive) --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-25 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #373](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/373/) FAILURE Looks like there's a problem with this pull request --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-13 Thread Jeremy Daggett
@shrinandj Can you please rebase and I will get this merged today. Thx! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-52071175

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-08-13 Thread Andrew Phillips
[minor] Is our wrapping really that narrow? The code in the PR seems pretty bunched up to me? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-52075656

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-07-26 Thread Jeremy Daggett
@andrewgaul Is there anything you would like to address given @demobox 's last comment? I don't see any comments regarding a pre-signed PUT... Anyway, I just cherry-picked the commit and the live test ran locally with no failures. --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-06-06 Thread Shri Javadekar
+ + // test signed get + try { +HttpRequest getRequest = signer.signGetBlob(containerName, + blobName); +assertNotNull(getRequest, regionId= + regionId + , container= + + containerName + , blob= + blobName); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-06-06 Thread Shri Javadekar
+ .addHeader(HttpHeaders.CONTENT_TYPE, +metadata.getContentType()); +putRequestBuilder.addHeader(HttpHeaders.CONTENT_LENGTH, + String.valueOf(input.size())); +putRequestBuilder.payload(input); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-06-06 Thread Shri Javadekar
+HttpRequest getRequest = signer.signGetBlob(containerName, + blobName); +assertNotNull(getRequest, regionId= + regionId + , container= + + containerName + , blob= + blobName); +response = client.invoke(getRequest); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-06-06 Thread BuildHive
[jclouds » jclouds-labs-openstack #1244](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1244/) 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:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-06-06 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #280](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/280/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-45310368

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-25 Thread Andrew Phillips
@@ -83,13 +94,29 @@ public void trySign() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-25 Thread Andrew Phillips
+HttpRequest getRequest = signer.signGetBlob(containerName, + blobName); +assertNotNull(getRequest, regionId= + regionId + , container= + + containerName + , blob= + blobName); +response = client.invoke(getRequest); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-25 Thread Andrew Phillips
+ .addHeader(HttpHeaders.CONTENT_TYPE, +metadata.getContentType()); +putRequestBuilder.addHeader(HttpHeaders.CONTENT_LENGTH, + String.valueOf(input.size())); +putRequestBuilder.payload(input); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-25 Thread Andrew Phillips
+ + // test signed get + try { +HttpRequest getRequest = signer.signGetBlob(containerName, + blobName); +assertNotNull(getRequest, regionId= + regionId + , container= + + containerName + , blob= + blobName); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-25 Thread Andrew Phillips
Anything else on this PR? If not, I can merge it. @jdaggett We would need @andrewgaul to confirm this, but I don't think the test as currently written reflects the use case he was talking about in his comments about the pre-signed PUT. --- Reply to this email directly or view it on GitHub:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-22 Thread Jeremy Daggett
@shrinandj Thanks! LGTM +1 @andrewgaul @demobox Anything else on this PR? If not, I can merge it. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-43945790

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-15 Thread Andrew Gaul
@@ -83,13 +94,29 @@ public void trySign() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-15 Thread Shri Javadekar
@@ -83,13 +94,29 @@ public void trySign() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Andrew Gaul
Thanks for backfilling the tests @shrinandj ! --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-42516177

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
+ final ByteSource input = ByteSource.wrap(new byte[1]); + final HttpClient client = ctx.utils().http(); + + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
+ + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() + .payload(input).contentLength(input.size()) + .contentMD5(input.hash(Hashing.md5()).asBytes()) +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
HttpRequest request = ctx.signerInRegion(regionId).signGetBlob(containerName, blobName); assertNotNull(request, regionId= + regionId + , container= + containerName + , blob= + blobName); + response = client.invoke(request); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
+ + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() + .payload(input).contentLength(input.size()) + .contentMD5(input.hash(Hashing.md5()).asBytes()) +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
@@ -83,13 +94,29 @@ public void trySign() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread Shri Javadekar
- String blobName = Iterables.getLast(blobs).getName(); + + final ByteSource input = ByteSource.wrap(new byte[1]); + final HttpClient client = ctx.utils().http(); + + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread BuildHive
[jclouds » jclouds-labs-openstack #1113](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1113/) 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:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-12 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #225](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/225/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-42913424

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-11 Thread Andrew Phillips
@@ -83,13 +94,29 @@ public void trySign() throws InterruptedException, ExecutionException { continue; } String containerName = Iterables.getLast(containers).getName(); - PageSet? extends StorageMetadata blobs = region.list(containerName); -

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread BuildHive
[jclouds » jclouds-labs-openstack #1083](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-openstack/1083/) 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:

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread CloudBees pull request builder plugin
[jclouds-labs-openstack-pull-requests #221](https://jclouds.ci.cloudbees.com/job/jclouds-labs-openstack-pull-requests/221/) SUCCESS This pull request looks good --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-42272714

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
Thanks for this, @shrinandj! Would it make sense to split this into trySignPut and trySignGet, since the code seems to be a little different? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-42277768

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Shri Javadekar
Even if we separate it, a signedGet will require a blob to present in the container, right? This will require putting a blob and then trying to read it using a signed url. Instead this commit uses a single test to do a signed put first followed by a signed get. --- Reply to this email directly

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
Instead this commit uses a single test to do a signed put first followed by a signed get. Fair point. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds-labs-openstack/pull/94#issuecomment-42333230

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
- String blobName = Iterables.getLast(blobs).getName(); + + final ByteSource input = ByteSource.wrap(new byte[1]); + final HttpClient client = ctx.utils().http(); + + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
+ final ByteSource input = ByteSource.wrap(new byte[1]); + final HttpClient client = ctx.utils().http(); + + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
HttpRequest request = ctx.signerInRegion(regionId).signGetBlob(containerName, blobName); assertNotNull(request, regionId= + regionId + , container= + containerName + , blob= + blobName); + response = client.invoke(request); +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
+ + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() + .payload(input).contentLength(input.size()) + .contentMD5(input.hash(Hashing.md5()).asBytes()) +

Re: [jclouds-labs-openstack] Add live test for signPutBlob. (#94)

2014-05-06 Thread Andrew Phillips
+ + // test signed put + String blobName = test- + UUID.randomUUID(); + Blob blob2 = region.blobBuilder(blobName).forSigning() + .payload(input).contentLength(input.size()) + .contentMD5(input.hash(Hashing.md5()).asBytes()) +