Search in sources :

Example 6 with UpgradeCcmEvent

use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.

the class UpgradeCcmChangeTunnelHandlerTest method setUp.

@BeforeEach
void setUp() {
    UpgradeCcmEvent upgradeCcmEvent = new UpgradeCcmEvent("selector", STACK_ID, Tunnel.CCM);
    event = new Event<>(upgradeCcmEvent);
}
Also used : UpgradeCcmEvent(com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 7 with UpgradeCcmEvent

use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.

the class UpgradeCcmDeregisterMinaHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmEvent> event) {
    UpgradeCcmEvent request = event.getData();
    if (request.getOldTunnel().useCcmV1()) {
        LOGGER.info("Deregistering mina for CCM upgrade...");
        upgradeCcmService.deregisterMina(request.getResourceId());
    } else {
        LOGGER.info("Deregistering mina is skipped for previous tunnel type '{}'", request.getOldTunnel());
    }
    return UPGRADE_CCM_DEREGISTER_MINA_FINISHED_EVENT.createBasedOn(request);
}
Also used : UpgradeCcmEvent(com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent)

Example 8 with UpgradeCcmEvent

use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.

the class UpgradeCcmHealthCheckHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmEvent> event) {
    UpgradeCcmEvent request = event.getData();
    if (request.getOldTunnel().useCcmV1()) {
        LOGGER.info("Health check for CCM upgrade...");
        upgradeCcmService.healthCheck(request.getResourceId());
    } else {
        LOGGER.info("Health check is skipped for previous tunnel type '{}'", request.getOldTunnel());
    }
    return UPGRADE_CCM_HEALTH_CHECK_FINISHED_EVENT.createBasedOn(request);
}
Also used : UpgradeCcmEvent(com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent)

Example 9 with UpgradeCcmEvent

use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.

the class UpgradeCcmObtainAgentDataHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmEvent> event) {
    UpgradeCcmEvent request = event.getData();
    if (request.getOldTunnel().useCcmV1()) {
        LOGGER.info("Obtaining agent data for CCM upgrade...");
        upgradeCcmService.obtainAgentData(request.getResourceId());
    } else {
        LOGGER.info("Obtaining agent data is skipped for previous tunnel type '{}'", request.getOldTunnel());
    }
    return UPGRADE_CCM_OBTAIN_AGENT_DATA_FINISHED_EVENT.createBasedOn(request);
}
Also used : UpgradeCcmEvent(com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent)

Example 10 with UpgradeCcmEvent

use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.

the class UpgradeCcmRegisterClusterProxyHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmEvent> event) {
    UpgradeCcmEvent request = event.getData();
    if (request.getOldTunnel().useCcmV1()) {
        LOGGER.info("Registering to cluster proxy for CCM upgrade...");
        upgradeCcmService.registerClusterProxy(request.getResourceId());
    } else {
        LOGGER.info("Registering to cluster proxy step is skipped for previous tunnel type '{}'", request.getOldTunnel());
    }
    return UPGRADE_CCM_REGISTER_CLUSTER_PROXY_FINISHED_EVENT.createBasedOn(request);
}
Also used : UpgradeCcmEvent(com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent)

Aggregations

UpgradeCcmEvent (com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent)11 BeforeEach (org.junit.jupiter.api.BeforeEach)2 CloudbreakOrchestratorException (com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException)1 StackEvent (com.sequenceiq.freeipa.flow.stack.StackEvent)1 UpgradeCcmService (com.sequenceiq.freeipa.flow.stack.upgrade.ccm.UpgradeCcmService)1 UpgradeCcmFailureEvent (com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmFailureEvent)1 Map (java.util.Map)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 ArgumentsSource (org.junit.jupiter.params.provider.ArgumentsSource)1 Bean (org.springframework.context.annotation.Bean)1 Event (reactor.bus.Event)1