use of com.sequenceiq.freeipa.flow.freeipa.downscale.event.removereplication.RemoveReplicationAgreementsResponse in project cloudbreak by hortonworks.
the class RemoveReplicationAgreementsHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<RemoveReplicationAgreementsRequest> event) {
RemoveReplicationAgreementsRequest request = event.getData();
try {
Long stackId = request.getResourceId();
Stack stack = stackService.getStackById(stackId);
freeIpaTopologyService.updateReplicationTopologyWithRetry(stack, request.getHosts());
return new RemoveReplicationAgreementsResponse(request.getResourceId());
} catch (Exception e) {
LOGGER.error("Downscale removing replication agreements failed", e);
return new DownscaleFailureEvent(REMOVE_REPLICATION_AGREEMENTS_FAILED_EVENT.event(), request.getResourceId(), "Downscale Remove Replication Agreements", Set.of(), Map.of(), e);
}
}
Aggregations