class ClusterUpgradeService {

    public boolean upgradeClusterManager(long stackId, StatedImage currentImage, StatedImage targetImage) {
        String currentCmBuildNumber = currentImage.getImage().getCmBuildNumber();
        boolean clusterManagerUpdateNeeded = isUpdateNeeded(currentCmBuildNumber, targetImage.getImage().getCmBuildNumber());
        if (clusterManagerUpdateNeeded) {
            flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE);
        } else {
            flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), CLUSTER_MANAGER_UPGRADE_NOT_NEEDED, currentCmBuildNumber);
        }
        return clusterManagerUpdateNeeded;
    }

}