use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GetGlusterVolumeRemoveBricksStatusQueryTest method getHostwiseStatusDetails.
private List<GlusterVolumeTaskStatusForHost> getHostwiseStatusDetails() {
List<GlusterVolumeTaskStatusForHost> statusList = new ArrayList<>();
GlusterVolumeTaskStatusForHost status1 = new GlusterVolumeTaskStatusForHost();
status1.setHostName(SERVER_1);
status1.setHostUuid(Guid.newGuid());
status1.setFilesScanned(100);
status1.setFilesMoved(100);
status1.setFilesFailed(0);
status1.setFilesScanned(100);
status1.setFilesSkipped(0);
status1.setRunTime(20);
status1.setStatus(JobExecutionStatus.FINISHED);
status1.setTotalSizeMoved(1024);
status1.setHostUuid(SERVER_UUID_1);
statusList.add(status1);
GlusterVolumeTaskStatusForHost status2 = new GlusterVolumeTaskStatusForHost();
status2.setHostName(SERVER_2);
status2.setHostUuid(Guid.newGuid());
status2.setFilesScanned(100);
status2.setFilesMoved(100);
status2.setFilesFailed(0);
status2.setFilesScanned(100);
status2.setFilesSkipped(0);
status2.setRunTime(20);
status2.setStatus(JobExecutionStatus.FINISHED);
status2.setTotalSizeMoved(1024);
status2.setHostUuid(SERVER_UUID_1);
statusList.add(status2);
return statusList;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GlusterTaskStatisticalQueryTest method getTaskStatusForHost.
private GlusterVolumeTaskStatusForHost getTaskStatusForHost(int index) {
GlusterVolumeTaskStatusForHost hostStatus = new GlusterVolumeTaskStatusForHost();
hostStatus.setFilesFailed(FILES_FAILED[index]);
hostStatus.setFilesSkipped(FILES_SKIPPED[index]);
hostStatus.setFilesMoved(FILES_MOVED[index]);
hostStatus.setTotalSizeMoved(SIZE_MOVED[index]);
hostStatus.setRunTime(RUN_TIME[index]);
hostStatus.setStatus(JobExecutionStatus.STARTED);
hostStatus.setHostId(GUIDS[index]);
return hostStatus;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class VolumeRebalanceStatusModel method showStatus.
public void showStatus(GlusterVolumeTaskStatusEntity rebalanceStatusEntity) {
List<GlusterVolumeTaskStatusForHost> rebalanceSessionsList = rebalanceStatusEntity.getHostwiseStatusDetails();
List<EntityModel<GlusterVolumeTaskStatusForHost>> sessionList = new ArrayList<>();
for (GlusterVolumeTaskStatusForHost hostDetail : rebalanceSessionsList) {
EntityModel<GlusterVolumeTaskStatusForHost> sessionModel = new EntityModel<>(hostDetail);
sessionList.add(sessionModel);
}
getStartTime().setEntity(rebalanceStatusEntity.getStartTime());
getStatusTime().setEntity(rebalanceStatusEntity.getStatusTime());
getRebalanceSessions().setItems(sessionList);
setStatusAvailable(rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.FINISHED);
if (rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.FINISHED) {
refresh.cancel();
} else {
if (rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.ABORTED || rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.FAILED) {
refresh.cancel();
if (rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.ABORTED) {
getStopTime().setEntity(rebalanceStatusEntity.getStopTime());
}
}
}
setStopTimeVisible(rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.ABORTED);
if (GlusterTaskType.REBALANCE == getEntity().getAsyncTask().getType()) {
getStopReblanceFromStatus().setIsExecutionAllowed(rebalanceStatusEntity.getStatusSummary().getStatus() == JobExecutionStatus.STARTED);
}
}
Aggregations