Search in sources :

Example 1 with StackWithFingerprintsEvent

use of com.sequenceiq.cloudbreak.reactor.api.event.stack.StackWithFingerprintsEvent in project cloudbreak by hortonworks.

the class StackCreationActions method tlsSetupAction.

@Bean(name = "TLS_SETUP_STATE")
public Action<?, ?> tlsSetupAction() {
    return new AbstractStackCreationAction<GetSSHFingerprintsResult>(GetSSHFingerprintsResult.class) {

        @Override
        protected void doExecute(StackContext context, GetSSHFingerprintsResult payload, Map<Object, Object> variables) throws Exception {
            stackCreationService.setupTls(context);
            StackWithFingerprintsEvent fingerprintsEvent = new StackWithFingerprintsEvent(payload.getStackId(), payload.getSshFingerprints());
            sendEvent(context.getFlowId(), StackCreationEvent.TLS_SETUP_FINISHED_EVENT.event(), fingerprintsEvent);
        }
    };
}
Also used : StackWithFingerprintsEvent(com.sequenceiq.cloudbreak.reactor.api.event.stack.StackWithFingerprintsEvent) StackContext(com.sequenceiq.cloudbreak.core.flow2.stack.StackContext) Map(java.util.Map) GetSSHFingerprintsResult(com.sequenceiq.cloudbreak.cloud.event.instance.GetSSHFingerprintsResult) Bean(org.springframework.context.annotation.Bean)

Aggregations

GetSSHFingerprintsResult (com.sequenceiq.cloudbreak.cloud.event.instance.GetSSHFingerprintsResult)1 StackContext (com.sequenceiq.cloudbreak.core.flow2.stack.StackContext)1 StackWithFingerprintsEvent (com.sequenceiq.cloudbreak.reactor.api.event.stack.StackWithFingerprintsEvent)1 Map (java.util.Map)1 Bean (org.springframework.context.annotation.Bean)1