mirror of https://github.com/apache/jclouds.git
Add trailing slash to Atmos listDirectories
This is more consistent with examples in the Atmos programmer's guide and allows this operation to succeed when used with ViPR.
This commit is contained in:
parent
de8ab57072
commit
b80bb48be3
|
@ -92,6 +92,7 @@ public interface AtmosAsyncClient extends Closeable {
|
||||||
*/
|
*/
|
||||||
@Named("ListDirectory")
|
@Named("ListDirectory")
|
||||||
@GET
|
@GET
|
||||||
|
@Path("/")
|
||||||
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
|
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
|
||||||
@Consumes(MediaType.TEXT_XML)
|
@Consumes(MediaType.TEXT_XML)
|
||||||
ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... options);
|
ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... options);
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class AtmosAsyncClientTest extends BaseAsyncClientTest<AtmosAsyncClient>
|
||||||
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
|
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/ HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\n");
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class AtmosAsyncClientTest extends BaseAsyncClientTest<AtmosAsyncClient>
|
||||||
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
|
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
|
||||||
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(new ListOptions().limit(1).token("asda")));
|
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(new ListOptions().limit(1).token("asda")));
|
||||||
|
|
||||||
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
|
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/ HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\nx-emc-limit: 1\nx-emc-token: asda\n");
|
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\nx-emc-limit: 1\nx-emc-token: asda\n");
|
||||||
assertPayloadEquals(request, null, null, false);
|
assertPayloadEquals(request, null, null, false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue