// Path: coopr-server/src/main/java/co/cask/coopr/scheduler/ClusterAction.java
// public enum ClusterAction {
//   SOLVE_LAYOUT(Cluster.Status.TERMINATED),
//   CLUSTER_CREATE(Cluster.Status.INCOMPLETE),
//   CLUSTER_DELETE(Cluster.Status.INCOMPLETE),
//   CLUSTER_CONFIGURE(Cluster.Status.INCONSISTENT),
//   CLUSTER_CONFIGURE_WITH_RESTART(Cluster.Status.INCONSISTENT),
//   STOP_SERVICES(Cluster.Status.INCONSISTENT),
//   START_SERVICES(Cluster.Status.INCONSISTENT),
//   RESTART_SERVICES(Cluster.Status.INCONSISTENT),
//   ADD_SERVICES(Cluster.Status.INCONSISTENT);
// 
//   // these are runtime actions for services that don't change cluster state
//   public static final Set<ClusterAction> SERVICE_RUNTIME_ACTIONS = ImmutableSet.of(
//     STOP_SERVICES, START_SERVICES, RESTART_SERVICES);
//   private final Cluster.Status failureStatus;
// 
//   ClusterAction(Cluster.Status status) {
//     failureStatus = status;
//   }
// 
//   public Cluster.Status getFailureStatus() {
//     return failureStatus;
//   }
// }


import co.cask.coopr.cluster.Cluster;
import co.cask.coopr.scheduler.ClusterAction;
import co.cask.coopr.scheduler.task.ClusterJob;
import co.cask.coopr.scheduler.task.ClusterTask;
import com.google.common.base.Objects;
import java.util.Map;
    int completedTasks = 0;
    for (Map.Entry<String, ClusterTask.Status> entry : taskStatus.entrySet()) {
      if (entry.getValue().equals(ClusterTask.Status.COMPLETE)) {
        completedTasks++;
      }
    }
    this.stepscompleted = completedTasks;
    this.stepstotal = taskStatus.size();
  }

  public String getClusterid() {
    return clusterid;
  }

  public int getStepstotal() {
    return stepstotal;
  }

  public int getStepscompleted() {
    return stepscompleted;
  }

  public Cluster.Status getStatus() {
    return status;
  }

  public ClusterJob.Status getActionstatus() {
    return actionstatus;
  }

// Path: coopr-server/src/main/java/co/cask/coopr/scheduler/ClusterAction.java
// public enum ClusterAction {
//   SOLVE_LAYOUT(Cluster.Status.TERMINATED),
//   CLUSTER_CREATE(Cluster.Status.INCOMPLETE),
//   CLUSTER_DELETE(Cluster.Status.INCOMPLETE),
//   CLUSTER_CONFIGURE(Cluster.Status.INCONSISTENT),
//   CLUSTER_CONFIGURE_WITH_RESTART(Cluster.Status.INCONSISTENT),
//   STOP_SERVICES(Cluster.Status.INCONSISTENT),
//   START_SERVICES(Cluster.Status.INCONSISTENT),
//   RESTART_SERVICES(Cluster.Status.INCONSISTENT),
//   ADD_SERVICES(Cluster.Status.INCONSISTENT);
// 
//   // these are runtime actions for services that don't change cluster state
//   public static final Set<ClusterAction> SERVICE_RUNTIME_ACTIONS = ImmutableSet.of(
//     STOP_SERVICES, START_SERVICES, RESTART_SERVICES);
//   private final Cluster.Status failureStatus;
// 
//   ClusterAction(Cluster.Status status) {
//     failureStatus = status;
//   }
// 
//   public Cluster.Status getFailureStatus() {
//     return failureStatus;
//   }
// }


// Path: coopr-server/src/main/java/co/cask/coopr/http/request/ClusterStatusResponse.java
import co.cask.coopr.cluster.Cluster;
import co.cask.coopr.scheduler.ClusterAction;
import co.cask.coopr.scheduler.task.ClusterJob;
import co.cask.coopr.scheduler.task.ClusterTask;
import com.google.common.base.Objects;
import java.util.Map;

    int completedTasks = 0;
    for (Map.Entry<String, ClusterTask.Status> entry : taskStatus.entrySet()) {
      if (entry.getValue().equals(ClusterTask.Status.COMPLETE)) {
        completedTasks++;
      }
    }
    this.stepscompleted = completedTasks;
    this.stepstotal = taskStatus.size();
  }

  public String getClusterid() {
    return clusterid;
  }

  public int getStepstotal() {
    return stepstotal;
  }

  public int getStepscompleted() {
    return stepscompleted;
  }

  public Cluster.Status getStatus() {
    return status;
  }

  public ClusterJob.Status getActionstatus() {
    return actionstatus;
  }

  public ClusterAction getAction() {