use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneRoleServiceTests method checkProjectUserRole_success_Test.
/**
* checks if a user has a role in project context
*
* @throws Exception
*/
public void checkProjectUserRole_success_Test() throws Exception {
respondWith(204);
ActionResponse response_success = osv3().identity().roles().checkProjectUserRole(PROJECT_ID, USER_ID, ROLE_ID);
assertTrue(response_success.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneRoleServiceTests method checkDomainUserRole_success_Test.
/**
* checks if a user has a role in domain context
*
* @throws Exception
*/
public void checkDomainUserRole_success_Test() throws Exception {
respondWith(204);
ActionResponse response_success = osv3().identity().roles().checkDomainUserRole(USER_DOMAIN_ID, USER_ID, ROLE_ID);
assertTrue(response_success.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class KeystoneRoleServiceTests method grantRevokeDomainUserRole_Test.
/**
* grants and revokes a role to/from a user in domain context
*
* @throws Exception
*/
public void grantRevokeDomainUserRole_Test() throws Exception {
respondWith(204);
ActionResponse result_grant = osv3().identity().roles().grantDomainUserRole(USER_DOMAIN_ID, USER_ID, ROLE_ID);
assertTrue(result_grant.isSuccess());
respondWith(204);
ActionResponse result_revoke = osv3().identity().roles().revokeDomainUserRole(USER_DOMAIN_ID, USER_ID, ROLE_ID);
assertTrue(result_revoke.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class GroupServiceTest method testDeletePolicyTargetGroup.
@Test
public void testDeletePolicyTargetGroup() {
respondWith(200);
String id = "61073812-3994-40c2-96f0-6bff03804e47";
ActionResponse result = osv2().gbp().group().delete(id);
assertTrue(result.isSuccess());
}
use of org.openstack4j.model.common.ActionResponse in project openstack4j by ContainX.
the class L2policyServiceTest method testDeletel2Policy.
@Test
public void testDeletel2Policy() {
respondWith(200);
String id = "08c1c093-6337-4383-938e-2d9c6cac531a";
ActionResponse result = osv2().gbp().l2Policy().delete(id);
assertTrue(result.isSuccess());
}
Aggregations