use of com.emc.storageos.model.db.DbConsistencyStatusRestRep in project coprhd-controller by CoprHD.
the class DbConsistencyService method toStatusRestRep.
private DbConsistencyStatusRestRep toStatusRestRep(DbConsistencyStatus status) {
DbConsistencyStatusRestRep statusRestRep = new DbConsistencyStatusRestRep();
if (status != null) {
statusRestRep.setStatus(status.getStatus());
statusRestRep.setStartTime(status.getStartTime());
statusRestRep.setEndTime(status.getEndTime());
statusRestRep.setProgress(status.getProgress());
statusRestRep.setWorkingPoint(status.getWorkingPoint());
} else {
statusRestRep.setStatus(DbConsistencyStatusRestRep.Status.NOT_STARTED);
}
return statusRestRep;
}
use of com.emc.storageos.model.db.DbConsistencyStatusRestRep in project coprhd-controller by CoprHD.
the class Upgrade method clusterStatus.
public static void clusterStatus() {
ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo();
Collection<String> repositoryVersions = clusterInfo.getTargetState().getAvailable();
Collection<String> newVersions = clusterInfo.getNewVersions() == null ? Collections.<String>emptyList() : clusterInfo.getNewVersions();
String clusterState = calculateClusterState(clusterInfo);
boolean isStable = clusterState.equalsIgnoreCase(ClusterInfo.ClusterState.STABLE.toString());
boolean isWorking = !isStable && !clusterState.equalsIgnoreCase(ClusterInfo.ClusterState.UNKNOWN.toString());
boolean isDownloading = clusterState.equals(DOWNLOADING_CLUSTER_STATE) || isStandbySiteDownloading();
DbConsistencyStatusRestRep checkDbState = getSysClient().upgrade().getDbCheckState();
String isDbCheckStatus = checkDbState.getStatus().toString();
int checkProgress = checkDbState.getProgress();
Map<String, Map<String, DownloadStatus>> downloadStatus = Maps.newLinkedHashMap();
if (isDownloading) {
SiteRestRep activeSite = DisasterRecoveryUtils.getActiveSite();
DownloadProgress downloadProgress = getSysClient().upgrade().getDownloadProgress();
downloadStatus.put(activeSite.getName(), calculateDownloadStatus(downloadProgress));
for (SiteRestRep standby : DisasterRecoveryUtils.getStandbySites()) {
downloadProgress = getSysClient().upgrade().getDownloadProgress(standby.getUuid());
downloadStatus.put(standby.getName(), calculateDownloadStatus(downloadProgress));
}
}
render(clusterInfo, clusterState, newVersions, repositoryVersions, isStable, isWorking, isDownloading, downloadStatus, checkProgress, isDbCheckStatus);
}
use of com.emc.storageos.model.db.DbConsistencyStatusRestRep in project coprhd-controller by CoprHD.
the class Upgrade method checkDbProgress.
public static void checkDbProgress() {
DbConsistencyStatusRestRep dbState = getSysClient().upgrade().getDbCheckState();
renderJSON(dbState);
}
Aggregations