use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmRemoveAgentResult in project cloudbreak by hortonworks.
the class RemoveAgentHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmRemoveAgentRequest> event) {
UpgradeCcmRemoveAgentRequest request = event.getData();
Long stackId = request.getResourceId();
LOGGER.info("Remove agent for CCM upgrade...");
try {
upgradeCcmService.removeAgent(stackId, request.getOldTunnel());
} catch (CloudbreakOrchestratorException e) {
LOGGER.debug("Failed removing agent with a salt state");
return new UpgradeCcmFailedEvent(stackId, request.getOldTunnel(), e);
}
return new UpgradeCcmRemoveAgentResult(stackId, request.getClusterId(), request.getOldTunnel());
}
Aggregations