diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java index 343c4a29ad..537561f7e3 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/config/CloudStackRestClientModule.java @@ -204,6 +204,7 @@ public class CloudStackRestClientModule extends RestClientModule uriBuilder) { - return uriBuilder.get().uri(normal).port(port).build(); + return uriBuilder.get().scheme(normal.getScheme()) + .host(normal.getHost()).path("/").port(port).build(); } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java index 16d9bd648b..abe98381ea 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalUserAsyncClient.java @@ -66,7 +66,8 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient { * @see GlobalUserClient#registerUserKeys */ @GET - @QueryParams(keys = "comand", values = "registerUserKeys") + @QueryParams(keys = "command", values = "registerUserKeys") + @SelectJson("userkeys") @Endpoint(Integration.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java index d6571cd2aa..d0427889b4 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalUserClientLiveTest.java @@ -100,7 +100,7 @@ public class GlobalUserClientLiveTest extends BaseCloudStackClientLiveTest { } private Properties credentialsAsProperties(ApiKeyPair keyPair) { - Properties overrides = new Properties(); + Properties overrides = setupProperties(); overrides.put(provider + ".identity", checkNotNull(keyPair.getApiKey())); overrides.put(provider + ".credential", checkNotNull(keyPair.getSecretKey())); return overrides;