use of com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupFailed in project cloudbreak by hortonworks.
the class HostMetadataSetupHandler method accept.
@Override
public void accept(Event<HostMetadataSetupRequest> event) {
StackEvent request = event.getData();
LOGGER.debug("Host metadata setup request {}", request);
Selectable response;
try {
hostMetadataSetup.setupHostMetadata(request.getResourceId());
response = new HostMetadataSetupSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.debug("Host metadata setup failed", e);
response = new HostMetadataSetupFailed(request.getResourceId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
use of com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupFailed in project cloudbreak by hortonworks.
the class HostMetadataSetupFailedToUpscaleFailureEventConverter method convert.
@Override
public UpscaleFailureEvent convert(Object payload) {
HostMetadataSetupFailed result = (HostMetadataSetupFailed) payload;
UpscaleFailureEvent event = new UpscaleFailureEvent(result.getResourceId(), "Host metadata setup", Set.of(), Map.of(), new Exception("Payload failed: " + payload));
return event;
}
Aggregations