use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class TackerVnfdTests method testDeleteVnfd.
public void testDeleteVnfd() throws IOException {
respondWith(200);
ActionResponse result = osv3().tacker().vnfd().delete("1363e776-6c79-4e53-8074-4e32e49f156a");
assertTrue(result.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class MemberTests method testDeleteMember.
public void testDeleteMember() {
String id = "99a28283-97b7-4210-af5c-b2594628217b";
ActionResponse result = osv3().networking().loadbalancers().member().delete(id);
System.out.println("test delete a member" + result);
assertTrue(result.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneRoleServiceTests method checkDomainUserRole_fail_Test.
// TODO: this test is disabled due to a malformed response returned by
// OpenStack as described in issue #530
/**
* checks if a user has a role in domain context
*
* @throws Exception
*/
@Test(enabled = false)
public void checkDomainUserRole_fail_Test() throws Exception {
respondWith(404);
ActionResponse response_success = osv3().identity().roles().checkDomainUserRole(USER_DOMAIN_ID, USER_ID, "existingUnassignedRoleId");
assertFalse(response_success.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneRoleServiceTests method grantDomainUserRole_fail_Test.
/**
* try to grant a domain role to a user using a role that doesn't exist
* results in failing ActionResponse
*
* @throws Exception
*/
public void grantDomainUserRole_fail_Test() throws Exception {
respondWithCodeAndResource(404, JSON_ROLES_GRANTROLE_ERROR);
ActionResponse response_fail = osv3().identity().roles().grantDomainUserRole(USER_DOMAIN_ID, USER_ID, "nonExistingRoleId");
assertFalse(response_fail.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneUserServiceTests method deleteUser_fail_Test.
/**
* tries to delete an non existent user fails
*
* @throws Exception
*/
public void deleteUser_fail_Test() throws Exception {
respondWithCodeAndResource(404, JSON_USER_DELETE_FAIL);
ActionResponse response_delete_fail = osv3().identity().users().delete("invalidUser");
assertFalse(response_delete_fail.isSuccess());
}
Aggregations