use of com.sequenceiq.environment.environment.flow.creation.handler.freeipa.FreeIpaPollerObject in project cloudbreak by hortonworks.
the class FreeIpaDeletionHandler method deleteFreeIpa.
private void deleteFreeIpa(Environment environment, boolean forced) {
freeIpaService.delete(environment.getResourceCrn(), forced);
ExtendedPollingResult result = freeIpaPollingService.pollWithTimeout(new FreeIpaDeletionRetrievalTask(freeIpaService), new FreeIpaPollerObject(environment.getId(), environment.getResourceCrn()), FreeIpaDeletionRetrievalTask.FREEIPA_RETRYING_INTERVAL, FreeIpaDeletionRetrievalTask.FREEIPA_RETRYING_COUNT, FreeIpaDeletionRetrievalTask.FREEIPA_FAILURE_COUNT);
if (!result.isSuccess()) {
String message = "Failed to delete FreeIpa! (" + result.getPollingResult().name() + ") " + getIfNotNull(result.getException(), Throwable::getMessage);
LOGGER.info(message);
throw new FreeIpaOperationFailedException(message);
}
}
Aggregations