mirror of https://github.com/apache/jclouds.git
Issue 440: created org.jclouds.common/azure-common, org.jclouds.provider/azureblob, azurequeue
This commit is contained in:
parent
99b409de66
commit
bf1ee9487b
|
@ -42,7 +42,7 @@ our compute api supports: aws-ec2, gogrid, cloudservers (generic), cloudservers-
|
||||||
to all of these providers
|
to all of these providers
|
||||||
|
|
||||||
our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfiles-uk,
|
our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfiles-uk,
|
||||||
azurestorage, atmos (generic), synaptic-storage,
|
azureblob, atmos (generic), synaptic-storage,
|
||||||
cloudonestorage, s3 (generic), walrus(generic), googlestorage,
|
cloudonestorage, s3 (generic), walrus(generic), googlestorage,
|
||||||
scaleup-storage, ecc-s3, swift (generic), transient (in-mem),
|
scaleup-storage, ecc-s3, swift (generic), transient (in-mem),
|
||||||
filesystem (on-disk)
|
filesystem (on-disk)
|
||||||
|
@ -50,8 +50,8 @@ our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfi
|
||||||
* note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to
|
* note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to
|
||||||
to all of these providers
|
to all of these providers
|
||||||
|
|
||||||
we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, rimuhosting, openstack nova,
|
we also have support for: ibmdev, mezeo, nirvanix, boxdotnet, rimuhosting, openstack nova,
|
||||||
as well a number of features the sandbox
|
azurequeue, simpledb as well a number of features the sandbox
|
||||||
|
|
||||||
|
|
||||||
If you want access to all jclouds components, include the maven dependency org.jclouds/jclouds-all
|
If you want access to all jclouds components, include the maven dependency org.jclouds/jclouds-all
|
||||||
|
|
|
@ -70,8 +70,8 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<artifactId>jclouds-azure</artifactId>
|
<artifactId>azureblob</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
|
||||||
*
|
|
||||||
* ====================================================================
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* ====================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jclouds.azure.storage;
|
|
||||||
|
|
||||||
import org.jclouds.blobstore.util.BlobStoreUtils;
|
|
||||||
import org.jclouds.rest.Providers;
|
|
||||||
import org.testng.annotations.Test;
|
|
||||||
|
|
||||||
import com.google.common.collect.Iterables;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Adrian Cole
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test(groups = "unit")
|
|
||||||
public class ProvidersInPropertiesTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSupportedProviders() {
|
|
||||||
Iterable<String> providers = Providers.getSupportedProviders();
|
|
||||||
assert Iterables.contains(providers, "azurequeue") : providers;
|
|
||||||
assert Iterables.contains(providers, "azureblob") : providers;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSupportedBlobStoreProviders() {
|
|
||||||
Iterable<String> providers = BlobStoreUtils.getSupportedProviders();
|
|
||||||
assert !Iterables.contains(providers, "azurequeue") : providers;
|
|
||||||
assert Iterables.contains(providers, "azureblob") : providers;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,96 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
|
||||||
*
|
|
||||||
* ====================================================================
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* ====================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jclouds.azure.storage.config;
|
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
|
||||||
import static org.testng.Assert.assertFalse;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.config.AzureBlobRestClientModule;
|
|
||||||
import org.jclouds.azure.storage.handlers.AzureStorageClientErrorRetryHandler;
|
|
||||||
import org.jclouds.azure.storage.handlers.ParseAzureStorageErrorFromXmlContent;
|
|
||||||
import org.jclouds.date.internal.SimpleDateFormatDateService;
|
|
||||||
import org.jclouds.http.handlers.DelegatingErrorHandler;
|
|
||||||
import org.jclouds.http.handlers.DelegatingRetryHandler;
|
|
||||||
import org.jclouds.http.handlers.RedirectionRetryHandler;
|
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
|
||||||
import org.jclouds.rest.RestContextFactory;
|
|
||||||
import org.testng.annotations.Test;
|
|
||||||
|
|
||||||
import com.google.common.base.Supplier;
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Adrian Cole
|
|
||||||
*/
|
|
||||||
@Test(groups = "unit")
|
|
||||||
public class AzureStorageRestClientModuleTest {
|
|
||||||
|
|
||||||
Injector createInjector() throws IOException {
|
|
||||||
return new RestContextFactory().createContextBuilder("azurequeue", "foo", "bar",
|
|
||||||
ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Test
|
|
||||||
void testUpdatesOnlyOncePerSecond() throws NoSuchMethodException, InterruptedException {
|
|
||||||
@SuppressWarnings("rawtypes")
|
|
||||||
AzureStorageRestClientModule module = new AzureBlobRestClientModule();
|
|
||||||
|
|
||||||
Supplier<String> map = module.provideTimeStampCache(1, new SimpleDateFormatDateService());
|
|
||||||
String timeStamp = map.get();
|
|
||||||
for (int i = 0; i < 10; i++)
|
|
||||||
map.get();
|
|
||||||
assertEquals(timeStamp, map.get());
|
|
||||||
Thread.sleep(1001);
|
|
||||||
assertFalse(timeStamp.equals(map.get()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testServerErrorHandler() throws IOException {
|
|
||||||
DelegatingErrorHandler handler = createInjector().getInstance(DelegatingErrorHandler.class);
|
|
||||||
assertEquals(handler.getServerErrorHandler().getClass(),
|
|
||||||
ParseAzureStorageErrorFromXmlContent.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testClientErrorHandler() throws IOException {
|
|
||||||
DelegatingErrorHandler handler = createInjector().getInstance(DelegatingErrorHandler.class);
|
|
||||||
assertEquals(handler.getClientErrorHandler().getClass(),
|
|
||||||
ParseAzureStorageErrorFromXmlContent.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testClientRetryHandler() throws IOException {
|
|
||||||
DelegatingRetryHandler handler = createInjector().getInstance(DelegatingRetryHandler.class);
|
|
||||||
assertEquals(handler.getClientErrorRetryHandler().getClass(),
|
|
||||||
AzureStorageClientErrorRetryHandler.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testRedirectionRetryHandler() throws IOException {
|
|
||||||
DelegatingRetryHandler handler = createInjector().getInstance(DelegatingRetryHandler.class);
|
|
||||||
assertEquals(handler.getRedirectionRetryHandler().getClass(), RedirectionRetryHandler.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||||
|
|
||||||
|
====================================================================
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
====================================================================
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.jclouds</groupId>
|
||||||
|
<artifactId>jclouds-project</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../project/pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<groupId>org.jclouds.common</groupId>
|
||||||
|
<artifactId>azure-common</artifactId>
|
||||||
|
<name>jclouds Azure Components Core</name>
|
||||||
|
<description>jclouds Core components to access Azure</description>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jclouds</groupId>
|
||||||
|
<artifactId>jclouds-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jclouds</groupId>
|
||||||
|
<artifactId>jclouds-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>test-jar</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -19,10 +19,8 @@
|
||||||
|
|
||||||
package org.jclouds.azure.storage;
|
package org.jclouds.azure.storage;
|
||||||
|
|
||||||
import static org.jclouds.Constants.PROPERTY_API_VERSION;
|
|
||||||
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
|
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
|
||||||
import static org.jclouds.Constants.PROPERTY_IDENTITY;
|
import static org.jclouds.Constants.PROPERTY_IDENTITY;
|
||||||
import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX;
|
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
@ -31,18 +29,11 @@ import org.jclouds.PropertiesBuilder;
|
||||||
import org.jclouds.util.Strings2;
|
import org.jclouds.util.Strings2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds properties used in AzureBlob Connections
|
* Builds properties used in Azure Connections
|
||||||
*
|
*
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class AzureStoragePropertiesBuilder extends PropertiesBuilder {
|
public class AzureStoragePropertiesBuilder extends PropertiesBuilder {
|
||||||
@Override
|
|
||||||
protected Properties defaultProperties() {
|
|
||||||
Properties properties = super.defaultProperties();
|
|
||||||
properties.setProperty(PROPERTY_USER_METADATA_PREFIX, "x-ms-meta-");
|
|
||||||
properties.setProperty(PROPERTY_API_VERSION, "2009-09-19");
|
|
||||||
return properties;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AzureStoragePropertiesBuilder() {
|
public AzureStoragePropertiesBuilder() {
|
||||||
this(new Properties());
|
this(new Properties());
|
|
@ -22,7 +22,6 @@ package org.jclouds.azure.storage.handlers;
|
||||||
import static org.jclouds.http.HttpUtils.releasePayload;
|
import static org.jclouds.http.HttpUtils.releasePayload;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -31,14 +30,13 @@ import javax.inject.Inject;
|
||||||
import org.jclouds.azure.storage.AzureStorageResponseException;
|
import org.jclouds.azure.storage.AzureStorageResponseException;
|
||||||
import org.jclouds.azure.storage.domain.AzureStorageError;
|
import org.jclouds.azure.storage.domain.AzureStorageError;
|
||||||
import org.jclouds.azure.storage.util.AzureStorageUtils;
|
import org.jclouds.azure.storage.util.AzureStorageUtils;
|
||||||
import org.jclouds.blobstore.ContainerNotFoundException;
|
|
||||||
import org.jclouds.blobstore.KeyNotFoundException;
|
|
||||||
import org.jclouds.http.HttpCommand;
|
import org.jclouds.http.HttpCommand;
|
||||||
import org.jclouds.http.HttpErrorHandler;
|
import org.jclouds.http.HttpErrorHandler;
|
||||||
import org.jclouds.http.HttpResponse;
|
import org.jclouds.http.HttpResponse;
|
||||||
import org.jclouds.http.HttpResponseException;
|
import org.jclouds.http.HttpResponseException;
|
||||||
import org.jclouds.logging.Logger;
|
import org.jclouds.logging.Logger;
|
||||||
import org.jclouds.rest.AuthorizationException;
|
import org.jclouds.rest.AuthorizationException;
|
||||||
|
import org.jclouds.rest.ResourceNotFoundException;
|
||||||
import org.jclouds.util.Strings2;
|
import org.jclouds.util.Strings2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -65,14 +63,14 @@ public class ParseAzureStorageErrorFromXmlContent implements HttpErrorHandler {
|
||||||
public void handleError(HttpCommand command, HttpResponse response) {
|
public void handleError(HttpCommand command, HttpResponse response) {
|
||||||
Exception exception = new HttpResponseException(command, response);
|
Exception exception = new HttpResponseException(command, response);
|
||||||
String message = null;
|
String message = null;
|
||||||
|
AzureStorageError error = null;
|
||||||
try {
|
try {
|
||||||
if (response.getPayload() != null) {
|
if (response.getPayload() != null) {
|
||||||
String contentType = response.getPayload().getContentMetadata().getContentType();
|
String contentType = response.getPayload().getContentMetadata().getContentType();
|
||||||
if (contentType != null && (contentType.indexOf("xml") != -1 || contentType.indexOf("unknown") != -1)
|
if (contentType != null && (contentType.indexOf("xml") != -1 || contentType.indexOf("unknown") != -1)
|
||||||
&& !new Long(0).equals(response.getPayload().getContentMetadata().getContentLength())) {
|
&& !new Long(0).equals(response.getPayload().getContentMetadata().getContentLength())) {
|
||||||
try {
|
try {
|
||||||
AzureStorageError error = utils.parseAzureStorageErrorFromContent(command, response, response
|
error = utils.parseAzureStorageErrorFromContent(command, response, response.getPayload().getInput());
|
||||||
.getPayload().getInput());
|
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
message = error.getMessage();
|
message = error.getMessage();
|
||||||
exception = new AzureStorageResponseException(command, response, error);
|
exception = new AzureStorageResponseException(command, response, error);
|
||||||
|
@ -93,33 +91,30 @@ public class ParseAzureStorageErrorFromXmlContent implements HttpErrorHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
|
message = message != null ? message : String.format("%s -> %s", command.getCurrentRequest().getRequestLine(),
|
||||||
response.getStatusLine());
|
response.getStatusLine());
|
||||||
switch (response.getStatusCode()) {
|
exception = refineException(command, response, exception, error, message);
|
||||||
case 401:
|
|
||||||
exception = new AuthorizationException(exception.getMessage(), exception);
|
|
||||||
break;
|
|
||||||
case 404:
|
|
||||||
if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
|
|
||||||
String path = command.getCurrentRequest().getEndpoint().getPath();
|
|
||||||
Matcher matcher = CONTAINER_PATH.matcher(path);
|
|
||||||
if (matcher.find()) {
|
|
||||||
exception = new ContainerNotFoundException(matcher.group(1), message);
|
|
||||||
} else {
|
|
||||||
matcher = CONTAINER_KEY_PATH.matcher(path);
|
|
||||||
if (matcher.find()) {
|
|
||||||
exception = new KeyNotFoundException(matcher.group(1), matcher.group(2), message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 411:
|
|
||||||
exception = new IllegalArgumentException(message);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
releasePayload(response);
|
releasePayload(response);
|
||||||
command.setException(exception);
|
command.setException(exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Exception refineException(HttpCommand command, HttpResponse response, Exception exception,
|
||||||
|
AzureStorageError error, String message) {
|
||||||
|
switch (response.getStatusCode()) {
|
||||||
|
case 401:
|
||||||
|
exception = new AuthorizationException(message, exception);
|
||||||
|
break;
|
||||||
|
case 404:
|
||||||
|
if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
|
||||||
|
exception = new ResourceNotFoundException(message, exception);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 411:
|
||||||
|
exception = new IllegalArgumentException(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return exception;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -23,19 +23,25 @@ import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.ws.rs.HttpMethod;
|
import javax.ws.rs.HttpMethod;
|
||||||
import javax.ws.rs.core.HttpHeaders;
|
import javax.ws.rs.core.HttpHeaders;
|
||||||
|
|
||||||
import org.jclouds.encryption.internal.Base64;
|
import org.jclouds.PropertiesBuilder;
|
||||||
|
import org.jclouds.azure.storage.config.AzureStorageRestClientModule;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
|
import org.jclouds.logging.config.NullLoggingModule;
|
||||||
|
import org.jclouds.rest.RestContextBuilder;
|
||||||
import org.jclouds.rest.RestContextFactory;
|
import org.jclouds.rest.RestContextFactory;
|
||||||
|
import org.jclouds.rest.RestContextSpec;
|
||||||
|
import org.jclouds.rest.BaseRestClientTest.MockModule;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.DataProvider;
|
import org.testng.annotations.DataProvider;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
|
|
||||||
|
@ -46,7 +52,6 @@ import com.google.inject.Module;
|
||||||
@Test(groups = "unit")
|
@Test(groups = "unit")
|
||||||
public class SharedKeyLiteAuthenticationTest {
|
public class SharedKeyLiteAuthenticationTest {
|
||||||
|
|
||||||
private static final String KEY = Base64.encodeBytes("bar".getBytes());
|
|
||||||
private static final String ACCOUNT = "foo";
|
private static final String ACCOUNT = "foo";
|
||||||
private Injector injector;
|
private Injector injector;
|
||||||
private SharedKeyLiteAuthentication filter;
|
private SharedKeyLiteAuthentication filter;
|
||||||
|
@ -54,12 +59,12 @@ public class SharedKeyLiteAuthenticationTest {
|
||||||
@DataProvider(parallel = true)
|
@DataProvider(parallel = true)
|
||||||
public Object[][] dataProvider() {
|
public Object[][] dataProvider() {
|
||||||
return new Object[][] {
|
return new Object[][] {
|
||||||
{ new HttpRequest(HttpMethod.PUT, URI.create("http://" + ACCOUNT
|
{ new HttpRequest(HttpMethod.PUT, URI.create("http://" + ACCOUNT
|
||||||
+ ".blob.core.windows.net/movies/MOV1.avi?comp=block&blockid=BlockId1&timeout=60")) },
|
+ ".blob.core.windows.net/movies/MOV1.avi?comp=block&blockid=BlockId1&timeout=60")) },
|
||||||
{ new HttpRequest(HttpMethod.PUT, URI.create("http://" + ACCOUNT
|
{ new HttpRequest(HttpMethod.PUT, URI.create("http://" + ACCOUNT
|
||||||
+ ".blob.core.windows.net/movies/MOV1.avi?comp=blocklist&timeout=120")) },
|
+ ".blob.core.windows.net/movies/MOV1.avi?comp=blocklist&timeout=120")) },
|
||||||
{ new HttpRequest(HttpMethod.GET,
|
{ new HttpRequest(HttpMethod.GET, URI.create("http://" + ACCOUNT
|
||||||
URI.create("http://" + ACCOUNT + ".blob.core.windows.net/movies/MOV1.avi")) } };
|
+ ".blob.core.windows.net/movies/MOV1.avi")) } };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +85,7 @@ public class SharedKeyLiteAuthenticationTest {
|
||||||
request = filter.filter(request);
|
request = filter.filter(request);
|
||||||
}
|
}
|
||||||
System.out.printf("%s: %d iterations before the timestamp updated %n", Thread.currentThread().getName(),
|
System.out.printf("%s: %d iterations before the timestamp updated %n", Thread.currentThread().getName(),
|
||||||
iterations);
|
iterations);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -113,7 +118,7 @@ public class SharedKeyLiteAuthenticationTest {
|
||||||
@Test
|
@Test
|
||||||
void testAclQueryStringRelativeWithExtraJunk() {
|
void testAclQueryStringRelativeWithExtraJunk() {
|
||||||
URI host = URI.create("http://" + ACCOUNT
|
URI host = URI.create("http://" + ACCOUNT
|
||||||
+ ".blob.core.windows.net/mycontainer?comp=list&marker=marker&maxresults=1&prefix=prefix");
|
+ ".blob.core.windows.net/mycontainer?comp=list&marker=marker&maxresults=1&prefix=prefix");
|
||||||
HttpRequest request = new HttpRequest(HttpMethod.GET, host);
|
HttpRequest request = new HttpRequest(HttpMethod.GET, host);
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
filter.appendUriPath(request, builder);
|
filter.appendUriPath(request, builder);
|
||||||
|
@ -128,9 +133,14 @@ public class SharedKeyLiteAuthenticationTest {
|
||||||
*/
|
*/
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
protected void createFilter() throws IOException {
|
protected void createFilter() throws IOException {
|
||||||
injector = new RestContextFactory().createContextBuilder("azurequeue", ACCOUNT, KEY,
|
injector = RestContextFactory.createContextBuilder(DUMMY_SPEC).buildInjector();
|
||||||
ImmutableSet.<Module> of(new Log4JLoggingModule())).buildInjector();
|
|
||||||
filter = injector.getInstance(SharedKeyLiteAuthentication.class);
|
filter = injector.getInstance(SharedKeyLiteAuthentication.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static final RestContextSpec<Map, List> DUMMY_SPEC = new RestContextSpec<Map, List>("provider", "endpoint",
|
||||||
|
"apiVersion", "identity", "credential", Map.class, List.class, PropertiesBuilder.class,
|
||||||
|
(Class) RestContextBuilder.class, ImmutableList.<Module> of(new MockModule(), new NullLoggingModule(),
|
||||||
|
new AzureStorageRestClientModule<Exception, RuntimeException>(Exception.class, RuntimeException.class)));
|
||||||
|
|
||||||
}
|
}
|
|
@ -33,6 +33,7 @@
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>jclouds commons project</name>
|
<name>jclouds commons project</name>
|
||||||
<modules>
|
<modules>
|
||||||
|
<module>azure</module>
|
||||||
<module>aws</module>
|
<module>aws</module>
|
||||||
<module>openstack</module>
|
<module>openstack</module>
|
||||||
<module>vcloud</module>
|
<module>vcloud</module>
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
# ====================================================================
|
# ====================================================================
|
||||||
#
|
#
|
||||||
azurequeue.contextbuilder=org.jclouds.azure.storage.AzureStorageContextBuilder
|
azurequeue.contextbuilder=org.jclouds.azure.storage.AzureStorageContextBuilder
|
||||||
azurequeue.sync=org.jclouds.azure.storage.queue.AzureQueueClient
|
azurequeue.sync=org.jclouds.azurequeue.AzureQueueClient
|
||||||
azurequeue.async=org.jclouds.azure.storage.queue.AzureQueueAsyncClient
|
azurequeue.async=org.jclouds.azurequeue.AzureQueueAsyncClient
|
||||||
|
azurequeue.apiversion=2009-09-19
|
||||||
azurequeue.propertiesbuilder=org.jclouds.azure.storage.AzureStoragePropertiesBuilder
|
azurequeue.propertiesbuilder=org.jclouds.azure.storage.AzureStoragePropertiesBuilder
|
||||||
azurequeue.endpoint=https://{identity}.queue.core.windows.net
|
azurequeue.endpoint=https://{identity}.queue.core.windows.net
|
||||||
|
|
||||||
azureblob.contextbuilder=org.jclouds.azure.storage.blob.AzureBlobContextBuilder
|
azureblob.contextbuilder=org.jclouds.azureblob.AzureBlobContextBuilder
|
||||||
azureblob.propertiesbuilder=org.jclouds.azure.storage.AzureStoragePropertiesBuilder
|
azureblob.propertiesbuilder=org.jclouds.azureblob.AzureBlobPropertiesBuilder
|
||||||
azureblob.endpoint=https://{identity}.blob.core.windows.net
|
|
||||||
|
|
||||||
pcs.contextbuilder=org.jclouds.mezeo.pcs2.PCSContextBuilder
|
pcs.contextbuilder=org.jclouds.mezeo.pcs2.PCSContextBuilder
|
||||||
pcs.apiVersion=unknown
|
pcs.apiVersion=unknown
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -45,7 +45,6 @@
|
||||||
<module>drivers</module>
|
<module>drivers</module>
|
||||||
<module>tools</module>
|
<module>tools</module>
|
||||||
<module>scriptbuilder</module>
|
<module>scriptbuilder</module>
|
||||||
<module>azure</module>
|
|
||||||
<module>allcompute</module>
|
<module>allcompute</module>
|
||||||
<module>allblobstore</module>
|
<module>allblobstore</module>
|
||||||
<module>all</module>
|
<module>all</module>
|
||||||
|
|
|
@ -20,64 +20,53 @@
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4.0.0.xsd" >
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.jclouds</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-project</artifactId>
|
<artifactId>jclouds-project</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<relativePath>../project/pom.xml</relativePath>
|
<relativePath>../../project/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<groupId>org.jclouds</groupId>
|
<artifactId>azureblob</artifactId>
|
||||||
<artifactId>jclouds-azure</artifactId>
|
<name>jcloud azureblob provider</name>
|
||||||
<name>jclouds azure services core</name>
|
<description>jclouds components to access Azure Blob Service</description>
|
||||||
<description>jclouds core components to access azure services</description>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<test.azure.endpoint>https://auth.api.azurecloud.com</test.azure.endpoint>
|
<test.initializer>org.jclouds.azureblob.blobstore.integration.AzureBlobTestInitializer</test.initializer>
|
||||||
<test.azure.apiversion>2009-09-19</test.azure.apiversion>
|
<test.azureblob.endpoint>https://{identity}.blob.core.windows.net</test.azureblob.endpoint>
|
||||||
<test.azure.identity>FIXME</test.azure.identity>
|
<test.azureblob.apiversion>2009-09-19</test.azureblob.apiversion>
|
||||||
<test.azure.credential>FIXME</test.azure.credential>
|
|
||||||
<test.initializer>org.jclouds.azure.storage.blob.blobstore.integration.AzureBlobTestInitializer</test.initializer>
|
|
||||||
<test.azureblob.endpoint>https://${test.azure.identity}.blob.core.windows.net</test.azureblob.endpoint>
|
|
||||||
<test.azureblob.apiversion>${test.azure.apiversion}</test.azureblob.apiversion>
|
|
||||||
<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>
|
||||||
<test.azurequeue.endpoint>https://${test.azure.identity}.queue.core.windows.net</test.azurequeue.endpoint>
|
|
||||||
<test.azurequeue.apiversion>${test.azure.apiversion}</test.azurequeue.apiversion>
|
|
||||||
<test.azurequeue.identity>${test.azure.identity}</test.azurequeue.identity>
|
|
||||||
<test.azurequeue.credential>${test.azure.credential}</test.azurequeue.credential>
|
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
|
||||||
<connection>scm:svn:http://jclouds.googlecode.com/svn/trunk/azure</connection>
|
|
||||||
<developerConnection>scm:svn:https://jclouds.googlecode.com/svn/trunk/azure</developerConnection>
|
|
||||||
<url>http://jclouds.googlecode.com/svn/trunk/azure</url>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>org.jclouds.common</groupId>
|
||||||
<artifactId>jclouds-blobstore</artifactId>
|
<artifactId>azure-common</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
|
<type>jar</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-blobstore</artifactId>
|
<artifactId>jclouds-blobstore</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>test-jar</type>
|
<type>jar</type>
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>jclouds-core</artifactId>
|
<artifactId>jclouds-core</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>test-jar</type>
|
<type>test-jar</type>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>org.jclouds</groupId>
|
||||||
<artifactId>log4j</artifactId>
|
<artifactId>jclouds-blobstore</artifactId>
|
||||||
<version>1.2.14</version>
|
<version>${project.version}</version>
|
||||||
|
<type>test-jar</type>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -86,8 +75,15 @@
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.16</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<profiles>
|
|
||||||
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>live</id>
|
<id>live</id>
|
||||||
<build>
|
<build>
|
||||||
|
@ -120,22 +116,6 @@
|
||||||
<name>test.azureblob.credential</name>
|
<name>test.azureblob.credential</name>
|
||||||
<value>${test.azureblob.credential}</value>
|
<value>${test.azureblob.credential}</value>
|
||||||
</property>
|
</property>
|
||||||
<property>
|
|
||||||
<name>test.azurequeue.endpoint</name>
|
|
||||||
<value>${test.azurequeue.endpoint}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.azurequeue.apiversion</name>
|
|
||||||
<value>${test.azurequeue.apiversion}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.azurequeue.identity</name>
|
|
||||||
<value>${test.azurequeue.identity}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.azurequeue.credential</name>
|
|
||||||
<value>${test.azurequeue.credential}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
<property>
|
||||||
<name>test.initializer</name>
|
<name>test.initializer</name>
|
||||||
<value>${test.initializer}</value>
|
<value>${test.initializer}</value>
|
||||||
|
@ -157,5 +137,7 @@
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
@ -29,20 +29,20 @@ import javax.ws.rs.PUT;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.PathParam;
|
import javax.ws.rs.PathParam;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.binders.BindAzureBlobMetadataToRequest;
|
import org.jclouds.azureblob.binders.BindAzureBlobMetadataToRequest;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.functions.BlobName;
|
import org.jclouds.azureblob.functions.BlobName;
|
||||||
import org.jclouds.azure.storage.blob.functions.ParseBlobFromHeadersAndHttpContent;
|
import org.jclouds.azureblob.functions.ParseBlobFromHeadersAndHttpContent;
|
||||||
import org.jclouds.azure.storage.blob.functions.ParseBlobPropertiesFromHeaders;
|
import org.jclouds.azureblob.functions.ParseBlobPropertiesFromHeaders;
|
||||||
import org.jclouds.azure.storage.blob.functions.ParseContainerPropertiesFromHeaders;
|
import org.jclouds.azureblob.functions.ParseContainerPropertiesFromHeaders;
|
||||||
import org.jclouds.azure.storage.blob.functions.ReturnFalseIfContainerAlreadyExists;
|
import org.jclouds.azureblob.functions.ReturnFalseIfContainerAlreadyExists;
|
||||||
import org.jclouds.azure.storage.blob.options.CreateContainerOptions;
|
import org.jclouds.azureblob.options.CreateContainerOptions;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.blob.predicates.validators.ContainerNameValidator;
|
import org.jclouds.azureblob.predicates.validators.ContainerNameValidator;
|
||||||
import org.jclouds.azure.storage.blob.xml.AccountNameEnumerationResultsHandler;
|
import org.jclouds.azureblob.xml.AccountNameEnumerationResultsHandler;
|
||||||
import org.jclouds.azure.storage.blob.xml.ContainerNameEnumerationResultsHandler;
|
import org.jclouds.azureblob.xml.ContainerNameEnumerationResultsHandler;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
|
import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
|
||||||
import org.jclouds.azure.storage.options.ListOptions;
|
import org.jclouds.azure.storage.options.ListOptions;
|
||||||
|
@ -86,7 +86,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
||||||
@Path("/")
|
@Path("/")
|
||||||
public interface AzureBlobAsyncClient {
|
public interface AzureBlobAsyncClient {
|
||||||
|
|
||||||
public org.jclouds.azure.storage.blob.domain.AzureBlob newBlob();
|
public org.jclouds.azureblob.domain.AzureBlob newBlob();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AzureBlobClient#listContainers
|
* @see AzureBlobClient#listContainers
|
||||||
|
@ -195,7 +195,7 @@ public interface AzureBlobAsyncClient {
|
||||||
@ResponseParser(ParseETagHeader.class)
|
@ResponseParser(ParseETagHeader.class)
|
||||||
ListenableFuture<String> putBlob(
|
ListenableFuture<String> putBlob(
|
||||||
@PathParam("container") @ParamValidators( { ContainerNameValidator.class }) String container,
|
@PathParam("container") @ParamValidators( { ContainerNameValidator.class }) String container,
|
||||||
@PathParam("name") @ParamParser(BlobName.class) @BinderParam(BindAzureBlobMetadataToRequest.class) org.jclouds.azure.storage.blob.domain.AzureBlob object);
|
@PathParam("name") @ParamParser(BlobName.class) @BinderParam(BindAzureBlobMetadataToRequest.class) org.jclouds.azureblob.domain.AzureBlob object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see AzureBlobClient#getBlob
|
* @see AzureBlobClient#getBlob
|
||||||
|
@ -204,7 +204,7 @@ public interface AzureBlobAsyncClient {
|
||||||
@ResponseParser(ParseBlobFromHeadersAndHttpContent.class)
|
@ResponseParser(ParseBlobFromHeadersAndHttpContent.class)
|
||||||
@ExceptionParser(ReturnNullOnKeyNotFound.class)
|
@ExceptionParser(ReturnNullOnKeyNotFound.class)
|
||||||
@Path("{container}/{name}")
|
@Path("{container}/{name}")
|
||||||
ListenableFuture<org.jclouds.azure.storage.blob.domain.AzureBlob> getBlob(
|
ListenableFuture<org.jclouds.azureblob.domain.AzureBlob> getBlob(
|
||||||
@PathParam("container") @ParamValidators( { ContainerNameValidator.class }) String container,
|
@PathParam("container") @ParamValidators( { ContainerNameValidator.class }) String container,
|
||||||
@PathParam("name") String name, GetOptions... options);
|
@PathParam("name") String name, GetOptions... options);
|
||||||
|
|
|
@ -17,17 +17,17 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.options.CreateContainerOptions;
|
import org.jclouds.azureblob.options.CreateContainerOptions;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.azure.storage.options.ListOptions;
|
import org.jclouds.azure.storage.options.ListOptions;
|
||||||
import org.jclouds.blobstore.ContainerNotFoundException;
|
import org.jclouds.blobstore.ContainerNotFoundException;
|
||||||
|
@ -48,7 +48,7 @@ import java.util.concurrent.Future;
|
||||||
*/
|
*/
|
||||||
@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS)
|
@Timeout(duration = 90, timeUnit = TimeUnit.SECONDS)
|
||||||
public interface AzureBlobClient {
|
public interface AzureBlobClient {
|
||||||
public org.jclouds.azure.storage.blob.domain.AzureBlob newBlob();
|
public org.jclouds.azureblob.domain.AzureBlob newBlob();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The List Containers operation returns a list of the containers under the specified identity.
|
* The List Containers operation returns a list of the containers under the specified identity.
|
||||||
|
@ -204,14 +204,14 @@ public interface AzureBlobClient {
|
||||||
* longer than 10 minutes per MB on average, the operation will timeout.
|
* longer than 10 minutes per MB on average, the operation will timeout.
|
||||||
*/
|
*/
|
||||||
@Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES)
|
@Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES)
|
||||||
String putBlob(String container, org.jclouds.azure.storage.blob.domain.AzureBlob object);
|
String putBlob(String container, org.jclouds.azureblob.domain.AzureBlob object);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Get Blob operation reads or downloads a blob from the system, including its metadata and
|
* The Get Blob operation reads or downloads a blob from the system, including its metadata and
|
||||||
* properties.
|
* properties.
|
||||||
*/
|
*/
|
||||||
@Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES)
|
@Timeout(duration = 10 * 64, timeUnit = TimeUnit.MINUTES)
|
||||||
org.jclouds.azure.storage.blob.domain.AzureBlob getBlob(String container, String name,
|
org.jclouds.azureblob.domain.AzureBlob getBlob(String container, String name,
|
||||||
GetOptions... options);
|
GetOptions... options);
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.blobstore.config.AzureBlobStoreContextModule;
|
import org.jclouds.azureblob.blobstore.config.AzureBlobStoreContextModule;
|
||||||
import org.jclouds.azure.storage.blob.config.AzureBlobRestClientModule;
|
import org.jclouds.azureblob.config.AzureBlobRestClientModule;
|
||||||
import org.jclouds.blobstore.BlobStoreContextBuilder;
|
import org.jclouds.blobstore.BlobStoreContextBuilder;
|
||||||
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
|
import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule;
|
||||||
import org.jclouds.logging.jdk.config.JDKLoggingModule;
|
import org.jclouds.logging.jdk.config.JDKLoggingModule;
|
|
@ -0,0 +1,49 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||||
|
*
|
||||||
|
* ====================================================================
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ====================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
|
import static org.jclouds.Constants.PROPERTY_API_VERSION;
|
||||||
|
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
|
||||||
|
import static org.jclouds.blobstore.reference.BlobStoreConstants.PROPERTY_USER_METADATA_PREFIX;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.jclouds.azure.storage.AzureStoragePropertiesBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds properties used in AzureBlob Connections
|
||||||
|
*
|
||||||
|
* @author Adrian Cole
|
||||||
|
*/
|
||||||
|
public class AzureBlobPropertiesBuilder extends AzureStoragePropertiesBuilder {
|
||||||
|
@Override
|
||||||
|
protected Properties defaultProperties() {
|
||||||
|
Properties properties = super.defaultProperties();
|
||||||
|
properties.setProperty(PROPERTY_USER_METADATA_PREFIX, "x-ms-meta-");
|
||||||
|
properties.setProperty(PROPERTY_API_VERSION, "2009-09-19");
|
||||||
|
properties.setProperty(PROPERTY_ENDPOINT, "https://{identity}.blob.core.windows.net");
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AzureBlobPropertiesBuilder(Properties properties) {
|
||||||
|
super(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.binders;
|
package org.jclouds.azureblob.binders;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -26,8 +26,8 @@ import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
import javax.ws.rs.core.HttpHeaders;
|
import javax.ws.rs.core.HttpHeaders;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.AzureBlobToBlob;
|
import org.jclouds.azureblob.blobstore.functions.AzureBlobToBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.blobstore.binders.BindUserMetadataToHeadersWithPrefix;
|
import org.jclouds.blobstore.binders.BindUserMetadataToHeadersWithPrefix;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
import org.jclouds.http.utils.ModifyRequest;
|
import org.jclouds.http.utils.ModifyRequest;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore;
|
package org.jclouds.azureblob.blobstore;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
||||||
|
@ -30,18 +30,18 @@ import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.Constants;
|
import org.jclouds.Constants;
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.AzureBlobToBlob;
|
import org.jclouds.azureblob.blobstore.functions.AzureBlobToBlob;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobPropertiesToBlobMetadata;
|
import org.jclouds.azureblob.blobstore.functions.BlobPropertiesToBlobMetadata;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobToAzureBlob;
|
import org.jclouds.azureblob.blobstore.functions.BlobToAzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ContainerToResourceMetadata;
|
import org.jclouds.azureblob.blobstore.functions.ContainerToResourceMetadata;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ListBlobsResponseToResourceList;
|
import org.jclouds.azureblob.blobstore.functions.ListBlobsResponseToResourceList;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ListOptionsToListBlobsOptions;
|
import org.jclouds.azureblob.blobstore.functions.ListOptionsToListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.blobstore.BlobStoreContext;
|
import org.jclouds.blobstore.BlobStoreContext;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore;
|
package org.jclouds.azureblob.blobstore;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest;
|
import static org.jclouds.blobstore.util.BlobStoreUtils.cleanRequest;
|
||||||
|
@ -27,9 +27,9 @@ import java.lang.reflect.Method;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobToAzureBlob;
|
import org.jclouds.azureblob.blobstore.functions.BlobToAzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.blobstore.BlobRequestSigner;
|
import org.jclouds.blobstore.BlobRequestSigner;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
|
@ -74,4 +74,4 @@ public class AzureBlobRequestSigner implements BlobRequestSigner {
|
||||||
return cleanRequest(processor.createRequest(deleteMethod, container, name));
|
return cleanRequest(processor.createRequest(deleteMethod, container, name));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore;
|
package org.jclouds.azureblob.blobstore;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
||||||
|
@ -27,15 +27,15 @@ import java.util.Set;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobClient;
|
import org.jclouds.azureblob.AzureBlobClient;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.AzureBlobToBlob;
|
import org.jclouds.azureblob.blobstore.functions.AzureBlobToBlob;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobPropertiesToBlobMetadata;
|
import org.jclouds.azureblob.blobstore.functions.BlobPropertiesToBlobMetadata;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobToAzureBlob;
|
import org.jclouds.azureblob.blobstore.functions.BlobToAzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ContainerToResourceMetadata;
|
import org.jclouds.azureblob.blobstore.functions.ContainerToResourceMetadata;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ListBlobsResponseToResourceList;
|
import org.jclouds.azureblob.blobstore.functions.ListBlobsResponseToResourceList;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.ListOptionsToListBlobsOptions;
|
import org.jclouds.azureblob.blobstore.functions.ListOptionsToListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.blobstore.BlobStoreContext;
|
import org.jclouds.blobstore.BlobStoreContext;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
|
@ -17,18 +17,18 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.config;
|
package org.jclouds.azureblob.blobstore.config;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobClient;
|
import org.jclouds.azureblob.AzureBlobClient;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.AzureAsyncBlobStore;
|
import org.jclouds.azureblob.blobstore.AzureAsyncBlobStore;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.AzureBlobRequestSigner;
|
import org.jclouds.azureblob.blobstore.AzureBlobRequestSigner;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.AzureBlobStore;
|
import org.jclouds.azureblob.blobstore.AzureBlobStore;
|
||||||
import org.jclouds.azure.storage.blob.blobstore.strategy.FindMD5InBlobProperties;
|
import org.jclouds.azureblob.blobstore.strategy.FindMD5InBlobProperties;
|
||||||
import org.jclouds.blobstore.AsyncBlobStore;
|
import org.jclouds.blobstore.AsyncBlobStore;
|
||||||
import org.jclouds.blobstore.BlobRequestSigner;
|
import org.jclouds.blobstore.BlobRequestSigner;
|
||||||
import org.jclouds.blobstore.BlobStore;
|
import org.jclouds.blobstore.BlobStore;
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.blobstore.domain.Blob.Factory;
|
import org.jclouds.blobstore.domain.Blob.Factory;
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.MutableBlobPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.MutableBlobPropertiesImpl;
|
||||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||||
import org.jclouds.http.HttpUtils;
|
import org.jclouds.http.HttpUtils;
|
||||||
|
|
||||||
|
@ -50,4 +50,4 @@ public class BlobMetadataToBlobProperties implements Function<BlobMetadata, Muta
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.blobstore.domain.MutableBlobMetadata;
|
import org.jclouds.blobstore.domain.MutableBlobMetadata;
|
||||||
import org.jclouds.blobstore.domain.StorageType;
|
import org.jclouds.blobstore.domain.StorageType;
|
||||||
import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;
|
import org.jclouds.blobstore.domain.internal.MutableBlobMetadataImpl;
|
||||||
|
@ -63,4 +63,4 @@ public class BlobPropertiesToBlobMetadata implements Function<BlobProperties, Mu
|
||||||
}
|
}
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
@ -51,4 +51,4 @@ public class BlobToAzureBlob implements Function<Blob, AzureBlob> {
|
||||||
object.setAllHeaders(from.getAllHeaders());
|
object.setAllHeaders(from.getAllHeaders());
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,12 +17,12 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.blobstore.domain.MutableStorageMetadata;
|
import org.jclouds.blobstore.domain.MutableStorageMetadata;
|
||||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||||
import org.jclouds.blobstore.domain.StorageType;
|
import org.jclouds.blobstore.domain.StorageType;
|
||||||
|
@ -55,4 +55,4 @@ public class ContainerToResourceMetadata implements Function<ContainerProperties
|
||||||
to.setUserMetadata(from.getMetadata());
|
to.setUserMetadata(from.getMetadata());
|
||||||
return to;
|
return to;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -25,7 +25,7 @@ import java.util.Set;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.blobstore.domain.PageSet;
|
import org.jclouds.blobstore.domain.PageSet;
|
||||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||||
import org.jclouds.blobstore.domain.StorageType;
|
import org.jclouds.blobstore.domain.StorageType;
|
||||||
|
@ -73,4 +73,4 @@ public class ListBlobsResponseToResourceList implements
|
||||||
}
|
}
|
||||||
return new PageSetImpl<StorageMetadata>(contents, from.getNextMarker());
|
return new PageSetImpl<StorageMetadata>(contents, from.getNextMarker());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
@ -54,4 +54,4 @@ public class ListOptionsToListBlobsOptions implements
|
||||||
}
|
}
|
||||||
return httpOptions;
|
return httpOptions;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,15 +17,15 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.strategy;
|
package org.jclouds.azureblob.blobstore.strategy;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobClient;
|
import org.jclouds.azureblob.AzureBlobClient;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||||
import org.jclouds.blobstore.functions.ObjectMD5;
|
import org.jclouds.blobstore.functions.ObjectMD5;
|
||||||
import org.jclouds.blobstore.internal.BlobRuntimeException;
|
import org.jclouds.blobstore.internal.BlobRuntimeException;
|
||||||
|
@ -72,4 +72,4 @@ public class FindMD5InBlobProperties implements ContainsValueInListStrategy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.config;
|
package org.jclouds.azureblob.config;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Provider;
|
import javax.inject.Provider;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.AzureBlobImpl;
|
import org.jclouds.azureblob.domain.internal.AzureBlobImpl;
|
||||||
import org.jclouds.blobstore.config.BlobStoreObjectModule;
|
import org.jclouds.blobstore.config.BlobStoreObjectModule;
|
||||||
|
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
|
@ -63,4 +63,4 @@ public class AzureBlobModule extends AbstractModule {
|
||||||
return factory.create(null);
|
return factory.create(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,12 +17,17 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.config;
|
package org.jclouds.azureblob.config;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobClient;
|
|
||||||
import org.jclouds.azure.storage.config.AzureStorageRestClientModule;
|
import org.jclouds.azure.storage.config.AzureStorageRestClientModule;
|
||||||
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
|
import org.jclouds.azureblob.AzureBlobClient;
|
||||||
|
import org.jclouds.azureblob.handlers.ParseAzureBlobErrorFromXmlContent;
|
||||||
|
import org.jclouds.http.HttpErrorHandler;
|
||||||
import org.jclouds.http.RequiresHttp;
|
import org.jclouds.http.RequiresHttp;
|
||||||
|
import org.jclouds.http.annotation.ClientError;
|
||||||
|
import org.jclouds.http.annotation.Redirection;
|
||||||
|
import org.jclouds.http.annotation.ServerError;
|
||||||
import org.jclouds.rest.ConfiguresRestClient;
|
import org.jclouds.rest.ConfiguresRestClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,8 +37,7 @@ import org.jclouds.rest.ConfiguresRestClient;
|
||||||
*/
|
*/
|
||||||
@ConfiguresRestClient
|
@ConfiguresRestClient
|
||||||
@RequiresHttp
|
@RequiresHttp
|
||||||
public class AzureBlobRestClientModule extends
|
public class AzureBlobRestClientModule extends AzureStorageRestClientModule<AzureBlobClient, AzureBlobAsyncClient> {
|
||||||
AzureStorageRestClientModule<AzureBlobClient, AzureBlobAsyncClient> {
|
|
||||||
|
|
||||||
public AzureBlobRestClientModule() {
|
public AzureBlobRestClientModule() {
|
||||||
super(AzureBlobClient.class, AzureBlobAsyncClient.class);
|
super(AzureBlobClient.class, AzureBlobAsyncClient.class);
|
||||||
|
@ -45,4 +49,11 @@ public class AzureBlobRestClientModule extends
|
||||||
super.configure();
|
super.configure();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
protected void bindErrorHandlers() {
|
||||||
|
bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(ParseAzureBlobErrorFromXmlContent.class);
|
||||||
|
bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(ParseAzureBlobErrorFromXmlContent.class);
|
||||||
|
bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(ParseAzureBlobErrorFromXmlContent.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
@ -50,4 +50,4 @@ public interface AzureBlob extends PayloadEnclosing, Comparable<AzureBlob> {
|
||||||
Multimap<String, String> getAllHeaders();
|
Multimap<String, String> getAllHeaders();
|
||||||
|
|
||||||
void setAllHeaders(Multimap<String, String> allHeaders);
|
void setAllHeaders(Multimap<String, String> allHeaders);
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ public enum BlobType {
|
||||||
return UNRECOGNIZED;
|
return UNRECOGNIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ public enum LeaseStatus {
|
||||||
return UNRECOGNIZED;
|
return UNRECOGNIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -32,4 +32,4 @@ public interface ListBlobsResponse extends BoundedSet<BlobProperties> {
|
||||||
String getDelimiter();
|
String getDelimiter();
|
||||||
|
|
||||||
Set<String> getBlobPrefixes();
|
Set<String> getBlobPrefixes();
|
||||||
}
|
}
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.MutableBlobPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.MutableBlobPropertiesImpl;
|
||||||
import org.jclouds.io.MutableContentMetadata;
|
import org.jclouds.io.MutableContentMetadata;
|
||||||
|
|
||||||
import com.google.inject.ImplementedBy;
|
import com.google.inject.ImplementedBy;
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain;
|
package org.jclouds.azureblob.domain;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.MutableContainerPropertiesWithMetadataImpl;
|
import org.jclouds.azureblob.domain.internal.MutableContainerPropertiesWithMetadataImpl;
|
||||||
|
|
||||||
import com.google.inject.ImplementedBy;
|
import com.google.inject.ImplementedBy;
|
||||||
|
|
|
@ -17,14 +17,14 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.http.internal.PayloadEnclosingImpl;
|
import org.jclouds.http.internal.PayloadEnclosingImpl;
|
||||||
import org.jclouds.io.Payload;
|
import org.jclouds.io.Payload;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobType;
|
import org.jclouds.azureblob.domain.BlobType;
|
||||||
import org.jclouds.azure.storage.blob.domain.LeaseStatus;
|
import org.jclouds.azureblob.domain.LeaseStatus;
|
||||||
import org.jclouds.io.ContentMetadata;
|
import org.jclouds.io.ContentMetadata;
|
||||||
import org.jclouds.io.payloads.BaseImmutableContentMetadata;
|
import org.jclouds.io.payloads.BaseImmutableContentMetadata;
|
||||||
|
|
||||||
|
@ -213,4 +213,4 @@ public class BlobPropertiesImpl implements Serializable, BlobProperties {
|
||||||
+ ", lastModified=" + lastModified + "]";
|
+ ", lastModified=" + lastModified + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
@ -141,4 +141,4 @@ public class ContainerPropertiesImpl implements Serializable, ContainerPropertie
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
||||||
|
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
|
@ -17,17 +17,17 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobType;
|
import org.jclouds.azureblob.domain.BlobType;
|
||||||
import org.jclouds.azure.storage.blob.domain.LeaseStatus;
|
import org.jclouds.azureblob.domain.LeaseStatus;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.http.HttpUtils;
|
import org.jclouds.http.HttpUtils;
|
||||||
import org.jclouds.io.MutableContentMetadata;
|
import org.jclouds.io.MutableContentMetadata;
|
||||||
import org.jclouds.io.payloads.BaseMutableContentMetadata;
|
import org.jclouds.io.payloads.BaseMutableContentMetadata;
|
||||||
|
@ -240,4 +240,4 @@ public class MutableBlobPropertiesImpl implements Serializable, MutableBlobPrope
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,15 +17,15 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.domain.internal;
|
package org.jclouds.azureblob.domain.internal;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableContainerPropertiesWithMetadata;
|
import org.jclouds.azureblob.domain.MutableContainerPropertiesWithMetadata;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
|
@ -169,4 +169,4 @@ public class MutableContainerPropertiesWithMetadataImpl implements Serializable,
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,9 +17,9 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.functions;
|
package org.jclouds.azureblob.functions;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
|
@ -33,4 +33,4 @@ public class BlobName implements Function<Object, String> {
|
||||||
return ((AzureBlob) from).getProperties().getName();
|
return ((AzureBlob) from).getProperties().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,13 +17,13 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.functions;
|
package org.jclouds.azureblob.functions;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
import org.jclouds.http.HttpResponse;
|
import org.jclouds.http.HttpResponse;
|
||||||
import org.jclouds.rest.InvocationContext;
|
import org.jclouds.rest.InvocationContext;
|
||||||
|
@ -64,4 +64,4 @@ public class ParseBlobFromHeadersAndHttpContent implements Function<HttpResponse
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,12 +17,12 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.functions;
|
package org.jclouds.azureblob.functions;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.blobstore.functions.BlobMetadataToBlobProperties;
|
import org.jclouds.azureblob.blobstore.functions.BlobMetadataToBlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||||
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
|
import org.jclouds.blobstore.functions.ParseSystemAndUserMetadataFromHeaders;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
|
@ -32,7 +32,7 @@ import org.jclouds.rest.InvocationContext;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This parses @{link {@link org.jclouds.azure.storage.blob.domain.BlobProperties} from HTTP
|
* This parses @{link {@link org.jclouds.azureblob.domain.BlobProperties} from HTTP
|
||||||
* headers.
|
* headers.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -65,4 +65,4 @@ public class ParseBlobPropertiesFromHeaders implements Function<HttpResponse, Mu
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.functions;
|
package org.jclouds.azureblob.functions;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
import static com.google.common.base.Preconditions.checkArgument;
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@ import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.ws.rs.core.HttpHeaders;
|
import javax.ws.rs.core.HttpHeaders;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableContainerPropertiesWithMetadata;
|
import org.jclouds.azureblob.domain.MutableContainerPropertiesWithMetadata;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.MutableContainerPropertiesWithMetadataImpl;
|
import org.jclouds.azureblob.domain.internal.MutableContainerPropertiesWithMetadataImpl;
|
||||||
import org.jclouds.blobstore.reference.BlobStoreConstants;
|
import org.jclouds.blobstore.reference.BlobStoreConstants;
|
||||||
import org.jclouds.date.DateService;
|
import org.jclouds.date.DateService;
|
||||||
import org.jclouds.http.HttpException;
|
import org.jclouds.http.HttpException;
|
||||||
|
@ -42,7 +42,7 @@ import com.google.common.annotations.VisibleForTesting;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This parses @{link {@link org.jclouds.azure.storage.blob.domain.ListableContainerProperties} from
|
* This parses @{link {@link org.jclouds.azureblob.domain.ListableContainerProperties} from
|
||||||
* HTTP headers.
|
* HTTP headers.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
@ -107,4 +107,4 @@ public class ParseContainerPropertiesFromHeaders implements Function<HttpRespons
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.functions;
|
package org.jclouds.azureblob.functions;
|
||||||
|
|
||||||
import static org.jclouds.util.Throwables2.propagateOrNull;
|
import static org.jclouds.util.Throwables2.propagateOrNull;
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
|
||||||
|
*
|
||||||
|
* ====================================================================
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* ====================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.jclouds.azureblob.handlers;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
import org.jclouds.azure.storage.domain.AzureStorageError;
|
||||||
|
import org.jclouds.azure.storage.handlers.ParseAzureStorageErrorFromXmlContent;
|
||||||
|
import org.jclouds.azure.storage.util.AzureStorageUtils;
|
||||||
|
import org.jclouds.blobstore.ContainerNotFoundException;
|
||||||
|
import org.jclouds.blobstore.KeyNotFoundException;
|
||||||
|
import org.jclouds.http.HttpCommand;
|
||||||
|
import org.jclouds.http.HttpResponse;
|
||||||
|
import org.jclouds.rest.ResourceNotFoundException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Adrian Cole
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Singleton
|
||||||
|
public class ParseAzureBlobErrorFromXmlContent extends ParseAzureStorageErrorFromXmlContent {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
ParseAzureBlobErrorFromXmlContent(AzureStorageUtils utils) {
|
||||||
|
super(utils);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Exception refineException(HttpCommand command, HttpResponse response, Exception exception, AzureStorageError error,
|
||||||
|
String message) {
|
||||||
|
switch (response.getStatusCode()) {
|
||||||
|
case 404:
|
||||||
|
if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
|
||||||
|
exception = new ResourceNotFoundException(message, exception);
|
||||||
|
String container = command.getCurrentRequest().getEndpoint().getHost();
|
||||||
|
String key = command.getCurrentRequest().getEndpoint().getPath();
|
||||||
|
if (key == null || key.equals("/"))
|
||||||
|
exception = new ContainerNotFoundException(container, message);
|
||||||
|
else
|
||||||
|
exception = new KeyNotFoundException(container, key, message);
|
||||||
|
}
|
||||||
|
return exception;
|
||||||
|
default:
|
||||||
|
return super.refineException(command, response, exception, error, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.options;
|
package org.jclouds.azureblob.options;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.options.CreateOptions;
|
import org.jclouds.azure.storage.options.CreateOptions;
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ import com.google.common.collect.Multimap;
|
||||||
* mutator (if needed):
|
* mutator (if needed):
|
||||||
* <p/>
|
* <p/>
|
||||||
* <code>
|
* <code>
|
||||||
* import static org.jclouds.azure.storage.blob.options.CreateContainerOptions.Builder.*
|
* import static org.jclouds.azureblob.options.CreateContainerOptions.Builder.*
|
||||||
* import org.jclouds.azure.storage.blob.AzureBlobClient;
|
* import org.jclouds.azureblob.AzureBlobClient;
|
||||||
* <p/>
|
* <p/>
|
||||||
* AzureBlobClient connection = // get connection
|
* AzureBlobClient connection = // get connection
|
||||||
* boolean createdWithPublicAcl = connection.createContainer("containerName", withPublicAcl());
|
* boolean createdWithPublicAcl = connection.createContainer("containerName", withPublicAcl());
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.options;
|
package org.jclouds.azureblob.options;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.options.ListOptions;
|
import org.jclouds.azure.storage.options.ListOptions;
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ import org.jclouds.azure.storage.options.ListOptions;
|
||||||
* needed):
|
* needed):
|
||||||
* <p/>
|
* <p/>
|
||||||
* <code>
|
* <code>
|
||||||
* import static org.jclouds.azure.storage.blob.options.ListBlobsOptions.Builder.*
|
* import static org.jclouds.azureblob.options.ListBlobsOptions.Builder.*
|
||||||
* import org.jclouds.azure.storage.blob.AzureBlobClient;
|
* import org.jclouds.azureblob.AzureBlobClient;
|
||||||
* <p/>
|
* <p/>
|
||||||
* AzureBlobClient connection = // get connection
|
* AzureBlobClient connection = // get connection
|
||||||
* Set<BlobMetadata> blobs = connection.listBlobs("containerName", delimiter("/"));
|
* Set<BlobMetadata> blobs = connection.listBlobs("containerName", delimiter("/"));
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.predicates.validators;
|
package org.jclouds.azureblob.predicates.validators;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
@ -62,4 +62,4 @@ public class ContainerNameValidator extends DnsNameValidator {
|
||||||
containerName, reason));
|
containerName, reason));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.xml;
|
package org.jclouds.azureblob.xml;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -26,8 +26,8 @@ import java.util.SortedSet;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.ContainerPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.ContainerPropertiesImpl;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
||||||
import org.jclouds.date.DateService;
|
import org.jclouds.date.DateService;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.xml;
|
package org.jclouds.azureblob.xml;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -26,12 +26,12 @@ import java.util.Set;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobType;
|
import org.jclouds.azureblob.domain.BlobType;
|
||||||
import org.jclouds.azure.storage.blob.domain.LeaseStatus;
|
import org.jclouds.azureblob.domain.LeaseStatus;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.BlobPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.BlobPropertiesImpl;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.HashSetListBlobsResponse;
|
import org.jclouds.azureblob.domain.internal.HashSetListBlobsResponse;
|
||||||
import org.jclouds.crypto.CryptoStreams;
|
import org.jclouds.crypto.CryptoStreams;
|
||||||
import org.jclouds.date.DateService;
|
import org.jclouds.date.DateService;
|
||||||
import org.jclouds.http.HttpUtils;
|
import org.jclouds.http.HttpUtils;
|
|
@ -17,9 +17,9 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import static org.jclouds.azure.storage.blob.options.CreateContainerOptions.Builder.withPublicAcl;
|
import static org.jclouds.azureblob.options.CreateContainerOptions.Builder.withPublicAcl;
|
||||||
import static org.jclouds.azure.storage.options.ListOptions.Builder.maxResults;
|
import static org.jclouds.azure.storage.options.ListOptions.Builder.maxResults;
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -28,13 +28,13 @@ import java.lang.reflect.Method;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.functions.ParseBlobFromHeadersAndHttpContent;
|
import org.jclouds.azureblob.functions.ParseBlobFromHeadersAndHttpContent;
|
||||||
import org.jclouds.azure.storage.blob.functions.ParseContainerPropertiesFromHeaders;
|
import org.jclouds.azureblob.functions.ParseContainerPropertiesFromHeaders;
|
||||||
import org.jclouds.azure.storage.blob.functions.ReturnFalseIfContainerAlreadyExists;
|
import org.jclouds.azureblob.functions.ReturnFalseIfContainerAlreadyExists;
|
||||||
import org.jclouds.azure.storage.blob.options.CreateContainerOptions;
|
import org.jclouds.azureblob.options.CreateContainerOptions;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.blob.xml.AccountNameEnumerationResultsHandler;
|
import org.jclouds.azureblob.xml.AccountNameEnumerationResultsHandler;
|
||||||
import org.jclouds.azure.storage.blob.xml.ContainerNameEnumerationResultsHandler;
|
import org.jclouds.azureblob.xml.ContainerNameEnumerationResultsHandler;
|
||||||
import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
|
import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
|
||||||
import org.jclouds.azure.storage.options.ListOptions;
|
import org.jclouds.azure.storage.options.ListOptions;
|
||||||
import org.jclouds.blobstore.functions.ReturnNullOnContainerNotFound;
|
import org.jclouds.blobstore.functions.ReturnNullOnContainerNotFound;
|
|
@ -17,11 +17,11 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob;
|
package org.jclouds.azureblob;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.azure.storage.blob.options.CreateContainerOptions.Builder.withMetadata;
|
import static org.jclouds.azureblob.options.CreateContainerOptions.Builder.withMetadata;
|
||||||
import static org.jclouds.azure.storage.blob.options.CreateContainerOptions.Builder.withPublicAcl;
|
import static org.jclouds.azureblob.options.CreateContainerOptions.Builder.withPublicAcl;
|
||||||
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
import static org.jclouds.azure.storage.options.ListOptions.Builder.includeMetadata;
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
import static org.testng.Assert.assertTrue;
|
import static org.testng.Assert.assertTrue;
|
||||||
|
@ -35,11 +35,11 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.jclouds.Constants;
|
import org.jclouds.Constants;
|
||||||
import org.jclouds.azure.storage.AzureStorageResponseException;
|
import org.jclouds.azure.storage.AzureStorageResponseException;
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.azure.storage.options.ListOptions;
|
import org.jclouds.azure.storage.options.ListOptions;
|
||||||
import org.jclouds.blobstore.BlobStoreContext;
|
import org.jclouds.blobstore.BlobStoreContext;
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.binders;
|
package org.jclouds.azureblob.binders;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ import java.util.Properties;
|
||||||
|
|
||||||
import javax.ws.rs.HttpMethod;
|
import javax.ws.rs.HttpMethod;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
import org.jclouds.azure.storage.blob.domain.AzureBlob;
|
import org.jclouds.azureblob.domain.AzureBlob;
|
||||||
import org.jclouds.http.HttpRequest;
|
import org.jclouds.http.HttpRequest;
|
||||||
import org.jclouds.io.Payload;
|
import org.jclouds.io.Payload;
|
||||||
import org.jclouds.io.Payloads;
|
import org.jclouds.io.Payloads;
|
||||||
|
@ -151,4 +151,4 @@ public class BindAzureBlobMetadataToRequestTest extends RestClientTest<AzureBlob
|
||||||
public RestContextSpec<?, ?> createContextSpec() {
|
public RestContextSpec<?, ?> createContextSpec() {
|
||||||
return new RestContextFactory().createContextSpec("azureblob", "identity", "credential", new Properties());
|
return new RestContextFactory().createContextSpec("azureblob", "identity", "credential", new Properties());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,15 +17,15 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore;
|
package org.jclouds.azureblob.blobstore;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.AzureBlobAsyncClient;
|
import org.jclouds.azureblob.AzureBlobAsyncClient;
|
||||||
import org.jclouds.azure.storage.blob.config.AzureBlobRestClientModule;
|
import org.jclouds.azureblob.config.AzureBlobRestClientModule;
|
||||||
import org.jclouds.blobstore.BlobRequestSigner;
|
import org.jclouds.blobstore.BlobRequestSigner;
|
||||||
import org.jclouds.blobstore.domain.Blob;
|
import org.jclouds.blobstore.domain.Blob;
|
||||||
import org.jclouds.blobstore.domain.Blob.Factory;
|
import org.jclouds.blobstore.domain.Blob.Factory;
|
||||||
|
@ -143,4 +143,4 @@ public class AzureBlobRequestSignerTest extends RestClientTest<AzureBlobAsyncCli
|
||||||
return new RestContextFactory().createContextSpec("azureblob", "identity", "credential", new Properties());
|
return new RestContextFactory().createContextSpec("azureblob", "identity", "credential", new Properties());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,11 +17,11 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.config;
|
package org.jclouds.azureblob.blobstore.config;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.blobstore.strategy.FindMD5InBlobProperties;
|
import org.jclouds.azureblob.blobstore.strategy.FindMD5InBlobProperties;
|
||||||
import org.jclouds.blobstore.BlobStoreContext;
|
import org.jclouds.blobstore.BlobStoreContext;
|
||||||
import org.jclouds.blobstore.internal.BlobStoreContextImpl;
|
import org.jclouds.blobstore.internal.BlobStoreContextImpl;
|
||||||
import org.jclouds.blobstore.strategy.ContainsValueInListStrategy;
|
import org.jclouds.blobstore.strategy.ContainsValueInListStrategy;
|
||||||
|
@ -56,4 +56,4 @@ public class AzureBlobStoreModuleTest {
|
||||||
|
|
||||||
assertEquals(valueList.getClass(), FindMD5InBlobProperties.class);
|
assertEquals(valueList.getClass(), FindMD5InBlobProperties.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,11 +17,11 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.options.ListBlobsOptions;
|
import org.jclouds.azureblob.options.ListBlobsOptions;
|
||||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
@ -55,4 +55,4 @@ public class ListBlobsOptionsToListOptions implements
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,17 +17,17 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.functions;
|
package org.jclouds.azureblob.blobstore.functions;
|
||||||
|
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.domain.MutableBlobProperties;
|
import org.jclouds.azureblob.domain.MutableBlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.HashSetListBlobsResponse;
|
import org.jclouds.azureblob.domain.internal.HashSetListBlobsResponse;
|
||||||
import org.jclouds.blobstore.domain.BlobMetadata;
|
import org.jclouds.blobstore.domain.BlobMetadata;
|
||||||
import org.jclouds.blobstore.domain.PageSet;
|
import org.jclouds.blobstore.domain.PageSet;
|
||||||
import org.jclouds.blobstore.domain.StorageMetadata;
|
import org.jclouds.blobstore.domain.StorageMetadata;
|
||||||
|
@ -85,4 +85,4 @@ public class ResourceToListBlobsResponse implements
|
||||||
return new HashSetListBlobsResponse(contents, null, null, null, null, list.getNextMarker(),
|
return new HashSetListBlobsResponse(contents, null, null, null, null, list.getNextMarker(),
|
||||||
"/", commonPrefixes);
|
"/", commonPrefixes);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseContainerIntegrationTest;
|
import org.jclouds.blobstore.integration.internal.BaseContainerIntegrationTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class AzureBlobContainerIntegrationLiveTest extends BaseContainerIntegrationTest {
|
public class AzureBlobContainerIntegrationLiveTest extends BaseContainerIntegrationTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest;
|
import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = { "live" })
|
@Test(groups = { "live" })
|
||||||
public class AzureBlobContainerLiveTest extends BaseContainerLiveTest {
|
public class AzureBlobContainerLiveTest extends BaseContainerLiveTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseInputStreamMapIntegrationTest;
|
import org.jclouds.blobstore.integration.internal.BaseInputStreamMapIntegrationTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class AzureBlobInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest {
|
public class AzureBlobInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
@ -52,4 +52,4 @@ public class AzureBlobIntegrationLiveTest extends BaseBlobIntegrationTest {
|
||||||
assert blob.getPayload().getContentMetadata().getContentDisposition() == null;
|
assert blob.getPayload().getContentMetadata().getContentDisposition() == null;
|
||||||
assert blob.getMetadata().getContentMetadata().getContentDisposition() == null;
|
assert blob.getMetadata().getContentMetadata().getContentDisposition() == null;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseBlobLiveTest;
|
import org.jclouds.blobstore.integration.internal.BaseBlobLiveTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = { "live" })
|
@Test(groups = { "live" })
|
||||||
public class AzureBlobLiveTest extends BaseBlobLiveTest {
|
public class AzureBlobLiveTest extends BaseBlobLiveTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseBlobMapIntegrationTest;
|
import org.jclouds.blobstore.integration.internal.BaseBlobMapIntegrationTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class AzureBlobMapIntegrationLiveTest extends BaseBlobMapIntegrationTest {
|
public class AzureBlobMapIntegrationLiveTest extends BaseBlobMapIntegrationTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest;
|
import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -28,4 +28,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = "live")
|
@Test(groups = "live")
|
||||||
public class AzureBlobServiceIntegrationLiveTest extends BaseServiceIntegrationTest {
|
public class AzureBlobServiceIntegrationLiveTest extends BaseServiceIntegrationTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest;
|
import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
@ -29,4 +29,4 @@ import org.testng.annotations.Test;
|
||||||
@Test(groups = { "live" })
|
@Test(groups = { "live" })
|
||||||
public class AzureBlobSignerLiveTest extends BaseBlobSignerLiveTest {
|
public class AzureBlobSignerLiveTest extends BaseBlobSignerLiveTest {
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.blobstore.integration;
|
package org.jclouds.azureblob.blobstore.integration;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ public class AzureBlobTestInitializer extends TransientBlobStoreTestInitializer
|
||||||
new Log4JLoggingModule()), setupProperties(endpoint, apiversion, identity, credential));
|
new Log4JLoggingModule()), setupProperties(endpoint, apiversion, identity, credential));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.options;
|
package org.jclouds.azureblob.options;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.options;
|
package org.jclouds.azureblob.options;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.predicates.validators;
|
package org.jclouds.azureblob.predicates.validators;
|
||||||
|
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
import org.jclouds.azure.storage.blob.predicates.validators.ContainerNameValidator;
|
import org.jclouds.azureblob.predicates.validators.ContainerNameValidator;
|
||||||
|
|
||||||
public class ContainerNameValidatorTest {
|
public class ContainerNameValidatorTest {
|
||||||
|
|
||||||
|
@ -99,4 +99,4 @@ public class ContainerNameValidatorTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.xml;
|
package org.jclouds.azureblob.xml;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ import java.io.InputStream;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.ContainerProperties;
|
import org.jclouds.azureblob.domain.ContainerProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.ContainerPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.ContainerPropertiesImpl;
|
||||||
import org.jclouds.azure.storage.domain.BoundedSet;
|
import org.jclouds.azure.storage.domain.BoundedSet;
|
||||||
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
import org.jclouds.azure.storage.domain.internal.BoundedHashSet;
|
||||||
import org.jclouds.date.DateService;
|
import org.jclouds.date.DateService;
|
||||||
|
@ -57,7 +57,7 @@ public class AccountNameEnumerationResultsHandlerTest extends BaseHandlerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testApplyInputStream() {
|
public void testApplyInputStream() {
|
||||||
InputStream is = getClass().getResourceAsStream("/blob/test_list_containers.xml");
|
InputStream is = getClass().getResourceAsStream("/test_list_containers.xml");
|
||||||
SortedSet<ContainerProperties> contents = Sets.newTreeSet();
|
SortedSet<ContainerProperties> contents = Sets.newTreeSet();
|
||||||
contents.add(new ContainerPropertiesImpl(URI
|
contents.add(new ContainerPropertiesImpl(URI
|
||||||
.create("http://myaccount.blob.core.windows.net/audio"), dateService
|
.create("http://myaccount.blob.core.windows.net/audio"), dateService
|
||||||
|
@ -94,7 +94,7 @@ public class AccountNameEnumerationResultsHandlerTest extends BaseHandlerTest {
|
||||||
.create("http://myaccount.blob.core.windows.net/textfiles"), dateService
|
.create("http://myaccount.blob.core.windows.net/textfiles"), dateService
|
||||||
.rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps
|
.rfc822DateParse("Wed, 15 Aug 2008 20:39:39 GMT"), "0x8CACB9BD7BACAC3", Maps
|
||||||
.<String, String> newHashMap()));
|
.<String, String> newHashMap()));
|
||||||
InputStream is = getClass().getResourceAsStream("/blob/test_list_containers_options.xml");
|
InputStream is = getClass().getResourceAsStream("/test_list_containers_options.xml");
|
||||||
BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI
|
BoundedSet<ContainerProperties> list = new BoundedHashSet<ContainerProperties>(contents, URI
|
||||||
.create("http://myaccount.blob.core.windows.net"), "prefix", "marker", 1, "video");
|
.create("http://myaccount.blob.core.windows.net"), "prefix", "marker", 1, "video");
|
||||||
BoundedSet<ContainerProperties> result = (BoundedSet<ContainerProperties>) factory.create(
|
BoundedSet<ContainerProperties> result = (BoundedSet<ContainerProperties>) factory.create(
|
|
@ -17,7 +17,7 @@
|
||||||
* ====================================================================
|
* ====================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.azure.storage.blob.xml;
|
package org.jclouds.azureblob.xml;
|
||||||
|
|
||||||
import static org.testng.Assert.assertEquals;
|
import static org.testng.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ import java.io.InputStream;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobProperties;
|
import org.jclouds.azureblob.domain.BlobProperties;
|
||||||
import org.jclouds.azure.storage.blob.domain.BlobType;
|
import org.jclouds.azureblob.domain.BlobType;
|
||||||
import org.jclouds.azure.storage.blob.domain.LeaseStatus;
|
import org.jclouds.azureblob.domain.LeaseStatus;
|
||||||
import org.jclouds.azure.storage.blob.domain.ListBlobsResponse;
|
import org.jclouds.azureblob.domain.ListBlobsResponse;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.BlobPropertiesImpl;
|
import org.jclouds.azureblob.domain.internal.BlobPropertiesImpl;
|
||||||
import org.jclouds.azure.storage.blob.domain.internal.HashSetListBlobsResponse;
|
import org.jclouds.azureblob.domain.internal.HashSetListBlobsResponse;
|
||||||
import org.jclouds.date.DateService;
|
import org.jclouds.date.DateService;
|
||||||
import org.jclouds.http.functions.BaseHandlerTest;
|
import org.jclouds.http.functions.BaseHandlerTest;
|
||||||
import org.testng.annotations.BeforeTest;
|
import org.testng.annotations.BeforeTest;
|
||||||
|
@ -58,7 +58,7 @@ public class ContainerNameEnumerationResultsHandlerTest extends BaseHandlerTest
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testApplyInputStream() {
|
public void testApplyInputStream() {
|
||||||
InputStream is = getClass().getResourceAsStream("/blob/test_list_blobs.xml");
|
InputStream is = getClass().getResourceAsStream("/test_list_blobs.xml");
|
||||||
Set<BlobProperties> contents = Sets.newTreeSet();
|
Set<BlobProperties> contents = Sets.newTreeSet();
|
||||||
contents.add(new BlobPropertiesImpl(BlobType.BLOCK_BLOB, "blob1.txt", URI
|
contents.add(new BlobPropertiesImpl(BlobType.BLOCK_BLOB, "blob1.txt", URI
|
||||||
.create("http://myaccount.blob.core.windows.net/mycontainer/blob1.txt"), dateService
|
.create("http://myaccount.blob.core.windows.net/mycontainer/blob1.txt"), dateService
|
||||||
|
@ -85,7 +85,7 @@ public class ContainerNameEnumerationResultsHandlerTest extends BaseHandlerTest
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testOptions() {
|
public void testOptions() {
|
||||||
InputStream is = getClass().getResourceAsStream("/blob/test_list_blobs_options.xml");
|
InputStream is = getClass().getResourceAsStream("/test_list_blobs_options.xml");
|
||||||
Set<BlobProperties> contents = Sets.newTreeSet();
|
Set<BlobProperties> contents = Sets.newTreeSet();
|
||||||
contents.add(new BlobPropertiesImpl(BlobType.BLOCK_BLOB, "a", URI
|
contents.add(new BlobPropertiesImpl(BlobType.BLOCK_BLOB, "a", URI
|
||||||
.create("https://jclouds.blob.core.windows.net/adriancole-blobstore3/a"), dateService
|
.create("https://jclouds.blob.core.windows.net/adriancole-blobstore3/a"), dateService
|
|
@ -0,0 +1,137 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2009 Cloud Conscious, LLC.
|
||||||
|
<info@cloudconscious.com>
|
||||||
|
|
||||||
|
====================================================================
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
|
||||||
|
applicable law or agreed to in writing, software distributed
|
||||||
|
under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions
|
||||||
|
and limitations under the License.
|
||||||
|
====================================================================
|
||||||
|
-->
|
||||||
|
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
For more configuration infromation and examples see the Apache
|
||||||
|
Log4j website: http://logging.apache.org/log4j/
|
||||||
|
-->
|
||||||
|
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
|
||||||
|
debug="false">
|
||||||
|
|
||||||
|
<!-- A time/date based rolling appender -->
|
||||||
|
<appender name="WIREFILE" class="org.apache.log4j.DailyRollingFileAppender">
|
||||||
|
<param name="File" value="target/test-data/jclouds-wire.log" />
|
||||||
|
<param name="Append" value="true" />
|
||||||
|
|
||||||
|
<!-- Rollover at midnight each day -->
|
||||||
|
<param name="DatePattern" value="'.'yyyy-MM-dd" />
|
||||||
|
|
||||||
|
<param name="Threshold" value="TRACE" />
|
||||||
|
|
||||||
|
<layout class="org.apache.log4j.PatternLayout">
|
||||||
|
<!-- The default pattern: Date Priority [Category] Message\n -->
|
||||||
|
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The full pattern: Date MS Priority [Category]
|
||||||
|
(Thread:NDC) Message\n <param name="ConversionPattern"
|
||||||
|
value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
|
||||||
|
-->
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- A time/date based rolling appender -->
|
||||||
|
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
|
||||||
|
<param name="File" value="target/test-data/jclouds.log" />
|
||||||
|
<param name="Append" value="true" />
|
||||||
|
|
||||||
|
<!-- Rollover at midnight each day -->
|
||||||
|
<param name="DatePattern" value="'.'yyyy-MM-dd" />
|
||||||
|
|
||||||
|
<param name="Threshold" value="TRACE" />
|
||||||
|
|
||||||
|
<layout class="org.apache.log4j.PatternLayout">
|
||||||
|
<!-- The default pattern: Date Priority [Category] Message\n -->
|
||||||
|
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The full pattern: Date MS Priority [Category]
|
||||||
|
(Thread:NDC) Message\n <param name="ConversionPattern"
|
||||||
|
value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
|
||||||
|
-->
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
|
||||||
|
<appender-ref ref="FILE" />
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="ASYNCWIRE" class="org.apache.log4j.AsyncAppender">
|
||||||
|
<appender-ref ref="WIREFILE" />
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- A time/date based rolling appender -->
|
||||||
|
<appender name="BLOBSTOREFILE" class="org.apache.log4j.DailyRollingFileAppender">
|
||||||
|
<param name="File" value="target/test-data/jclouds-blobstore.log" />
|
||||||
|
<param name="Append" value="true" />
|
||||||
|
|
||||||
|
<!-- Rollover at midnight each day -->
|
||||||
|
<param name="DatePattern" value="'.'yyyy-MM-dd" />
|
||||||
|
|
||||||
|
<param name="Threshold" value="TRACE" />
|
||||||
|
|
||||||
|
<layout class="org.apache.log4j.PatternLayout">
|
||||||
|
<!-- The default pattern: Date Priority [Category] Message\n -->
|
||||||
|
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The full pattern: Date MS Priority [Category]
|
||||||
|
(Thread:NDC) Message\n <param name="ConversionPattern"
|
||||||
|
value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
|
||||||
|
-->
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="ASYNCBLOBSTORE" class="org.apache.log4j.AsyncAppender">
|
||||||
|
<appender-ref ref="BLOBSTOREFILE" />
|
||||||
|
</appender>
|
||||||
|
<!-- ================ -->
|
||||||
|
<!-- Limit categories -->
|
||||||
|
<!-- ================ -->
|
||||||
|
<category name="jclouds.blobstore">
|
||||||
|
<priority value="TRACE" />
|
||||||
|
<appender-ref ref="ASYNCBLOBSTORE" />
|
||||||
|
</category>
|
||||||
|
|
||||||
|
<category name="org.jclouds">
|
||||||
|
<priority value="DEBUG" />
|
||||||
|
<appender-ref ref="ASYNC" />
|
||||||
|
</category>
|
||||||
|
|
||||||
|
<category name="jclouds.headers">
|
||||||
|
<priority value="DEBUG" />
|
||||||
|
<appender-ref ref="ASYNCWIRE" />
|
||||||
|
</category>
|
||||||
|
|
||||||
|
<category name="jclouds.wire">
|
||||||
|
<priority value="DEBUG" />
|
||||||
|
<appender-ref ref="ASYNCWIRE" />
|
||||||
|
</category>
|
||||||
|
<!-- ======================= -->
|
||||||
|
<!-- Setup the Root category -->
|
||||||
|
<!-- ======================= -->
|
||||||
|
|
||||||
|
<root>
|
||||||
|
<priority value="WARN" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</log4j:configuration>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue