Search in sources :

Example 1 with PrepareExtendedTemplateFailed

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.PrepareExtendedTemplateFailed in project cloudbreak by hortonworks.

the class PrepareExtendedTemplateHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<PrepareExtendedTemplateRequest> event) {
    Long stackId = event.getData().getResourceId();
    Selectable response;
    try {
        clusterBuilderService.prepareExtendedTemplate(stackId);
        response = new PrepareExtendedTemplateSuccess(stackId);
    } catch (RuntimeException e) {
        LOGGER.error("PrepareExtendedTemplateHandler step failed with the following message: {}", e.getMessage());
        response = new PrepareExtendedTemplateFailed(stackId, e);
    }
    return response;
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) PrepareExtendedTemplateFailed(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.PrepareExtendedTemplateFailed) PrepareExtendedTemplateSuccess(com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.PrepareExtendedTemplateSuccess)

Aggregations

Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 PrepareExtendedTemplateFailed (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.PrepareExtendedTemplateFailed)1 PrepareExtendedTemplateSuccess (com.sequenceiq.cloudbreak.reactor.api.event.cluster.install.PrepareExtendedTemplateSuccess)1