private static boolean isValidManualTransition(HostRoleStatus status,
      HostRoleStatus desiredStatus) {
    EnumSet<HostRoleStatus> stageStatusSet = manualTransitionMap.get(status);
    return stageStatusSet != null && stageStatusSet.contains(desiredStatus);
  }
Determine whether or not it is valid to transition from this stage status
to the given status.

@param status
         the stage status being transitioned to

@return true if it is valid to transition to the given stage status
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java