Finished implementing registerUserKeys API

This commit is contained in:
andreisavu 2011-12-13 08:50:30 +02:00
parent c10d585052
commit 81a4b25cee
3 changed files with 5 additions and 3 deletions

View File

@ -204,6 +204,7 @@ public class CloudStackRestClientModule extends RestClientModule<CloudStackClien
protected URI providesIntegrationEndpoint(@Provider URI normal,
@Named("jclouds.cloudstack.integration-api-port") int port,
com.google.inject.Provider<UriBuilder> uriBuilder) {
return uriBuilder.get().uri(normal).port(port).build();
return uriBuilder.get().scheme(normal.getScheme())
.host(normal.getHost()).path("/").port(port).build();
}
}

View File

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

View File

@ -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;