use of com.sequenceiq.freeipa.flow.freeipa.provision.event.orchestrator.OrchestratorConfigRequest in project cloudbreak by hortonworks.
the class OrchestratorConfigHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<OrchestratorConfigRequest> event) {
OrchestratorConfigRequest request = event.getData();
Selectable response;
try {
freeIpaOrchestrationConfigService.configureOrchestrator(request.getResourceId());
response = new OrchestratorConfigSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.error("FreeIPA orchestration configuration failed", e);
response = new OrchestratorConfigFailed(request.getResourceId(), e);
}
return response;
}
use of com.sequenceiq.freeipa.flow.freeipa.provision.event.orchestrator.OrchestratorConfigRequest in project cloudbreak by hortonworks.
the class FreeIpaUpscaleActions method orchestratorConfig.
@Bean(name = "UPSCALE_ORCHESTRATOR_CONFIG_STATE")
public Action<?, ?> orchestratorConfig() {
return new AbstractUpscaleAction<>(StackEvent.class) {
@Override
protected void doExecute(StackContext context, StackEvent payload, Map<Object, Object> variables) {
Stack stack = context.getStack();
stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "Configuring the orchestrator");
OrchestratorConfigRequest request = new OrchestratorConfigRequest(stack.getId());
sendEvent(context, request.selector(), request);
}
};
}
Aggregations