mirror of https://github.com/apache/jclouds.git
JCLOUDS-867: Use Azure API version 2013-08-15
This changes the format of EnumerationResults.
This commit is contained in:
parent
77d846c5ff
commit
8617c75b7e
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<test.azureblob.endpoint>https://${jclouds.identity}.blob.core.windows.net</test.azureblob.endpoint>
|
<test.azureblob.endpoint>https://${jclouds.identity}.blob.core.windows.net</test.azureblob.endpoint>
|
||||||
<test.azureblob.api-version>2012-02-12</test.azureblob.api-version>
|
<test.azureblob.api-version>2013-08-15</test.azureblob.api-version>
|
||||||
<test.azureblob.build-version />
|
<test.azureblob.build-version />
|
||||||
<test.azureblob.identity>${test.azure.identity}</test.azureblob.identity>
|
<test.azureblob.identity>${test.azure.identity}</test.azureblob.identity>
|
||||||
<test.azureblob.credential>${test.azure.credential}</test.azureblob.credential>
|
<test.azureblob.credential>${test.azure.credential}</test.azureblob.credential>
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class AzureBlobApiMetadata extends BaseHttpApiMetadata {
|
||||||
.name("Microsoft Azure Blob Service API")
|
.name("Microsoft Azure Blob Service API")
|
||||||
.identityName("Account Name")
|
.identityName("Account Name")
|
||||||
.credentialName("Access Key")
|
.credentialName("Access Key")
|
||||||
.version("2012-02-12")
|
.version("2013-08-15")
|
||||||
.defaultEndpoint("https://${jclouds.identity}.blob.core.windows.net")
|
.defaultEndpoint("https://${jclouds.identity}.blob.core.windows.net")
|
||||||
.documentation(URI.create("http://msdn.microsoft.com/en-us/library/dd135733.aspx"))
|
.documentation(URI.create("http://msdn.microsoft.com/en-us/library/dd135733.aspx"))
|
||||||
.defaultProperties(AzureBlobApiMetadata.defaultProperties())
|
.defaultProperties(AzureBlobApiMetadata.defaultProperties())
|
||||||
|
|
|
@ -16,7 +16,10 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.azureblob.xml;
|
package org.jclouds.azureblob.xml;
|
||||||
|
|
||||||
|
import static com.google.common.base.Throwables.propagate;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
@ -50,7 +53,7 @@ public class AccountNameEnumerationResultsHandler extends
|
||||||
private String marker;
|
private String marker;
|
||||||
private int maxResults;
|
private int maxResults;
|
||||||
private String nextMarker;
|
private String nextMarker;
|
||||||
private URI currentUrl;
|
private String currentName;
|
||||||
private Date currentLastModified;
|
private Date currentLastModified;
|
||||||
private String currentETag;
|
private String currentETag;
|
||||||
private boolean inMetadata;
|
private boolean inMetadata;
|
||||||
|
@ -75,7 +78,7 @@ public class AccountNameEnumerationResultsHandler extends
|
||||||
} else if (qName.equals("Metadata")) {
|
} else if (qName.equals("Metadata")) {
|
||||||
inMetadata = true;
|
inMetadata = true;
|
||||||
} else if (qName.equals("EnumerationResults")) {
|
} else if (qName.equals("EnumerationResults")) {
|
||||||
accountUrl = URI.create(attributes.getValue("AccountName").toString().trim());
|
accountUrl = URI.create(attributes.getValue("ServiceEndpoint").trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,14 +104,20 @@ public class AccountNameEnumerationResultsHandler extends
|
||||||
nextMarker = currentText.toString().trim();
|
nextMarker = currentText.toString().trim();
|
||||||
nextMarker = (nextMarker.equals("")) ? null : nextMarker;
|
nextMarker = (nextMarker.equals("")) ? null : nextMarker;
|
||||||
} else if (qName.equals("Container")) {
|
} else if (qName.equals("Container")) {
|
||||||
|
URI currentUrl;
|
||||||
|
try {
|
||||||
|
currentUrl = new URI(accountUrl.getScheme(), accountUrl.getHost(), "/" + currentName, null);
|
||||||
|
} catch (URISyntaxException use) {
|
||||||
|
throw propagate(use);
|
||||||
|
}
|
||||||
containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified,
|
containerMetadata.add(new ContainerPropertiesImpl(currentUrl, currentLastModified,
|
||||||
currentETag, currentMetadata));
|
currentETag, currentMetadata));
|
||||||
currentUrl = null;
|
currentName = null;
|
||||||
currentLastModified = null;
|
currentLastModified = null;
|
||||||
currentETag = null;
|
currentETag = null;
|
||||||
currentMetadata = Maps.newHashMap();
|
currentMetadata = Maps.newHashMap();
|
||||||
} else if (qName.equals("Url")) {
|
} else if (qName.equals("Name")) {
|
||||||
currentUrl = URI.create(currentText.toString().trim());
|
currentName = currentText.toString().trim();
|
||||||
} else if (qName.equals("Last-Modified")) {
|
} else if (qName.equals("Last-Modified")) {
|
||||||
currentLastModified = dateParser.rfc822DateParse(currentText.toString().trim());
|
currentLastModified = dateParser.rfc822DateParse(currentText.toString().trim());
|
||||||
} else if (qName.equals("Etag")) {
|
} else if (qName.equals("Etag")) {
|
||||||
|
|
|
@ -54,7 +54,6 @@ public class ContainerNameEnumerationResultsHandler extends ParseSax.HandlerWith
|
||||||
private String marker;
|
private String marker;
|
||||||
private int maxResults;
|
private int maxResults;
|
||||||
private String nextMarker;
|
private String nextMarker;
|
||||||
private URI currentUrl;
|
|
||||||
private URI containerUrl;
|
private URI containerUrl;
|
||||||
private Date currentLastModified;
|
private Date currentLastModified;
|
||||||
private String currentETag;
|
private String currentETag;
|
||||||
|
@ -103,7 +102,7 @@ public class ContainerNameEnumerationResultsHandler extends ParseSax.HandlerWith
|
||||||
inBlob = true;
|
inBlob = true;
|
||||||
inMetadata = true;
|
inMetadata = true;
|
||||||
} else if (qName.equals("EnumerationResults")) {
|
} else if (qName.equals("EnumerationResults")) {
|
||||||
containerUrl = URI.create(attributes.getValue("ContainerName").toString().trim());
|
containerUrl = URI.create(attributes.getValue("ServiceEndpoint").trim() + attributes.getValue("ContainerName").trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +130,7 @@ public class ContainerNameEnumerationResultsHandler extends ParseSax.HandlerWith
|
||||||
} else if (qName.equals("LeaseStatus")) {
|
} else if (qName.equals("LeaseStatus")) {
|
||||||
currentLeaseStatus = LeaseStatus.fromValue(currentText.toString().trim());
|
currentLeaseStatus = LeaseStatus.fromValue(currentText.toString().trim());
|
||||||
} else if (qName.equals("Blob")) {
|
} else if (qName.equals("Blob")) {
|
||||||
|
URI currentUrl = uriBuilder(containerUrl + "/" + currentName).build();
|
||||||
BlobProperties md = new BlobPropertiesImpl(currentBlobType, currentName, containerUrl.getPath().replace("/",
|
BlobProperties md = new BlobPropertiesImpl(currentBlobType, currentName, containerUrl.getPath().replace("/",
|
||||||
""), currentUrl, currentLastModified, currentETag, currentSize, currentContentType,
|
""), currentUrl, currentLastModified, currentETag, currentSize, currentContentType,
|
||||||
currentContentMD5, currentContentEncoding, currentContentLanguage, currentExpires,
|
currentContentMD5, currentContentEncoding, currentContentLanguage, currentExpires,
|
||||||
|
@ -138,7 +138,6 @@ public class ContainerNameEnumerationResultsHandler extends ParseSax.HandlerWith
|
||||||
blobMetadata.add(md);
|
blobMetadata.add(md);
|
||||||
currentBlobType = null;
|
currentBlobType = null;
|
||||||
currentName = null;
|
currentName = null;
|
||||||
currentUrl = null;
|
|
||||||
currentLastModified = null;
|
currentLastModified = null;
|
||||||
currentETag = null;
|
currentETag = null;
|
||||||
currentSize = -1;
|
currentSize = -1;
|
||||||
|
@ -149,8 +148,6 @@ public class ContainerNameEnumerationResultsHandler extends ParseSax.HandlerWith
|
||||||
currentLeaseStatus = null;
|
currentLeaseStatus = null;
|
||||||
currentExpires = null;
|
currentExpires = null;
|
||||||
currentMetadata = Maps.newHashMap();
|
currentMetadata = Maps.newHashMap();
|
||||||
} else if (qName.equals("Url")) {
|
|
||||||
currentUrl = uriBuilder(currentText.toString().trim()).build();
|
|
||||||
} else if (qName.equals("Last-Modified")) {
|
} else if (qName.equals("Last-Modified")) {
|
||||||
currentLastModified = dateParser.rfc822DateParse(currentText.toString().trim());
|
currentLastModified = dateParser.rfc822DateParse(currentText.toString().trim());
|
||||||
} else if (qName.equals("Etag")) {
|
} else if (qName.equals("Etag")) {
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/?comp=list HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/?comp=list HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||||
|
@ -77,7 +77,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"GET https://identity.blob.core.windows.net/?comp=list&maxresults=1&marker=marker&prefix=prefix HTTP/1.1");
|
"GET https://identity.blob.core.windows.net/?comp=list&maxresults=1&marker=marker&prefix=prefix HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||||
|
@ -92,7 +92,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"PUT https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
"PUT https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
||||||
|
@ -106,7 +106,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"DELETE https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
"DELETE https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
||||||
|
@ -125,7 +125,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
assertNonPayloadHeadersEqual(request,
|
assertNonPayloadHeadersEqual(request,
|
||||||
"x-ms-blob-public-access: blob\n" +
|
"x-ms-blob-public-access: blob\n" +
|
||||||
"x-ms-meta-foo: bar\n" +
|
"x-ms-meta-foo: bar\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
||||||
|
@ -139,7 +139,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
||||||
|
|
||||||
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/$root?restype=container HTTP/1.1");
|
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/$root?restype=container HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
||||||
|
@ -152,7 +152,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
||||||
|
|
||||||
assertRequestLineEquals(request, "DELETE https://identity.blob.core.windows.net/$root?restype=container HTTP/1.1");
|
assertRequestLineEquals(request, "DELETE https://identity.blob.core.windows.net/$root?restype=container HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
||||||
|
@ -169,7 +169,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
assertNonPayloadHeadersEqual(request,
|
assertNonPayloadHeadersEqual(request,
|
||||||
"x-ms-blob-public-access: blob\n" +
|
"x-ms-blob-public-access: blob\n" +
|
||||||
"x-ms-meta-foo: bar\n" +
|
"x-ms-meta-foo: bar\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
assertResponseParserClassEquals(method, request, ReturnTrueIf2xx.class);
|
||||||
|
@ -183,7 +183,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"GET https://identity.blob.core.windows.net/container?restype=container&comp=list HTTP/1.1");
|
"GET https://identity.blob.core.windows.net/container?restype=container&comp=list HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||||
|
@ -197,7 +197,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"GET https://identity.blob.core.windows.net/$root?restype=container&comp=list HTTP/1.1");
|
"GET https://identity.blob.core.windows.net/$root?restype=container&comp=list HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseSax.class);
|
assertResponseParserClassEquals(method, request, ParseSax.class);
|
||||||
|
@ -211,7 +211,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"HEAD https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
"HEAD https://identity.blob.core.windows.net/container?restype=container HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseContainerPropertiesFromHeaders.class);
|
assertResponseParserClassEquals(method, request, ParseContainerPropertiesFromHeaders.class);
|
||||||
|
@ -225,7 +225,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
|
|
||||||
assertRequestLineEquals(request,
|
assertRequestLineEquals(request,
|
||||||
"HEAD https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
|
"HEAD https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParsePublicAccessHeader.class);
|
assertResponseParserClassEquals(method, request, ParsePublicAccessHeader.class);
|
||||||
|
@ -250,7 +250,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
"PUT https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
|
"PUT https://identity.blob.core.windows.net/container?restype=container&comp=acl HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request,
|
assertNonPayloadHeadersEqual(request,
|
||||||
expectedHeader +
|
expectedHeader +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseETagHeader.class);
|
assertResponseParserClassEquals(method, request, ParseETagHeader.class);
|
||||||
|
@ -267,7 +267,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
"PUT https://identity.blob.core.windows.net/container?restype=container&comp=metadata HTTP/1.1");
|
"PUT https://identity.blob.core.windows.net/container?restype=container&comp=metadata HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request,
|
assertNonPayloadHeadersEqual(request,
|
||||||
"x-ms-meta-key: value\n" +
|
"x-ms-meta-key: value\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
||||||
|
@ -280,7 +280,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("container", "blob"));
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of("container", "blob"));
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/container/blob HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/container/blob HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, "x-ms-version: 2012-02-12\n");
|
assertNonPayloadHeadersEqual(request, "x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ParseBlobFromHeadersAndHttpContent.class);
|
assertResponseParserClassEquals(method, request, ParseBlobFromHeadersAndHttpContent.class);
|
||||||
|
@ -296,7 +296,7 @@ public class AzureBlobClientTest extends BaseRestAnnotationProcessingTest<AzureB
|
||||||
"PUT https://identity.blob.core.windows.net/container/blob?comp=metadata HTTP/1.1");
|
"PUT https://identity.blob.core.windows.net/container/blob?comp=metadata HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request,
|
assertNonPayloadHeadersEqual(request,
|
||||||
"x-ms-meta-key: value\n" +
|
"x-ms-meta-key: value\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
assertResponseParserClassEquals(method, request, ReleasePayloadAndReturn.class);
|
||||||
|
|
|
@ -60,9 +60,9 @@ public class AzureBlobRequestSignerTest extends BaseRestAnnotationProcessingTest
|
||||||
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(
|
assertNonPayloadHeadersEqual(
|
||||||
request,
|
request,
|
||||||
"Authorization: SharedKeyLite identity:3rx56J9eAw/0GH2pym1hBmMGQmGju4DkVDcRsBWBtAk=\n" +
|
"Authorization: SharedKeyLite identity:cP8Cm4r3hBbhkD/OUg5t8nRwt3SkLKOIppKIb1lRce4=\n" +
|
||||||
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertEquals(request.getFilters().size(), 0);
|
assertEquals(request.getFilters().size(), 0);
|
||||||
|
@ -75,9 +75,9 @@ public class AzureBlobRequestSignerTest extends BaseRestAnnotationProcessingTest
|
||||||
assertRequestLineEquals(request, "DELETE https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
assertRequestLineEquals(request, "DELETE https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(
|
assertNonPayloadHeadersEqual(
|
||||||
request,
|
request,
|
||||||
"Authorization: SharedKeyLite identity:EN3SE/jB9anhgqIqJMmrTCzZpuqjL41BIZnaE9PEBaU=\n" +
|
"Authorization: SharedKeyLite identity:G6nXsRjrJy8HoVF74MGnuDS358KkBz/GScBROvIZSls=\n" +
|
||||||
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
assertEquals(request.getFilters().size(), 0);
|
assertEquals(request.getFilters().size(), 0);
|
||||||
|
@ -99,11 +99,11 @@ public class AzureBlobRequestSignerTest extends BaseRestAnnotationProcessingTest
|
||||||
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
assertRequestLineEquals(request, "PUT https://identity.blob.core.windows.net/container/name HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(
|
assertNonPayloadHeadersEqual(
|
||||||
request,
|
request,
|
||||||
"Authorization: SharedKeyLite identity:V0gyrdMZzwQrCvxEfq6eBe8PL233yJ91+aNcISEzjfE=\n" +
|
"Authorization: SharedKeyLite identity:S2cKS4t1F8ZlLOxzgOZkO8bLeCP3vEko5CTsyIKlcJE=\n" +
|
||||||
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
"Date: Thu, 05 Jun 2008 16:38:19 GMT\n" +
|
||||||
"Expect: 100-continue\n" +
|
"Expect: 100-continue\n" +
|
||||||
"x-ms-blob-type: BlockBlob\n" +
|
"x-ms-blob-type: BlockBlob\n" +
|
||||||
"x-ms-version: 2012-02-12\n");
|
"x-ms-version: 2013-08-15\n");
|
||||||
assertContentHeadersEqual(request, "text/plain", null, null, null, 2L, hashCode.asBytes(), new Date(1000));
|
assertContentHeadersEqual(request, "text/plain", null, null, null, 2L, hashCode.asBytes(), new Date(1000));
|
||||||
|
|
||||||
assertEquals(request.getFilters().size(), 0);
|
assertEquals(request.getFilters().size(), 0);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<EnumerationResults ContainerName="http://myaccount.blob.core.windows.net/mycontainer">
|
<EnumerationResults
|
||||||
|
ServiceEndpoint="http://myaccount.blob.core.windows.net/"
|
||||||
|
ContainerName="mycontainer">
|
||||||
<MaxResults>4</MaxResults>
|
<MaxResults>4</MaxResults>
|
||||||
<Blobs>
|
<Blobs>
|
||||||
<Blob>
|
<Blob>
|
||||||
|
@ -46,4 +48,4 @@
|
||||||
</Blob>
|
</Blob>
|
||||||
</Blobs>
|
</Blobs>
|
||||||
<NextMarker>newblob2.txt</NextMarker>
|
<NextMarker>newblob2.txt</NextMarker>
|
||||||
</EnumerationResults>
|
</EnumerationResults>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<EnumerationResults
|
<EnumerationResults
|
||||||
ContainerName="https://jclouds.blob.core.windows.net/adriancole-blobstore3">
|
ServiceEndpoint="https://jclouds.blob.core.windows.net/"
|
||||||
|
ContainerName="adriancole-blobstore3">
|
||||||
<MaxResults>1</MaxResults>
|
<MaxResults>1</MaxResults>
|
||||||
<Delimiter>/</Delimiter>
|
<Delimiter>/</Delimiter>
|
||||||
<Blobs>
|
<Blobs>
|
||||||
|
@ -23,4 +24,4 @@
|
||||||
</Blob>
|
</Blob>
|
||||||
</Blobs>
|
</Blobs>
|
||||||
<NextMarker>2!68!MDAwMDA2IWFwcGxlcyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-</NextMarker>
|
<NextMarker>2!68!MDAwMDA2IWFwcGxlcyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-</NextMarker>
|
||||||
</EnumerationResults>
|
</EnumerationResults>
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<EnumerationResults AccountName=" http://myaccount.blob.core.windows.net">
|
<EnumerationResults ServiceEndpoint="http://myaccount.blob.core.windows.net">
|
||||||
<MaxResults>3</MaxResults>
|
<MaxResults>3</MaxResults>
|
||||||
<Containers>
|
<Containers>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/audio</Url>
|
<Name>audio</Name>
|
||||||
<Last-Modified>Wed, 13 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 13 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7C6B1B2</Etag>
|
<Etag>0x8CACB9BD7C6B1B2</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/images</Url>
|
<Name>images</Name>
|
||||||
<Last-Modified>Wed, 14 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 14 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7C1EEEC</Etag>
|
<Etag>0x8CACB9BD7C1EEEC</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/textfiles</Url>
|
<Name>textfiles</Name>
|
||||||
<Last-Modified>Wed, 15 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 15 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7BACAC3</Etag>
|
<Etag>0x8CACB9BD7BACAC3</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<EnumerationResults AccountName=" http://myaccount.blob.core.windows.net">
|
<EnumerationResults ServiceEndpoint="http://myaccount.blob.core.windows.net">
|
||||||
<Prefix>prefix</Prefix>
|
<Prefix>prefix</Prefix>
|
||||||
<Marker>marker</Marker>
|
<Marker>marker</Marker>
|
||||||
<MaxResults>1</MaxResults>
|
<MaxResults>1</MaxResults>
|
||||||
<Containers>
|
<Containers>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/audio</Url>
|
<Name>audio</Name>
|
||||||
<Last-Modified>Wed, 13 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 13 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7C6B1B2</Etag>
|
<Etag>0x8CACB9BD7C6B1B2</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/images</Url>
|
<Name>images</Name>
|
||||||
<Last-Modified>Wed, 14 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 14 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7C1EEEC</Etag>
|
<Etag>0x8CACB9BD7C1EEEC</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
<Container>
|
<Container>
|
||||||
<Url>http://myaccount.blob.core.windows.net/textfiles</Url>
|
<Name>textfiles</Name>
|
||||||
<Last-Modified>Wed, 15 Aug 2008 20:39:39 GMT</Last-Modified>
|
<Last-Modified>Wed, 15 Aug 2008 20:39:39 GMT</Last-Modified>
|
||||||
<Etag>0x8CACB9BD7BACAC3</Etag>
|
<Etag>0x8CACB9BD7BACAC3</Etag>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
Loading…
Reference in New Issue