Merge pull request #238 from andreisavu/domain-user-account

Finished implementing registerUserKeys API
This commit is contained in:
Adrian Cole 2011-12-13 00:40:30 -08:00
commit dda1b5baab
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;