You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Michelle Zhang <no...@github.com> on 2017/07/26 00:05:28 UTC
[jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
In this patch, we introduce azure queue storage as a new queue provider.
Supported API:
- Queue Create
- Queue List
- Queue Delete
- Message Post
- Message Get (Batch)
- Message Delete
Doc: https://docs.microsoft.com/en-us/rest/api/storageservices/queue-service-rest-api
You can view, comment on, or merge this pull request online at:
https://github.com/jclouds/jclouds-labs/pull/405
-- Commit Summary --
* Add Azure queue storage as new provider.
-- File Changes --
A azure-queue-storage/README.txt (6)
A azure-queue-storage/pom.xml (111)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/AzureStorageQueueApi.java (33)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/AzureStorageQueueApiMetadata.java (80)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/AzureStorageQueueProviderMetadata.java (65)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/AzureStorageResponseException.java (72)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/config/AzureStorageQueueModule.java (67)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/AzureStorageError.java (114)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/BoundedSet.java (33)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/MessageResponse/GetQueueResponse.java (45)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/MessageResponse/PostQueueResponse.java (41)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/Queue.java (53)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/QueueMessage.java (105)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/QueueResponse/CreateQueueResponse.java (30)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/QueueResponse/DeleteQueueResponse.java (31)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/QueueResponse/ListQueueResponse.java (43)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/features/MessageApi.java (44)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/features/QueueApi.java (53)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java (205)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/parser/ParseCreateQueueResponse.java (33)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/parser/ParseDeleteQueueResponse.java (33)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/reference/AzureStorageHeaders.java (46)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/util/AzureStorageUtils.java (59)
A azure-queue-storage/src/main/java/org/jclouds/azure/storage/xml/ErrorHandler.java (53)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/AzureQueueProviderMetadataTest.java (27)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureMessageApiLiveTest.java (38)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureMessageApiMockTest.java (74)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java (87)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiMockTest.java (77)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueTestUtils.java (129)
A azure-queue-storage/src/test/java/org/jclouds/azure/storage/internal/BaseAzureQueueApiLiveTest.java (34)
A azure-queue-storage/src/test/resources/get_queue_response.xml (19)
A azure-queue-storage/src/test/resources/get_queue_services_response.xml (40)
A azure-queue-storage/src/test/resources/list_queue_request.json (0)
A azure-queue-storage/src/test/resources/list_queue_response.xml (18)
A azure-queue-storage/src/test/resources/log4j.xml (106)
A azure-queue-storage/src/test/resources/post_queue_request.xml (3)
A azure-queue-storage/src/test/resources/post_queue_response.xml (9)
M pom.xml (1)
-- Patch Links --
https://github.com/jclouds/jclouds-labs/pull/405.patch
https://github.com/jclouds/jclouds-labs/pull/405.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> + 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.apache.jclouds.labs</groupId>
+ <artifactId>jclouds-labs</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>azure-queue-storage</artifactId>
+ <name>jclouds Azure Storage queue provider</name>
+ <description>jclouds components to access Azure queue storage Service</description>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <test.azure-queue-storage.identity>${test.azure-queue-storage.identity}</test.azure-queue-storage.identity>
+ <test.azure-queue-storage.credential>${test.azure-queue-storage.credential}</test.azure-queue-storage.credential>
These should not be self-referential. Instead set to `FIXME_IDENTITY` and `FIXME_CREDENTIAL` as in the b2 provider. This will resolve some of your CloudBees issues.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#pullrequestreview-52581099
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
For the style check I run `mvn checkstyle:checkstyle -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain` locally but can not reproduce the failures.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318525869
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
You're right -- you actually want a `ResponseParser` which looks at the HTTP code and return a boolean. You can use the existing `ReturnTrueIf2xx`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129731780
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
How to throw an exception for this? Throw in ResponseParser or any annotation for throw an exception?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129723646
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
Closed #405.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#event-1235868524
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import org.jclouds.util.Strings2;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+final class AzureQueueTestUtils {
+ static AzureStorageQueueApi api(String uri, String provider, Properties overrides) {
+ Set<Module> modules = ImmutableSet.<Module> of(
+ new ExecutorServiceModule(MoreExecutors.sameThreadExecutor()));
+
+ return ContextBuilder.newBuilder(provider)
+ .credentials("ACCOUNT_ID", "APPLICATION_KEY")
That failure is from SharedKeyLiteAuthentication because "APPLICATION_KEY" is not a valid format for key. Or I can add a fake key (but match the format).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129990556
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + */
+package org.jclouds.azure.storage;
+
+import org.jclouds.azure.storage.domain.AzureStorageError;
+import org.jclouds.http.HttpCommand;
+import org.jclouds.http.HttpResponse;
+import org.jclouds.http.HttpResponseException;
+
+/**
+ * Encapsulates an Error from Azure Storage Services.
+ *
+ * @see <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/UsingRESTError.html" />
+ * @see AzureStorageError
+ * @see org.jclouds.aws.handlers.ParseAzureStorageErrorFromXmlContent
+ */
+public class AzureStorageResponseException extends HttpResponseException {
Deleted.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733818
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>azure-queue-storage</artifactId>
+ <name>jclouds Azure Storage queue provider</name>
+ <description>jclouds components to access Azure queue storage Service</description>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <!--<test.azureblob.endpoint>https://${jclouds.identity}.blob.core.windows.net</test.azureblob.endpoint>-->
+ <test.azureblob.api-version>2016-05-31</test.azureblob.api-version>
+ <!--<test.azureblob.build-version />-->
+ <!--<test.azureblob.identity>${test.azure.identity}</test.azureblob.identity>-->
+ <!--<test.azureblob.credential>${test.azure.credential}</test.azureblob.credential>-->
+
+ <!--<jclouds.osgi.export>org.jclouds.azureblob*;version="${project.version}",org.jclouds.azure.storage*;version="${project.version}"</jclouds.osgi.export>-->
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733785
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + * 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.features;
+
+import org.jclouds.azure.storage.domain.internals.QueueResponse.CreateQueueResponse;
+import org.jclouds.azure.storage.domain.internals.QueueResponse.DeleteQueueResponse;
+import org.jclouds.azure.storage.domain.internals.QueueResponse.ListQueueResponse;
+import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
+import org.jclouds.azure.storage.parser.ParseCreateQueueResponse;
+import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
Done
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733888
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + */
+public final class AzureStorageHeaders {
+
+ public static final String CACHE_CONTROL = "x-ms-blob-cache-control";
+ public static final String CONTENT_DISPOSITION = "x-ms-blob-content-disposition";
+ public static final String CONTENT_ENCODING = "x-ms-blob-content-encoding";
+ public static final String CONTENT_LANGUAGE = "x-ms-blob-content-language";
+ public static final String CONTENT_TYPE = "x-ms-blob-content-type";
+
+ public static final String USER_METADATA_PREFIX = "x-ms-meta-";
+
+ public static final String COPY_SOURCE = "x-ms-copy-source";
+ public static final String COPY_SOURCE_IF_MODIFIED_SINCE = "x-ms-source-if-modified-since";
+ public static final String COPY_SOURCE_IF_UNMODIFIED_SINCE = "x-ms-source-if-unmodified-since";
+ public static final String COPY_SOURCE_IF_MATCH = "x-ms-source-if-match";
+ public static final String COPY_SOURCE_IF_NONE_MATCH = "x-ms-source-if-none-match";
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733945
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
Also should we also apply same change to Delete?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129727560
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + SharedKeyLiteAuthentication signer;
+
+ @Inject
+ ParseSax.Factory factory;
+
+ @Inject
+ Provider<ErrorHandler> errorHandlerProvider;
+
+ public AzureStorageError parseAzureStorageErrorFromContent(HttpCommand command,
+ HttpResponse response, InputStream content) throws HttpException {
+ AzureStorageError error = factory.create(errorHandlerProvider.get()).parse(content);
+ error.setRequestId(response.getFirstHeaderOrNull(AzureStorageHeaders.REQUEST_ID));
+ if ("AuthenticationFailed".equals(error.getCode())) {
+ // this signature is incorrect for URLs from AzureBlobRequestSigner
+ error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
+ error.setSignature(signer.signString(error.getStringSigned()));
Deleted.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733968
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> @@ -0,0 +1,3 @@
+<QueueMessage>
Remove message from queue review. Repeated a few times.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#pullrequestreview-52842995
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + *
+ * 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.xml;
+
+import org.jclouds.azure.storage.domain.AzureStorageError;
+import org.jclouds.http.functions.ParseSax;
+
+/**
+ * Parses the error from the Amazon S3 REST API.
Deleted.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733987
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
+
+ @Named("azure_storage_queue_list")
+ @GET
+ @QueryParams(keys = "comp", values = "list")
+ @JAXBResponseParser
+ ListQueueResponse list();
+
+ @Named("azure_storage_queue_delete")
+ @DELETE
+ @Path("/{queueName}")
+ @ResponseParser(ParseDeleteQueueResponse.class)
+ DeleteQueueResponse delete(@PathParam("queueName") String queueName);
Done
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733913
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul requested changes on this pull request.
Please narrow this pull request to just the skeleton and queue code. Also address all error-prone and Checkstyle issues.
> + <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>azure-queue-storage</artifactId>
+ <name>jclouds Azure Storage queue provider</name>
+ <description>jclouds components to access Azure queue storage Service</description>
+ <packaging>bundle</packaging>
+
+ <properties>
+ <!--<test.azureblob.endpoint>https://${jclouds.identity}.blob.core.windows.net</test.azureblob.endpoint>-->
+ <test.azureblob.api-version>2016-05-31</test.azureblob.api-version>
+ <!--<test.azureblob.build-version />-->
+ <!--<test.azureblob.identity>${test.azure.identity}</test.azureblob.identity>-->
+ <!--<test.azureblob.credential>${test.azure.credential}</test.azureblob.credential>-->
+
+ <!--<jclouds.osgi.export>org.jclouds.azureblob*;version="${project.version}",org.jclouds.azure.storage*;version="${project.version}"</jclouds.osgi.export>-->
Why are these commented out?
> + <id>integration</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <!--<configuration>-->
+ <!--<systemPropertyVariables>-->
+ <!--<test.azureblob.endpoint>${test.azureblob.endpoint}</test.azureblob.endpoint>-->
+ <!--<test.azureblob.api-version>${test.azureblob.api-version}</test.azureblob.api-version>-->
+ <!--<test.azureblob.build-version>${test.azureblob.build-version}</test.azureblob.build-version>-->
+ <!--<test.azureblob.identity>${test.azureblob.identity}</test.azureblob.identity>-->
+ <!--<test.azureblob.credential>${test.azureblob.credential}</test.azureblob.credential>-->
+ <!--<jclouds.blobstore.httpstream.url>${jclouds.blobstore.httpstream.url}</jclouds.blobstore.httpstream.url>-->
+ <!--<jclouds.blobstore.httpstream.md5>${jclouds.blobstore.httpstream.md5}</jclouds.blobstore.httpstream.md5>-->
+ <!--</systemPropertyVariables>-->
+ <!--</configuration>-->
More commented out code.
> +
+package org.jclouds.azure.storage;
+
+import org.jclouds.azure.storage.features.MessageApi;
+import org.jclouds.azure.storage.features.QueueApi;
+import org.jclouds.rest.annotations.Delegate;
+
+import java.io.Closeable;
+
+public interface AzureStorageQueueApi extends Closeable {
+
+ @Delegate
+ QueueApi getQueueApi();
+
+ @Delegate
+ MessageApi getMessageApi();
Please remove all message functionality which you can submit in a subsequent pull request.
> + */
+package org.jclouds.azure.storage;
+
+import org.jclouds.azure.storage.domain.AzureStorageError;
+import org.jclouds.http.HttpCommand;
+import org.jclouds.http.HttpResponse;
+import org.jclouds.http.HttpResponseException;
+
+/**
+ * Encapsulates an Error from Azure Storage Services.
+ *
+ * @see <a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/UsingRESTError.html" />
+ * @see AzureStorageError
+ * @see org.jclouds.aws.handlers.ParseAzureStorageErrorFromXmlContent
+ */
+public class AzureStorageResponseException extends HttpResponseException {
Where do you use this code?
> +import org.jclouds.date.TimeStamp;
+import org.jclouds.json.config.GsonModule;
+import org.jclouds.rest.ConfiguresHttpApi;
+import org.jclouds.rest.config.HttpApiModule;
+
+import javax.inject.Named;
+import java.util.concurrent.TimeUnit;
+
+import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL;
+
+@ConfiguresHttpApi
+public class AzureStorageQueueModule extends HttpApiModule<AzureStorageQueueApi> {
+ @Override
+ protected void configure() {
+ bind(GsonModule.DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
+ super.configure();
Call `super` first.
> + * 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.domain;
+
+import com.google.common.collect.Maps;
+
+import java.util.Map;
+
+/**
+ * When an Azure Storage request is in error, the client receives an error response.
+ *
+ * @see <a href="http://msdn.microsoft.com/en-us/library/dd573365.aspx" />
+ */
+public class AzureStorageError {
Rename to `AzureQueueStorageError`.
> + * 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.domain;
+
+import java.net.URI;
+import java.util.Set;
+
+public interface BoundedSet<T> extends Set<T> {
Remove unused code.
> +
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Queue {
+ @XmlElement(name = "Name")
+ private String name;
+
+ // TODO: remove?
Remove `url` field which is no longer supported:
https://docs.microsoft.com/en-us/rest/api/storageservices/list-queues1
> + * 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.features;
+
+import org.jclouds.azure.storage.domain.internals.QueueResponse.CreateQueueResponse;
+import org.jclouds.azure.storage.domain.internals.QueueResponse.DeleteQueueResponse;
+import org.jclouds.azure.storage.domain.internals.QueueResponse.ListQueueResponse;
+import org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication;
+import org.jclouds.azure.storage.parser.ParseCreateQueueResponse;
+import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
error-prone does not allow wildcard imports. See the CloudBees log.
> +import java.util.Collection;
+import java.util.Set;
+
+import static com.google.common.io.BaseEncoding.base64;
+import static com.google.common.io.ByteStreams.readBytes;
+import static org.jclouds.crypto.Macs.asByteProcessor;
+import static org.jclouds.util.Patterns.NEWLINE_PATTERN;
+import static org.jclouds.util.Strings2.toInputStream;
+
+/**
+ * Signs the Azure Storage request.
+ *
+ * @see <a href= "http://msdn.microsoft.com/en-us/library/dd179428.aspx" />
+ */
+@Singleton
+public class SharedKeyLiteAuthentication implements HttpRequestFilter {
azureblob and gogrid have identical classes. We should factor these out into some common location. Please open a JIRA issue and add a TODO here.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
This is a wacky interface -- instead can you throw an exception when create fails?
> + @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
+
+ @Named("azure_storage_queue_list")
+ @GET
+ @QueryParams(keys = "comp", values = "list")
+ @JAXBResponseParser
+ ListQueueResponse list();
+
+ @Named("azure_storage_queue_delete")
+ @DELETE
+ @Path("/{queueName}")
+ @ResponseParser(ParseDeleteQueueResponse.class)
+ DeleteQueueResponse delete(@PathParam("queueName") String queueName);
Same criticism.
> + */
+public final class AzureStorageHeaders {
+
+ public static final String CACHE_CONTROL = "x-ms-blob-cache-control";
+ public static final String CONTENT_DISPOSITION = "x-ms-blob-content-disposition";
+ public static final String CONTENT_ENCODING = "x-ms-blob-content-encoding";
+ public static final String CONTENT_LANGUAGE = "x-ms-blob-content-language";
+ public static final String CONTENT_TYPE = "x-ms-blob-content-type";
+
+ public static final String USER_METADATA_PREFIX = "x-ms-meta-";
+
+ public static final String COPY_SOURCE = "x-ms-copy-source";
+ public static final String COPY_SOURCE_IF_MODIFIED_SINCE = "x-ms-source-if-modified-since";
+ public static final String COPY_SOURCE_IF_UNMODIFIED_SINCE = "x-ms-source-if-unmodified-since";
+ public static final String COPY_SOURCE_IF_MATCH = "x-ms-source-if-match";
+ public static final String COPY_SOURCE_IF_NONE_MATCH = "x-ms-source-if-none-match";
Remove all unused fields.
> + * 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.reference;
+
+/**
+ * Additional headers specified by Azure Storage REST API.
+ *
+ * @see <a href="http://msdn.microsoft.com/en-us/library/dd179357.aspx" />
+ */
+public final class AzureStorageHeaders {
Rename to `AzureQueueStorageHeaders`.
> + SharedKeyLiteAuthentication signer;
+
+ @Inject
+ ParseSax.Factory factory;
+
+ @Inject
+ Provider<ErrorHandler> errorHandlerProvider;
+
+ public AzureStorageError parseAzureStorageErrorFromContent(HttpCommand command,
+ HttpResponse response, InputStream content) throws HttpException {
+ AzureStorageError error = factory.create(errorHandlerProvider.get()).parse(content);
+ error.setRequestId(response.getFirstHeaderOrNull(AzureStorageHeaders.REQUEST_ID));
+ if ("AuthenticationFailed".equals(error.getCode())) {
+ // this signature is incorrect for URLs from AzureBlobRequestSigner
+ error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
+ error.setSignature(signer.signString(error.getStringSigned()));
What does this code do?
> + *
+ * 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.xml;
+
+import org.jclouds.azure.storage.domain.AzureStorageError;
+import org.jclouds.http.functions.ParseSax;
+
+/**
+ * Parses the error from the Amazon S3 REST API.
Bad comment.
> @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<StorageServiceProperties>
+ <Logging>
+ <Version>version-number</Version>
+ <Delete>true|false</Delete>
Not sure what this is but remove it since it is invalid input.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#pullrequestreview-52235800
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
Please address all the comments and fix the broken CloudBees build:
https://jclouds.ci.cloudbees.com/job/jclouds-labs-pull-requests/1812/console
Even with workarounds I cannot test your code locally due to failures:
```
testCreate(org.jclouds.azure.storage.features.AzureQueueApiMockTest) Time elapsed: 2.928 sec <<< FAILURE!
java.lang.IllegalArgumentException: com.google.common.io.BaseEncoding$DecodingException: Unrecognized character: _
at com.google.common.io.BaseEncoding$Alphabet.decode(BaseEncoding.java:503)
at com.google.common.io.BaseEncoding$StandardBaseEncoding$2.read(BaseEncoding.java:675)
at com.google.common.io.BaseEncoding.decodeChecked(BaseEncoding.java:245)
at com.google.common.io.BaseEncoding.decode(BaseEncoding.java:226)
at org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication.signString(SharedKeyLiteAuthentication.java:139)
at org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication.calculateSignature(SharedKeyLiteAuthentication.java:131)
at org.jclouds.azure.storage.filters.SharedKeyLiteAuthentication.filter(SharedKeyLiteAuthentication.java:87)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:92)
at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy43.create(Unknown Source)
at org.jclouds.azure.storage.features.AzureQueueApiMockTest.testCreate(AzureQueueApiMockTest.java:42)
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318221537
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
CloudBees should show the Checkstyle violations after you fix the unit test failures. You can configure your IDE to use our Checkstyle configuration or run the following command:
```
mvn checkstyle:checkstyle -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318522650
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
```
$ mvn checkstyle:checkstyle -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain
Starting audit...
/home/gaul/work/jclouds-labs/azure-queue-storage/src/main/java/org/jclouds/azure/storage/domain/internals/Queue.java:0: warning: File does not end with a newline.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java:0: warning: File does not end with a newline.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java:35:24: warning: '=' is not preceded with whitespace.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java:37:10: warning: 'try' is not followed by whitespace.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java:48:24: warning: '=' is not preceded with whitespace.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiLiveTest.java:57:24: warning: '=' is not preceded with whitespace.
/home/gaul/work/jclouds-labs/azure-queue-storage/src/test/java/org/jclouds/azure/storage/features/AzureQueueApiMockTest.java:0: warning: File does not end with a newline.
Audit done.
```
Again, if you fix the unit test failures, CloudBees should show the Checkstyle violations.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318528523
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> +package org.jclouds.azure.storage.internal;
+
+import org.jclouds.apis.ApiMetadata;
+import org.jclouds.apis.BaseApiLiveTest;
+import org.jclouds.azure.storage.AzureStorageQueueApi;
+import org.jclouds.azure.storage.AzureStorageQueueApiMetadata;
+
+public class BaseAzureQueueApiLiveTest extends BaseApiLiveTest<AzureStorageQueueApi>{
+
+ protected BaseAzureQueueApiLiveTest() {
+ provider = "azure-queue-storage";
+ }
+
+ static {
+ System.setProperty("azure-queue-storage.identity", "jcloudsazure");
+ System.setProperty("azure-queue-storage.credential", "nH+KqygOYN9cy6jcYwoqY4P77F62TWzP2c8ef+0AmespWPhK0UW/HoH8vsqhC44qLTdNgnKSqyVzbtBTaZXEpQ==");
Are these your actual Azure credentials? If so please remove them and reset your credential in the Azure dashboard.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#pullrequestreview-52842959
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + <id>integration</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <!--<configuration>-->
+ <!--<systemPropertyVariables>-->
+ <!--<test.azureblob.endpoint>${test.azureblob.endpoint}</test.azureblob.endpoint>-->
+ <!--<test.azureblob.api-version>${test.azureblob.api-version}</test.azureblob.api-version>-->
+ <!--<test.azureblob.build-version>${test.azureblob.build-version}</test.azureblob.build-version>-->
+ <!--<test.azureblob.identity>${test.azureblob.identity}</test.azureblob.identity>-->
+ <!--<test.azureblob.credential>${test.azureblob.credential}</test.azureblob.credential>-->
+ <!--<jclouds.blobstore.httpstream.url>${jclouds.blobstore.httpstream.url}</jclouds.blobstore.httpstream.url>-->
+ <!--<jclouds.blobstore.httpstream.md5>${jclouds.blobstore.httpstream.md5}</jclouds.blobstore.httpstream.md5>-->
+ <!--</systemPropertyVariables>-->
+ <!--</configuration>-->
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733791
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + * 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.domain;
+
+import java.net.URI;
+import java.util.Set;
+
+public interface BoundedSet<T> extends Set<T> {
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733847
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
Sorry, I have a question about `@Fallback`, this converts an exception to a custom, but where is the original from. I just test QueueCreate, it does not have any exception when rest api response with code 204.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129731187
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> +import org.jclouds.azure.storage.parser.ParseDeleteQueueResponse;
+import org.jclouds.rest.annotations.*;
+
+import javax.inject.Named;
+import javax.ws.rs.*;
+import java.io.Closeable;
+
+@Headers(keys = "x-ms-version", values = "{jclouds.api-version}")
+@RequestFilters(SharedKeyLiteAuthentication.class)
+public interface QueueApi extends Closeable {
+
+ @Named("azure_storage_queue_create")
+ @PUT
+ @Path("/{queueName}")
+ @ResponseParser(ParseCreateQueueResponse.class)
+ CreateQueueResponse create(@PathParam("queueName") String queueName);
There are a couple ways to do this. Actually returning a boolean on creation seems to match the rest of the code base better. Look at `@Fallback(FalseIfContainerAlreadyExists.class)` in `AzureBlobClient`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129728709
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + * 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.domain;
+
+import com.google.common.collect.Maps;
+
+import java.util.Map;
+
+/**
+ * When an Azure Storage request is in error, the client receives an error response.
+ *
+ * @see <a href="http://msdn.microsoft.com/en-us/library/dd573365.aspx" />
+ */
+public class AzureStorageError {
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733841
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import java.util.Collection;
+import java.util.Set;
+
+import static com.google.common.io.BaseEncoding.base64;
+import static com.google.common.io.ByteStreams.readBytes;
+import static org.jclouds.crypto.Macs.asByteProcessor;
+import static org.jclouds.util.Patterns.NEWLINE_PATTERN;
+import static org.jclouds.util.Strings2.toInputStream;
+
+/**
+ * Signs the Azure Storage request.
+ *
+ * @see <a href= "http://msdn.microsoft.com/en-us/library/dd179428.aspx" />
+ */
+@Singleton
+public class SharedKeyLiteAuthentication implements HttpRequestFilter {
Done
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733923
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
Patch updated. PTAL.
There are another 2 failures which may need your help:
1. Missing system variables, See here: https://github.com/jclouds/jclouds-labs/pull/405/files#diff-57c740ed0979ce85c8d059a120e1b5bbR46. We need to set that 2 var for test run. I can send you via PM.
2. Style check: Caused by: org.apache.maven.plugin.MojoFailureException: You have 7 Checkstyle violations. But it does not show any helpful details.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318518380
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Queue {
+ @XmlElement(name = "Name")
+ private String name;
+
+ // TODO: remove?
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733867
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
@q225zhan pushed 1 commit.
92b52df update
--
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405/files/8fa1da4a36f6f66a24888f69e27ca08c596657c2..92b52dfe04904bbae561e6d51f28bf171d1e9a11
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +import org.jclouds.date.TimeStamp;
+import org.jclouds.json.config.GsonModule;
+import org.jclouds.rest.ConfiguresHttpApi;
+import org.jclouds.rest.config.HttpApiModule;
+
+import javax.inject.Named;
+import java.util.concurrent.TimeUnit;
+
+import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL;
+
+@ConfiguresHttpApi
+public class AzureStorageQueueModule extends HttpApiModule<AzureStorageQueueApi> {
+ @Override
+ protected void configure() {
+ bind(GsonModule.DateAdapter.class).to(GsonModule.Iso8601DateAdapter.class);
+ super.configure();
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733831
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
GSoC has ended.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-327330685
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> +import org.jclouds.util.Strings2;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+final class AzureQueueTestUtils {
+ static AzureStorageQueueApi api(String uri, String provider, Properties overrides) {
+ Set<Module> modules = ImmutableSet.<Module> of(
+ new ExecutorServiceModule(MoreExecutors.sameThreadExecutor()));
+
+ return ContextBuilder.newBuilder(provider)
+ .credentials("ACCOUNT_ID", "APPLICATION_KEY")
You can put whatever values you want here.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r130006709
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<StorageServiceProperties>
+ <Logging>
+ <Version>version-number</Version>
+ <Delete>true|false</Delete>
Deleted.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129734004
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + * 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.reference;
+
+/**
+ * Additional headers specified by Azure Storage REST API.
+ *
+ * @see <a href="http://msdn.microsoft.com/en-us/library/dd179357.aspx" />
+ */
+public final class AzureStorageHeaders {
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733932
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
andrewgaul commented on this pull request.
> +import org.jclouds.util.Strings2;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.Set;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+final class AzureQueueTestUtils {
+ static AzureStorageQueueApi api(String uri, String provider, Properties overrides) {
+ Set<Module> modules = ImmutableSet.<Module> of(
+ new ExecutorServiceModule(MoreExecutors.sameThreadExecutor()));
+
+ return ContextBuilder.newBuilder(provider)
+ .credentials("ACCOUNT_ID", "APPLICATION_KEY")
Only the mock tests should call this method. Thus the actual values have no meaning.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#pullrequestreview-52819424
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> +
+package org.jclouds.azure.storage;
+
+import org.jclouds.azure.storage.features.MessageApi;
+import org.jclouds.azure.storage.features.QueueApi;
+import org.jclouds.rest.annotations.Delegate;
+
+import java.io.Closeable;
+
+public interface AzureStorageQueueApi extends Closeable {
+
+ @Delegate
+ QueueApi getQueueApi();
+
+ @Delegate
+ MessageApi getMessageApi();
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129733802
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
@andrewgaul PTAL. Thank you.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-317908232
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
q225zhan commented on this pull request.
> + *
+ * 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.xml;
+
+import org.jclouds.azure.storage.domain.AzureStorageError;
+import org.jclouds.http.functions.ParseSax;
+
+/**
+ * Parses the error from the Amazon S3 REST API.
Done.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#discussion_r129724327
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Andrew Gaul <no...@github.com>.
rebuild please
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318283569
Re: [jclouds/jclouds-labs] Add Azure queue storage as new provider.
(#405)
Posted by Michelle Zhang <no...@github.com>.
Also could you please commit this patch https://github.com/andrewgaul/jclouds/commit/e23a4a10006de7850eb1ea77bb7d48366db29d79. Thank you.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/405#issuecomment-318219281