use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest in project cloudbreak by hortonworks.
the class EphemeralClusterUpdateHandler method accept.
@Override
public void accept(Event<EphemeralClusterUpdateRequest> event) {
EphemeralClusterUpdateRequest request = event.getData();
Selectable response;
try {
clusterServiceRunner.updateSaltState(request.getStackId());
response = new EphemeralClusterUpdateSuccess(request.getStackId());
} catch (Exception e) {
response = new EphemeralClusterUpdateFailed(request.getStackId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
use of com.sequenceiq.cloudbreak.reactor.api.event.orchestration.EphemeralClusterUpdateRequest in project cloudbreak by hortonworks.
the class EphemeralClusterActions method updateNameserverAction.
@Bean(name = "EPHEMERAL_CLUSTER_UPDATE_STATE")
public Action<?, ?> updateNameserverAction() {
return new AbstractClusterAction<EphemeralClusterUpdateTriggerEvent>(EphemeralClusterUpdateTriggerEvent.class) {
@Override
protected void doExecute(ClusterViewContext context, EphemeralClusterUpdateTriggerEvent payload, Map<Object, Object> variables) {
ephemeralClusterService.updateClusterStarted(context.getStackId());
Selectable request = new EphemeralClusterUpdateRequest(context.getStackId());
sendEvent(context.getFlowId(), request.selector(), request);
}
};
}
Aggregations