mirror of https://github.com/apache/jclouds.git
JCLOUDS-929: Add delimiter support to Azure.
Plumb the delimiter option to the Azure blob store.
This commit is contained in:
parent
4dc33ab564
commit
2c1ca89e1a
|
@ -33,8 +33,15 @@ public class ListOptionsToListBlobsOptions implements
|
|||
if (from.getDir() != null && from.getPrefix() != null) {
|
||||
throw new IllegalArgumentException("Cannot set both directory and prefix");
|
||||
}
|
||||
if (((from.getDir() != null) || from.isRecursive()) && from.getDelimiter() != null) {
|
||||
throw new IllegalArgumentException("Cannot set delimiter and directory or recursive options together");
|
||||
}
|
||||
|
||||
ListBlobsOptions httpOptions = new ListBlobsOptions();
|
||||
if (!from.isRecursive()) {
|
||||
if (from.getDelimiter() != null) {
|
||||
httpOptions.delimiter(from.getDelimiter());
|
||||
}
|
||||
if (!from.isRecursive() && httpOptions.getDelimiter() == null) {
|
||||
httpOptions.delimiter("/");
|
||||
}
|
||||
if (from.getDir() != null) {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package org.jclouds.azureblob.blobstore.integration;
|
||||
|
||||
import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest;
|
||||
import org.testng.SkipException;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@Test(groups = { "live" })
|
||||
|
@ -25,10 +24,4 @@ public class AzureBlobContainerLiveTest extends BaseContainerLiveTest {
|
|||
public AzureBlobContainerLiveTest() {
|
||||
provider = "azureblob";
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testDelimiterList() {
|
||||
throw new SkipException("The delimiter support has not been plumbed through to Azure blob");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue