use of com.sequenceiq.environment.environment.flow.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmActions method upgradeCcmValidationAction.
@Bean(name = "UPGRADE_CCM_VALIDATION_STATE")
public Action<?, ?> upgradeCcmValidationAction() {
return new AbstractUpgradeCcmAction<>(UpgradeCcmEvent.class) {
@Override
protected void doExecute(CommonContext context, UpgradeCcmEvent payload, Map<Object, Object> variables) {
EnvironmentDto envDto = environmentStatusUpdateService.updateEnvironmentStatusAndNotify(context, payload, EnvironmentStatus.UPGRADE_CCM_VALIDATION_IN_PROGRESS, ResourceEvent.ENVIRONMENT_UPGRADE_CCM_VALIDATION_STARTED, UpgradeCcmState.UPGRADE_CCM_VALIDATION_STATE);
sendEvent(context, UPGRADE_CCM_VALIDATION_HANDLER.selector(), envDto);
}
};
}
use of com.sequenceiq.environment.environment.flow.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmActions method upgradeCcmInDataHubAction.
@Bean(name = "UPGRADE_CCM_DATAHUB_STATE")
public Action<?, ?> upgradeCcmInDataHubAction() {
return new AbstractUpgradeCcmAction<>(UpgradeCcmEvent.class) {
@Override
protected void doExecute(CommonContext context, UpgradeCcmEvent payload, Map<Object, Object> variables) {
EnvironmentDto envDto = environmentStatusUpdateService.updateEnvironmentStatusAndNotify(context, payload, EnvironmentStatus.UPGRADE_CCM_ON_DATAHUB_IN_PROGRESS, ResourceEvent.ENVIRONMENT_UPGRADE_CCM_ON_DATAHUB_STARTED, UpgradeCcmState.UPGRADE_CCM_DATAHUB_STATE);
sendEvent(context, UPGRADE_CCM_DATAHUB_HANDLER.selector(), envDto);
}
};
}
use of com.sequenceiq.environment.environment.flow.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmActions method upgradeCcmUpdateTunnelAction.
@Bean(name = "UPGRADE_CCM_TUNNEL_UPDATE_STATE")
public Action<?, ?> upgradeCcmUpdateTunnelAction() {
return new AbstractUpgradeCcmAction<>(UpgradeCcmEvent.class) {
@Override
protected void doExecute(CommonContext context, UpgradeCcmEvent payload, Map<Object, Object> variables) {
EnvironmentDto envDto = environmentStatusUpdateService.updateEnvironmentStatusAndNotify(context, payload, EnvironmentStatus.UPGRADE_CCM_TUNNEL_UPDATE_IN_PROGRESS, ResourceEvent.ENVIRONMENT_UPGRADE_CCM_TUNNEL_UPDATE_STARTED, UpgradeCcmState.UPGRADE_CCM_TUNNEL_UPDATE_STATE);
sendEvent(context, UPGRADE_CCM_TUNNEL_UPDATE_HANDLER.selector(), envDto);
}
};
}
use of com.sequenceiq.environment.environment.flow.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmActions method upgradeCcmInDataLakeAction.
@Bean(name = "UPGRADE_CCM_DATALAKE_STATE")
public Action<?, ?> upgradeCcmInDataLakeAction() {
return new AbstractUpgradeCcmAction<>(UpgradeCcmEvent.class) {
@Override
protected void doExecute(CommonContext context, UpgradeCcmEvent payload, Map<Object, Object> variables) {
EnvironmentDto envDto = environmentStatusUpdateService.updateEnvironmentStatusAndNotify(context, payload, EnvironmentStatus.UPGRADE_CCM_ON_DATALAKE_IN_PROGRESS, ResourceEvent.ENVIRONMENT_UPGRADE_CCM_ON_DATALAKE_STARTED, UpgradeCcmState.UPGRADE_CCM_DATALAKE_STATE);
sendEvent(context, UPGRADE_CCM_DATALAKE_HANDLER.selector(), envDto);
}
};
}
use of com.sequenceiq.environment.environment.flow.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmActions method finishedAction.
@Bean(name = "UPGRADE_CCM_FINISHED_STATE")
public Action<?, ?> finishedAction() {
return new AbstractUpgradeCcmAction<>(UpgradeCcmEvent.class) {
@Override
protected void doExecute(CommonContext context, UpgradeCcmEvent payload, Map<Object, Object> variables) {
EnvironmentDto environmentDto = environmentStatusUpdateService.updateEnvironmentStatusAndNotify(context, payload, EnvironmentStatus.AVAILABLE, ResourceEvent.ENVIRONMENT_UPGRADE_CCM_FINISHED, UpgradeCcmState.UPGRADE_CCM_FINISHED_STATE);
metricService.incrementMetricCounter(MetricType.ENV_UPGRADE_CCM_FINISHED, environmentDto);
sendEvent(context, FINALIZE_UPGRADE_CCM_EVENT.event(), payload);
}
};
}
Aggregations