> -         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 blob2 = region.blobBuilder(blobName).forSigning()
> +               .payload(input).contentLength(input.size())
> +               .contentMD5(input.hash(Hashing.md5()).asBytes())
> +               .contentType(MediaType.OCTET_STREAM.toString()).build();
> +         HttpRequest putRequest;
> +         BlobRequestSigner signer = ctx.signerInRegion(regionId);
> +         putRequest = signer.signPutBlob(containerName, blob2, 600);
> +
> +         HttpResponse response = client.invoke(putRequest);

Done.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/94/files#r12565175

Reply via email to