Search in sources :

Example 1 with ClusterCertificatesRotationTriggerEvent

use of com.sequenceiq.cloudbreak.core.flow2.event.ClusterCertificatesRotationTriggerEvent in project cloudbreak by hortonworks.

the class RotateClusterCertificatesFlowEventChainFactory method createFlowTriggerEventQueue.

@Override
public FlowTriggerEventQueue createFlowTriggerEventQueue(ClusterCertificatesRotationTriggerEvent event) {
    Queue<Selectable> flowEventChain = new ConcurrentLinkedQueue<>();
    flowEventChain.add(new StackEvent(SaltUpdateEvent.SALT_UPDATE_EVENT.event(), event.getResourceId(), event.accepted()));
    flowEventChain.add(new ClusterCertificatesRotationTriggerEvent(ClusterCertificatesRotationEvent.CLUSTER_CMCA_ROTATION_EVENT.event(), event.getResourceId(), event.accepted(), event.getCertificateRotationType()));
    return new FlowTriggerEventQueue(getName(), event, flowEventChain);
}
Also used : StackEvent(com.sequenceiq.cloudbreak.reactor.api.event.StackEvent) FlowTriggerEventQueue(com.sequenceiq.flow.core.chain.config.FlowTriggerEventQueue) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) ClusterCertificatesRotationTriggerEvent(com.sequenceiq.cloudbreak.core.flow2.event.ClusterCertificatesRotationTriggerEvent)

Example 2 with ClusterCertificatesRotationTriggerEvent

use of com.sequenceiq.cloudbreak.core.flow2.event.ClusterCertificatesRotationTriggerEvent in project cloudbreak by hortonworks.

the class ReactorFlowManager method triggerAutoTlsCertificatesRotation.

public FlowIdentifier triggerAutoTlsCertificatesRotation(Long stackId, CertificatesRotationV4Request certificatesRotationV4Request) {
    String selector = FlowChainTriggers.ROTATE_CLUSTER_CERTIFICATES_CHAIN_TRIGGER_EVENT;
    ClusterCertificatesRotationTriggerEvent clusterCertificatesRotationTriggerEvent = new ClusterCertificatesRotationTriggerEvent(selector, stackId, certificatesRotationV4Request.getRotateCertificatesType());
    return reactorNotifier.notify(stackId, selector, clusterCertificatesRotationTriggerEvent);
}
Also used : ClusterCertificatesRotationTriggerEvent(com.sequenceiq.cloudbreak.core.flow2.event.ClusterCertificatesRotationTriggerEvent)

Aggregations

ClusterCertificatesRotationTriggerEvent (com.sequenceiq.cloudbreak.core.flow2.event.ClusterCertificatesRotationTriggerEvent)2 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 StackEvent (com.sequenceiq.cloudbreak.reactor.api.event.StackEvent)1 FlowTriggerEventQueue (com.sequenceiq.flow.core.chain.config.FlowTriggerEventQueue)1 ConcurrentLinkedQueue (java.util.concurrent.ConcurrentLinkedQueue)1