use of com.sequenceiq.freeipa.api.v1.freeipa.test.model.CheckGroupsV1Request in project cloudbreak by hortonworks.
the class FreeIpaFindGroupsAction method action.
public FreeIpaTestDto action(TestContext testContext, FreeIpaTestDto testDto, FreeIpaClient client) throws Exception {
CheckGroupsV1Request checkGroupsRequest = new CheckGroupsV1Request();
checkGroupsRequest.setEnvironmentCrn(testDto.getResponse().getEnvironmentCrn());
checkGroupsRequest.setGroups(groups);
Log.when(LOGGER, format(" Checking groups [%s] are present at environment '%s'", groups, testDto.getResponse().getEnvironmentCrn()));
Log.whenJson(LOGGER, format(" FreeIpa '%s' find groups request:%n ", testDto.getResponse().getCrn()), checkGroupsRequest);
if (!client.getDefaultClient().getClientTestV1Endpoint().checkGroups(checkGroupsRequest).getResult()) {
throw new TestFailException("Given freeipa groups cannot be found, please check FMS logs for details");
}
LOGGER.info(format(" Groups [%s] are present at environment '%s'", groups, testDto.getResponse().getEnvironmentCrn()));
Log.when(LOGGER, format(" Groups [%s] are present at environment '%s'", groups, testDto.getResponse().getEnvironmentCrn()));
return testDto;
}
Aggregations