use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.list.ListFreeIpaResponse in project cloudbreak by hortonworks.
the class FreeIpaV1ControllerTest method list.
@Test
void list() {
List<ListFreeIpaResponse> responseList = Collections.singletonList(new ListFreeIpaResponse());
when(freeIpaFiltering.filterFreeIpas(AuthorizationResourceAction.DESCRIBE_ENVIRONMENT)).thenReturn(responseList);
List<ListFreeIpaResponse> actual = underTest.list();
assertEquals(responseList, actual);
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.list.ListFreeIpaResponse in project cloudbreak by hortonworks.
the class FreeIpaV1ControllerTest method listInternal.
@Test
void listInternal() {
List<ListFreeIpaResponse> responseList = Collections.singletonList(new ListFreeIpaResponse());
when(freeIpaListService.list(ACCOUNT_ID)).thenReturn(responseList);
List<ListFreeIpaResponse> actual = underTest.listInternal(ACCOUNT_ID);
assertEquals(responseList, actual);
verify(freeIpaListService).list(ACCOUNT_ID);
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.list.ListFreeIpaResponse in project cloudbreak by hortonworks.
the class FreeIpaToListFreeIpaResponseConverter method convert.
private ListFreeIpaResponse convert(FreeIpa freeIpa) {
ListFreeIpaResponse response = new ListFreeIpaResponse();
response.setDomain(freeIpa.getDomain());
Stack stack = freeIpa.getStack();
if (stack != null) {
response.setName(stack.getName());
response.setCrn(stack.getResourceCrn());
response.setEnvironmentCrn(stack.getEnvironmentCrn());
response.setStatus(stack.getStackStatus().getStatus());
response.setStatusString(stack.getStackStatus().getStatusString());
response.setAvailabilityStatus(stackToAvailabilityStatusConverter.convert(stack));
}
return response;
}
Aggregations