Search in sources :

Example 1 with DnsUpdateFinished

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.DnsUpdateFinished in project cloudbreak by hortonworks.

the class ClusterStartActions method updateClusterDnsEntriesInPem.

@Bean(name = "UPDATING_DNS_IN_PEM_STATE")
public Action<?, ?> updateClusterDnsEntriesInPem() {
    return new AbstractClusterAction<>(ClusterStartPillarConfigUpdateResult.class) {

        @Override
        protected void doExecute(ClusterViewContext context, ClusterStartPillarConfigUpdateResult payload, Map<Object, Object> variables) {
            Stack stack = getStackService().getByIdWithListsInTransaction(payload.getResourceId());
            clusterStartService.updateDnsEntriesInPem(stack);
            sendEvent(context);
        }

        @Override
        protected Selectable createRequest(ClusterViewContext context) {
            return new DnsUpdateFinished(context.getStackId());
        }
    };
}
Also used : ClusterStartPillarConfigUpdateResult(com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateResult) AbstractClusterAction(com.sequenceiq.cloudbreak.core.flow2.cluster.AbstractClusterAction) Map(java.util.Map) ClusterViewContext(com.sequenceiq.cloudbreak.core.flow2.cluster.ClusterViewContext) DnsUpdateFinished(com.sequenceiq.cloudbreak.reactor.api.event.cluster.DnsUpdateFinished) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Bean(org.springframework.context.annotation.Bean)

Aggregations

AbstractClusterAction (com.sequenceiq.cloudbreak.core.flow2.cluster.AbstractClusterAction)1 ClusterViewContext (com.sequenceiq.cloudbreak.core.flow2.cluster.ClusterViewContext)1 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)1 ClusterStartPillarConfigUpdateResult (com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateResult)1 DnsUpdateFinished (com.sequenceiq.cloudbreak.reactor.api.event.cluster.DnsUpdateFinished)1 Map (java.util.Map)1 Bean (org.springframework.context.annotation.Bean)1