anmolbabu has posted comments on this change. Change subject: engine : Query to fetch list of volumes eligible for geo replication ......................................................................
Patch Set 6: (1 comment) http://gerrit.ovirt.org/#/c/33845/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetEligibleVolumesForGeoRepEnablingQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetEligibleVolumesForGeoRepEnablingQuery.java: Line 21: Guid masterVolumeId = getParameters().getVolumeId(); Line 22: GlusterVolumeEntity masterVolume = getGlusterVolumeDao().getById(masterVolumeId); Line 23: List<VDSGroup> vdsGroups = getDbFacade().getVdsGroupDao().getAll(); Line 24: for (VDSGroup vdsGroup : vdsGroups) { Line 25: if (vdsGroup.getId() != masterVolume.getClusterId() && vdsGroup.getcompatibility_version().equals(getDbFacade().getVdsGroupDao().get(masterVolume.getClusterId()).getcompatibility_version()) && vdsGroup.supportsGlusterService()) { > What you need is a getVdsGroupDao() method similar to getGlusterVolumeDao() Done Line 26: List<GlusterVolumeEntity> volumes = getGlusterVolumeDao().getByClusterId(vdsGroup.getId()); Line 27: for (GlusterVolumeEntity volume : volumes) { Line 28: if (volume.getStatus() == GlusterStatus.UP && volume.getAdvancedDetails().getCapacityInfo().getUsedSize().equals(0L) && volume.getAdvancedDetails().getCapacityInfo().getFreeSize() >= masterVolume.getAdvancedDetails().getCapacityInfo().getUsedSize()) { Line 29: eligibleVolumeList.add(volume); -- To view, visit http://gerrit.ovirt.org/33845 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0fc3ecb15535181f1ca2a8780461cb89788a3f41 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: Ramesh N <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: anmolbabu <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
