use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GlusterAsyncTaskStatusQueryBase method updateHostIP.
private void updateHostIP(GlusterVolumeTaskStatusEntity taskStatus) {
if (taskStatus != null) {
for (GlusterVolumeTaskStatusForHost hostStatus : taskStatus.getHostwiseStatusDetails()) {
GlusterServer glusterServer = glusterServerDao.getByGlusterServerUuid(hostStatus.getHostUuid());
if (glusterServer != null) {
VDS host = vdsDao.get(glusterServer.getId());
if (host != null) {
hostStatus.setHostName(host.getName());
hostStatus.setHostId(host.getId());
}
}
}
}
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GlusterVolumeTaskReturn method getStatusForNode.
private GlusterVolumeTaskStatusForHost getStatusForNode(Map<String, Object> nodeStatus) {
GlusterVolumeTaskStatusForHost rebalanceStatusForHost = new GlusterVolumeTaskStatusForHost();
rebalanceStatusForHost.setHostName(nodeStatus.containsKey(HOST_NAME) ? (String) nodeStatus.get(HOST_NAME) : null);
rebalanceStatusForHost.setHostUuid(nodeStatus.containsKey(HOST_UUID) ? new Guid((String) nodeStatus.get(HOST_UUID)) : null);
populateGlusterVolumeTaskStatusDetail(rebalanceStatusForHost, nodeStatus);
return rebalanceStatusForHost;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GlusterTaskStatisticalQueryTest method getTaskEntity.
private GlusterVolumeTaskStatusEntity getTaskEntity() {
GlusterVolumeTaskStatusEntity entity = new GlusterVolumeTaskStatusEntity();
List<GlusterVolumeTaskStatusForHost> hostStatusList = new ArrayList<>();
hostStatusList.add(getTaskStatusForHost(0));
hostStatusList.add(getTaskStatusForHost(1));
entity.setHostwiseStatusDetails(hostStatusList);
return entity;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class StepStatisticalQuery method getStatistics.
@Override
public List<Statistic> getStatistics(GlusterVolumeTaskStatusEntity entity) {
List<Statistic> list = new ArrayList<>();
if (entity == null) {
return list;
}
for (GlusterVolumeTaskStatusForHost hostStatus : entity.getHostwiseStatusDetails()) {
Guid hostId = hostStatus.getHostId();
list.add(adopt(setHostDatum(FILES_MOVED, hostStatus.getFilesMoved(), hostId)));
list.add(adopt(setHostDatum(SIZE_MOVED, hostStatus.getTotalSizeMoved(), hostId)));
list.add(adopt(setHostDatum(FILES_SKIPPED, hostStatus.getFilesSkipped(), hostId)));
list.add(adopt(setHostDatum(FILES_SCANNED, hostStatus.getFilesScanned(), hostId)));
list.add(adopt(setHostDatum(FILES_FAILED, hostStatus.getFilesFailed(), hostId)));
list.add(adopt(setHostDatum(RUN_TIME, hostStatus.getRunTime(), hostId)));
list.add(adopt(setHostDatum(STATUS, hostStatus.getStatus().toString(), hostId)));
}
return list;
}
use of org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost in project ovirt-engine by oVirt.
the class GetGlusterVolumeRebalanceStatusQueryTest method getHostwiseStatusDetails.
private List<GlusterVolumeTaskStatusForHost> getHostwiseStatusDetails() {
List<GlusterVolumeTaskStatusForHost> statusList = new ArrayList<>();
GlusterVolumeTaskStatusForHost status1 = new GlusterVolumeTaskStatusForHost();
status1.setHostName(SERVER_1);
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.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;
}
Aggregations