use of com.sequenceiq.freeipa.flow.freeipa.provision.event.postinstall.PostInstallFreeIpaRequest in project cloudbreak by hortonworks.
the class PostInstallFreeIpaHandler method accept.
@Override
public void accept(Event<PostInstallFreeIpaRequest> event) {
PostInstallFreeIpaRequest request = event.getData();
Selectable response;
try {
freeIpaPostInstallService.postInstallFreeIpa(request.getResourceId(), request.isFullPostInstall());
response = new PostInstallFreeIpaSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.error("Post install tasks have failed", e);
response = new PostInstallFreeIpaFailed(request.getResourceId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
use of com.sequenceiq.freeipa.flow.freeipa.provision.event.postinstall.PostInstallFreeIpaRequest in project cloudbreak by hortonworks.
the class FreeIpaUpscaleActions method freeIpaPostInstallAction.
@Bean(name = "UPSCALE_FREEIPA_POST_INSTALL_STATE")
public Action<?, ?> freeIpaPostInstallAction() {
return new AbstractUpscaleAction<>(ClusterProxyUpdateRegistrationSuccess.class) {
@Override
protected void doExecute(StackContext context, ClusterProxyUpdateRegistrationSuccess payload, Map<Object, Object> variables) {
Stack stack = context.getStack();
stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "FreeIPA Post Installation");
PostInstallFreeIpaRequest request = new PostInstallFreeIpaRequest(stack.getId(), false);
sendEvent(context, request.selector(), request);
}
};
}
Aggregations