mirror of https://github.com/apache/jclouds.git
Implemented deleteUser global admin API
This commit is contained in:
parent
a5fd2f7a05
commit
f25289bf0f
|
@ -18,9 +18,17 @@
|
|||
*/
|
||||
package org.jclouds.cloudstack.features;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import org.jclouds.cloudstack.filters.QuerySigner;
|
||||
import org.jclouds.rest.annotations.ExceptionParser;
|
||||
import org.jclouds.rest.annotations.QueryParams;
|
||||
import org.jclouds.rest.annotations.RequestFilters;
|
||||
import org.jclouds.rest.functions.ReturnNullOnNotFoundOr404;
|
||||
|
||||
import javax.ws.rs.Consumes;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
/**
|
||||
* Provides asynchronous access to CloudStack User features available to Global
|
||||
|
@ -35,4 +43,13 @@ import org.jclouds.rest.annotations.RequestFilters;
|
|||
@QueryParams(keys = "response", values = "json")
|
||||
public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
|
||||
|
||||
|
||||
/**
|
||||
* @see GlobalUserClient#deleteUser
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "deleteUser")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteUser(@QueryParam("id") long id);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.jclouds.cloudstack.features;
|
|||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.jclouds.cloudstack.domain.User;
|
||||
import org.jclouds.concurrent.Timeout;
|
||||
|
||||
/**
|
||||
|
@ -34,4 +35,11 @@ import org.jclouds.concurrent.Timeout;
|
|||
@Timeout(duration = 60, timeUnit = TimeUnit.SECONDS)
|
||||
public interface GlobalUserClient extends DomainUserClient {
|
||||
|
||||
|
||||
/**
|
||||
* Delete an user with the specified ID
|
||||
*
|
||||
* @param id user ID
|
||||
*/
|
||||
Void deleteUser(long id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue