mirror of https://github.com/apache/jclouds.git
user unlock action (pseudo-impl only)
This commit is contained in:
parent
1309d803e8
commit
e94b719347
|
@ -88,5 +88,13 @@ public interface UserAsyncClient {
|
|||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Void> deleteUser(@EndpointParam URI userRef);
|
||||
|
||||
// POST /admin/user/{id}/action/unlock
|
||||
/**
|
||||
* @see UserClient#unlockUser(URI)
|
||||
*/
|
||||
@POST
|
||||
@Path("/action/unlock")
|
||||
@Consumes
|
||||
@JAXBResponseParser
|
||||
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
|
||||
ListenableFuture<Void> unlockUser(@EndpointParam URI userRef);
|
||||
}
|
||||
|
|
|
@ -79,5 +79,12 @@ public interface UserClient {
|
|||
*/
|
||||
void deleteUser(URI userRef);
|
||||
|
||||
// POST /admin/user/{id}/action/unlock
|
||||
/**
|
||||
* Unlocks a user.
|
||||
*
|
||||
* <pre>
|
||||
* POST /admin/user/{id}/action/unlock
|
||||
* </pre>
|
||||
*/
|
||||
void unlockUser(URI userRef);
|
||||
}
|
||||
|
|
|
@ -162,10 +162,21 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
|||
}
|
||||
}
|
||||
|
||||
// POST /admin/user/{id}/action/unlock
|
||||
//
|
||||
|
||||
|
||||
@Test(testName = "POST /admin/user/{id}/action/unlock",
|
||||
dependsOnMethods = { "testUpdateUser" } )
|
||||
public void testUnlockUser() {
|
||||
//TODO: check previous tests a) enabled lockout, b) set password
|
||||
//TODO: attempt too many times with the wrong password
|
||||
//TODO: verify access is denied
|
||||
//TODO: unlock user
|
||||
//TODO: verify access is renewed
|
||||
}
|
||||
|
||||
@Test(testName = "DELETE /admin/user/{id}",
|
||||
dependsOnMethods = { "testUpdateUser" } )
|
||||
dependsOnMethods = { "testUnlockUser" } )
|
||||
public void testDeleteUser() {
|
||||
userClient.deleteUser(user.getHref());
|
||||
|
||||
|
|
Loading…
Reference in New Issue