[jira] [Created] (JCLOUDS-1560) can't change the fix version without reopening the bug

2020-12-07 Thread Ankur Tagra (Jira)
Ankur Tagra created JCLOUDS-1560:


 Summary: can't change the fix version without reopening the bug
 Key: JCLOUDS-1560
 URL: https://issues.apache.org/jira/browse/JCLOUDS-1560
 Project: jclouds
  Issue Type: Bug
Reporter: Ankur Tagra






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (JCLOUDS-1560) can't change the fix version without reopening the bug

2020-12-07 Thread Ankur Tagra (Jira)


 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ankur Tagra resolved JCLOUDS-1560.
--
Resolution: Fixed

> can't change the fix version without reopening the bug
> --
>
> Key: JCLOUDS-1560
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1560
> Project: jclouds
>  Issue Type: Bug
>Reporter: Ankur Tagra
>Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (JCLOUDS-1557) Azure Blob Storage: Support for Local Endpoints (eg Azurite)

2020-12-07 Thread Andrew Gaul (Jira)


 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Gaul updated JCLOUDS-1557:
-
Labels: azureblob  (was: )

> Azure Blob Storage: Support for Local Endpoints (eg Azurite)
> 
>
> Key: JCLOUDS-1557
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1557
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Dave Sloan
>Priority: Major
>  Labels: azureblob
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Azurite provides a local Azure-compatible endpoint for purposes of testing 
> without requiring network traffic or incurring costs on Azure.
> Currently while it is possible to define a custom endpoint this is not 
> respected.
> In both
> [https://github.com/apache/jclouds/blob/ba1504b38e725c45db304767ac76b2be4b71fd0d/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java#L66]
> [https://github.com/apache/jclouds/blob/ca5190636a5fc1ffe48d0d6b8087ad160c0b7d80/providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java#L95]
>  
> The `storageUrl` is hard-coded to the Azure location
> {code:java}
> this.storageUrl = URI.create("https://; + creds.get().identity + 
> ".blob.core.windows.net/");
> {code}
>  
> This should be made to respect a custom endpoint if configured, e.g.
>  
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
>  .credentials(storageAccountName, storageAccountKey)
>  .endpoint("http://localhost:1;)
>  .buildView(BlobStoreContext.class);
> {code}
> In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a 
> configurable property should be provided to change the format of the URLs 
> used by Azure to include the storage account name in the path.
>  
>  
> *Azure endpoint URL format (storage account in hostname)*
> [https://devstoreaccount1.blob.core.windows.net/]
>  
> *Azurite endpoint URL format (**storage account*  *in path)*
> [http://localhost:1/devstoreaccount1/]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (JCLOUDS-1557) Azure Blob Storage: Support for Local Endpoints (eg Azurite)

2020-12-07 Thread Andrew Gaul (Jira)


 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Gaul resolved JCLOUDS-1557.
--
Fix Version/s: 2.3.0
 Assignee: Andrew Gaul
   Resolution: Fixed

> Azure Blob Storage: Support for Local Endpoints (eg Azurite)
> 
>
> Key: JCLOUDS-1557
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1557
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Dave Sloan
>Assignee: Andrew Gaul
>Priority: Major
>  Labels: azureblob
> Fix For: 2.3.0
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Azurite provides a local Azure-compatible endpoint for purposes of testing 
> without requiring network traffic or incurring costs on Azure.
> Currently while it is possible to define a custom endpoint this is not 
> respected.
> In both
> [https://github.com/apache/jclouds/blob/ba1504b38e725c45db304767ac76b2be4b71fd0d/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java#L66]
> [https://github.com/apache/jclouds/blob/ca5190636a5fc1ffe48d0d6b8087ad160c0b7d80/providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java#L95]
>  
> The `storageUrl` is hard-coded to the Azure location
> {code:java}
> this.storageUrl = URI.create("https://; + creds.get().identity + 
> ".blob.core.windows.net/");
> {code}
>  
> This should be made to respect a custom endpoint if configured, e.g.
>  
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
>  .credentials(storageAccountName, storageAccountKey)
>  .endpoint("http://localhost:1;)
>  .buildView(BlobStoreContext.class);
> {code}
> In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a 
> configurable property should be provided to change the format of the URLs 
> used by Azure to include the storage account name in the path.
>  
>  
> *Azure endpoint URL format (storage account in hostname)*
> [https://devstoreaccount1.blob.core.windows.net/]
>  
> *Azurite endpoint URL format (**storage account*  *in path)*
> [http://localhost:1/devstoreaccount1/]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (JCLOUDS-1557) Azure Blob Storage: Support for Local Endpoints (eg Azurite)

2020-12-07 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/JCLOUDS-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17245619#comment-17245619
 ] 

ASF subversion and git services commented on JCLOUDS-1557:
--

Commit 17fd80cd5a10ed2ab6886ad436f51b62ad0a826d in jclouds's branch 
refs/heads/master from davidsloan
[ https://gitbox.apache.org/repos/asf?p=jclouds.git;h=17fd80c ]

JCLOUDS-1557 - Azure local server support

Co-authored-by: David Sloan 

> Azure Blob Storage: Support for Local Endpoints (eg Azurite)
> 
>
> Key: JCLOUDS-1557
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1557
> Project: jclouds
>  Issue Type: Improvement
>Reporter: Dave Sloan
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Azurite provides a local Azure-compatible endpoint for purposes of testing 
> without requiring network traffic or incurring costs on Azure.
> Currently while it is possible to define a custom endpoint this is not 
> respected.
> In both
> [https://github.com/apache/jclouds/blob/ba1504b38e725c45db304767ac76b2be4b71fd0d/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java#L66]
> [https://github.com/apache/jclouds/blob/ca5190636a5fc1ffe48d0d6b8087ad160c0b7d80/providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java#L95]
>  
> The `storageUrl` is hard-coded to the Azure location
> {code:java}
> this.storageUrl = URI.create("https://; + creds.get().identity + 
> ".blob.core.windows.net/");
> {code}
>  
> This should be made to respect a custom endpoint if configured, e.g.
>  
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
>  .credentials(storageAccountName, storageAccountKey)
>  .endpoint("http://localhost:1;)
>  .buildView(BlobStoreContext.class);
> {code}
> In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a 
> configurable property should be provided to change the format of the URLs 
> used by Azure to include the storage account name in the path.
>  
>  
> *Azure endpoint URL format (storage account in hostname)*
> [https://devstoreaccount1.blob.core.windows.net/]
>  
> *Azurite endpoint URL format (**storage account*  *in path)*
> [http://localhost:1/devstoreaccount1/]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (JCLOUDS-1557) Azure Blob Storage: Support for Local Endpoints (eg Azurite)

2020-12-07 Thread Andrew Gaul (Jira)


 [ 
https://issues.apache.org/jira/browse/JCLOUDS-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Gaul updated JCLOUDS-1557:
-
Component/s: jclouds-blobstore

> Azure Blob Storage: Support for Local Endpoints (eg Azurite)
> 
>
> Key: JCLOUDS-1557
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1557
> Project: jclouds
>  Issue Type: Improvement
>  Components: jclouds-blobstore
>Reporter: Dave Sloan
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Azurite provides a local Azure-compatible endpoint for purposes of testing 
> without requiring network traffic or incurring costs on Azure.
> Currently while it is possible to define a custom endpoint this is not 
> respected.
> In both
> [https://github.com/apache/jclouds/blob/ba1504b38e725c45db304767ac76b2be4b71fd0d/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSigner.java#L66]
> [https://github.com/apache/jclouds/blob/ca5190636a5fc1ffe48d0d6b8087ad160c0b7d80/providers/azureblob/src/main/java/org/jclouds/azure/storage/filters/SharedKeyLiteAuthentication.java#L95]
>  
> The `storageUrl` is hard-coded to the Azure location
> {code:java}
> this.storageUrl = URI.create("https://; + creds.get().identity + 
> ".blob.core.windows.net/");
> {code}
>  
> This should be made to respect a custom endpoint if configured, e.g.
>  
> {code:java}
> BlobStoreContext context = ContextBuilder.newBuilder("azureblob")
>  .credentials(storageAccountName, storageAccountKey)
>  .endpoint("http://localhost:1;)
>  .buildView(BlobStoreContext.class);
> {code}
> In addition, similar to the AWS S3 connector (`enableVirtualHostBuckets`), a 
> configurable property should be provided to change the format of the URLs 
> used by Azure to include the storage account name in the path.
>  
>  
> *Azure endpoint URL format (storage account in hostname)*
> [https://devstoreaccount1.blob.core.windows.net/]
>  
> *Azurite endpoint URL format (**storage account*  *in path)*
> [http://localhost:1/devstoreaccount1/]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [jclouds] gaul commented on pull request #88: JCLOUDS-1557 - Azure local server support

2020-12-07 Thread GitBox


gaul commented on pull request #88:
URL: https://github.com/apache/jclouds/pull/88#issuecomment-740314613


   Thank you for your contribution and testing @davidsloan!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jclouds] gaul merged pull request #88: JCLOUDS-1557 - Azure local server support

2020-12-07 Thread GitBox


gaul merged pull request #88:
URL: https://github.com/apache/jclouds/pull/88


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jclouds] davidsloan commented on pull request #88: JCLOUDS-1557 - Azure local server support

2020-12-07 Thread GitBox


davidsloan commented on pull request #88:
URL: https://github.com/apache/jclouds/pull/88#issuecomment-739998437


   > Please make sure Azure integration tests pass:
   > 
   > ```
   > mvn integration-test -pl :azureblob -Plive 
-Dtest.azureblob.identity="${JCLOUDS_IDENTITY}" 
-Dtest.azureblob.credential="${JCLOUDS_CREDENTIAL}"
   > ```
   
   @gaul There seem to be 4 failures when I run locally, these are present on 
`master` as well if I run the command you supplied so I don't think they can be 
related to this change.
   
   - 
testCopyIfNoneMatchNegative(org.jclouds.azureblob.blobstore.integration.AzureBlobIntegrationLiveTest)
   - 
testPutMultipartInputStream(org.jclouds.azureblob.blobstore.integration.AzureBlobIntegrationLiveTest)
   - testCopyBlobIfModifiedSince(org.jclouds.azureblob.AzureBlobClientLiveTest)
   - testCopyBlobIfNoneMatch(org.jclouds.azureblob.AzureBlobClientLiveTest) 
   
   
   
   > @davidsloan We plan to release 2.3.0 later this month. Do you think you 
can finish this PR soon?
   
   Hopefully there are no further changes to be made. :+1: 



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [jclouds] davidsloan commented on a change in pull request #88: JCLOUDS-1557 - Azure local server support

2020-12-07 Thread GitBox


davidsloan commented on a change in pull request #88:
URL: https://github.com/apache/jclouds/pull/88#discussion_r537592491



##
File path: 
providers/azureblob/src/test/java/org/jclouds/azure/storage/util/StorageUrlDelegateTest.java
##
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.util;
+
+import static org.testng.Assert.assertEquals;
+
+import java.util.Properties;
+
+import org.jclouds.ContextBuilder;
+import org.jclouds.azure.storage.reference.AzureConstants;
+import org.jclouds.logging.config.NullLoggingModule;
+import org.jclouds.rest.internal.BaseRestApiTest;
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.inject.Module;
+
+@Test(groups = "unit")
+public class StorageUrlDelegateTest {
+
+   private static final String ACCOUNT = "foo";
+   private static final ImmutableSet MODULES = ImmutableSet. 
of(new BaseRestApiTest.MockModule(),
+ new NullLoggingModule());
+
+   @Test
+   void testDefaultEndpoint() {
+
+  StorageUrlDelegate target = ContextBuilder
+.newBuilder("azureblob")
+.credentials(ACCOUNT, "?token")
+.modules(MODULES)
+.buildInjector().getInstance(StorageUrlDelegate.class);
+
+  assertEquals(target.configureStorageUrl(), 
"https://foo.blob.core.windows.net/;);
+   }
+
+   @Test
+   void testCustomEndpointWithoutStorageAccountPath() {
+
+  StorageUrlDelegate target = ContextBuilder
+.newBuilder("azureblob").endpoint("http://localhost:1;)
+.credentials(ACCOUNT, "?token")
+.modules(MODULES)
+.buildInjector()
+.getInstance(StorageUrlDelegate.class);
+
+  assertEquals(target.configureStorageUrl(), "http://localhost:1/;);

Review comment:
   Sounds good, I've refactored the solution to follow your approach.  
Thanks.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org