mirror of https://github.com/apache/jclouds.git
Finished implementing registerUserKeys API
This commit is contained in:
parent
c10d585052
commit
81a4b25cee
|
@ -204,6 +204,7 @@ public class CloudStackRestClientModule extends RestClientModule<CloudStackClien
|
||||||
protected URI providesIntegrationEndpoint(@Provider URI normal,
|
protected URI providesIntegrationEndpoint(@Provider URI normal,
|
||||||
@Named("jclouds.cloudstack.integration-api-port") int port,
|
@Named("jclouds.cloudstack.integration-api-port") int port,
|
||||||
com.google.inject.Provider<UriBuilder> uriBuilder) {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,8 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
|
||||||
* @see GlobalUserClient#registerUserKeys
|
* @see GlobalUserClient#registerUserKeys
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
@QueryParams(keys = "comand", values = "registerUserKeys")
|
@QueryParams(keys = "command", values = "registerUserKeys")
|
||||||
|
@SelectJson("userkeys")
|
||||||
@Endpoint(Integration.class)
|
@Endpoint(Integration.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class GlobalUserClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Properties credentialsAsProperties(ApiKeyPair keyPair) {
|
private Properties credentialsAsProperties(ApiKeyPair keyPair) {
|
||||||
Properties overrides = new Properties();
|
Properties overrides = setupProperties();
|
||||||
overrides.put(provider + ".identity", checkNotNull(keyPair.getApiKey()));
|
overrides.put(provider + ".identity", checkNotNull(keyPair.getApiKey()));
|
||||||
overrides.put(provider + ".credential", checkNotNull(keyPair.getSecretKey()));
|
overrides.put(provider + ".credential", checkNotNull(keyPair.getSecretKey()));
|
||||||
return overrides;
|
return overrides;
|
||||||
|
|
Loading…
Reference in New Issue