use of com.sequenceiq.cloudbreak.cloud.exception.TemplatingDoesNotSupportedException in project cloudbreak by hortonworks.
the class TemplateHandler method accept.
@Override
public void accept(Event<GetPlatformTemplateRequest> platformTemplateRequestEvent) {
LOGGER.info("Received event: {}", platformTemplateRequestEvent);
GetPlatformTemplateRequest request = platformTemplateRequestEvent.getData();
String template = null;
try {
CloudConnector connector = cloudPlatformConnectors.get(request.getCloudContext().getPlatformVariant());
if (connector != null) {
template = connector.resources().getStackTemplate();
}
} catch (TemplatingDoesNotSupportedException ignored) {
}
GetPlatformTemplateResult getPlatformTemplateResult = new GetPlatformTemplateResult(request, template);
request.getResult().onNext(getPlatformTemplateResult);
LOGGER.info("Get template finished.");
}
Aggregations