You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Andrew Gaul <no...@github.com> on 2015/01/04 03:24:53 UTC

[jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

Reference:

http://msdn.microsoft.com/en-us/library/azure/dd179391.aspx
You can merge this Pull Request by running:

  git pull https://github.com/andrewgaul/jclouds azureblob-set-acl

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

  https://github.com/jclouds/jclouds/pull/631

-- Commit Summary --

  * JCLOUDS-660: Implement AzureBlob set ACL

-- File Changes --

    M providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobClient.java (12)
    A providers/azureblob/src/main/java/org/jclouds/azureblob/binders/BindPublicAccessToRequest.java (56)
    M providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientLiveTest.java (23)
    M providers/azureblob/src/test/java/org/jclouds/azureblob/AzureBlobClientTest.java (17)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/631.patch
https://github.com/jclouds/jclouds/pull/631.diff

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

Re: [jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

Posted by Andrew Gaul <no...@github.com>.
> @@ -232,6 +233,22 @@ public void testGetPublicAccessForContainer() throws SecurityException, NoSuchMe
>        assertFallbackClassEquals(method, NullOnContainerNotFound.class);
>     }
>  
> +   public void testSetPublicAccessForContainer() throws SecurityException, NoSuchMethodException, IOException {
> +      Invokable<?, ?> method = method(AzureBlobClient.class, "setPublicAccessForContainer", String.class, PublicAccess.class);
> +      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("container", PublicAccess.CONTAINER));
> +
> +      assertRequestLineEquals(request,
> +               "PUT https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
> +      assertNonPayloadHeadersEqual(request,
> +               "x-ms-blob-public-access: container\n" +
> +               "x-ms-version: 2012-02-12\n");
> +      assertPayloadEquals(request, null, null, false);
> +
> +      assertResponseParserClassEquals(method, request, ParseETagHeader.class);
> +      assertSaxResponseParserClassEquals(method, null);
> +      assertFallbackClassEquals(method, null);
> +   }

Done.

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

Re: [jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

Posted by Ignasi Barrera <no...@github.com>.
Thanks! Just one minor comment. Apart from that lgtm!

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

Re: [jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

Posted by Ignasi Barrera <no...@github.com>.
> @@ -232,6 +233,22 @@ public void testGetPublicAccessForContainer() throws SecurityException, NoSuchMe
>        assertFallbackClassEquals(method, NullOnContainerNotFound.class);
>     }
>  
> +   public void testSetPublicAccessForContainer() throws SecurityException, NoSuchMethodException, IOException {
> +      Invokable<?, ?> method = method(AzureBlobClient.class, "setPublicAccessForContainer", String.class, PublicAccess.class);
> +      GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("container", PublicAccess.CONTAINER));
> +
> +      assertRequestLineEquals(request,
> +               "PUT https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
> +      assertNonPayloadHeadersEqual(request,
> +               "x-ms-blob-public-access: container\n" +
> +               "x-ms-version: 2012-02-12\n");
> +      assertPayloadEquals(request, null, null, false);
> +
> +      assertResponseParserClassEquals(method, request, ParseETagHeader.class);
> +      assertSaxResponseParserClassEquals(method, null);
> +      assertFallbackClassEquals(method, null);
> +   }

Add a test to verify the PRIVATE case does not add the header?

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

Re: [jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

Posted by Andrew Gaul <no...@github.com>.
Pushed to master as 35d6313e63a3f6b6b40dda262b54369dbaab437f.

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

Re: [jclouds] JCLOUDS-660: Implement AzureBlob set ACL (#631)

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

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/631#event-216790476