use of com.sequenceiq.freeipa.flow.freeipa.provision.event.cloudstorage.ValidateCloudStorageFailed in project cloudbreak by hortonworks.
the class ValidateCloudStorageHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<ValidateCloudStorageRequest> event) {
ValidateCloudStorageRequest request = event.getData();
Selectable response;
try {
Stack stack = stackService.getByIdWithListsInTransaction(request.getResourceId());
freeIpaCloudStorageValidationService.validate(stack);
response = new ValidateCloudStorageSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.error("FreeIPA cloud storage validation failed", e);
response = new ValidateCloudStorageFailed(request.getResourceId(), e);
}
return response;
}
Aggregations