JCLOUDS-929: Add delimiter support to Azure.

Plumb the delimiter option to the Azure blob store.
This commit is contained in:
Timur Alperovich 2015-06-25 11:24:25 -07:00 committed by Andrew Gaul
parent 4dc33ab564
commit 2c1ca89e1a
2 changed files with 8 additions and 8 deletions

View File

@ -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) {

View File

@ -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");
}
}