Gilad Chaplik has uploaded a new change for review. Change subject: core: vdsSelector: remove method used once (10/15) ......................................................................
core: vdsSelector: remove method used once (10/15) I want to reduce method count, all methods names sounds the same to me. method removed: getVdsRunOnDestination(bool) Change-Id: Iecedcd6b9b754dbd853304d58083a556dab51cfa Signed-off-by: Gilad Chaplik <[email protected]> --- M backend/manager/modules/sla/src/main/java/org/ovirt/engine/core/sla/VdsSelector.java 1 file changed, 4 insertions(+), 17 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/13212/1 diff --git a/backend/manager/modules/sla/src/main/java/org/ovirt/engine/core/sla/VdsSelector.java b/backend/manager/modules/sla/src/main/java/org/ovirt/engine/core/sla/VdsSelector.java index 92b76dc..3c25487 100644 --- a/backend/manager/modules/sla/src/main/java/org/ovirt/engine/core/sla/VdsSelector.java +++ b/backend/manager/modules/sla/src/main/java/org/ovirt/engine/core/sla/VdsSelector.java @@ -60,7 +60,10 @@ public Guid getVdsToRunOn(boolean isMigrate) { Guid result = Guid.Empty; if (getDestinationVdsId() != null) { - result = getVdsRunOnDestination(isMigrate); + VDS target_vds = DbFacade.getInstance().getVdsDao().get(getDestinationVdsId()); + log.infoFormat("Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}", + getDestinationVdsId(), target_vds.getName(), target_vds.getHostName()); + result = getVdsToRunOn(new ArrayList<VDS>(Arrays.asList(new VDS[] { target_vds })), isMigrate); if (result.equals(Guid.Empty) && privateVm.getMigrationSupport() != MigrationSupport.PINNED_TO_HOST) { result = getAnyVdsToRunOn(isMigrate); } @@ -93,22 +96,6 @@ } return returnValue; - } - - /** - * Get the ID of the VDS. - * getDestinationVdsId() must not be null. - * @return - */ - private Guid getVdsRunOnDestination(boolean isMigrate) { - Guid result = Guid.Empty; - if (getDestinationVdsId() != null) { - VDS target_vds = DbFacade.getInstance().getVdsDao().get(getDestinationVdsId()); - log.infoFormat("Checking for a specific VDS only - id:{0}, name:{1}, host_name(ip):{2}", - getDestinationVdsId(), target_vds.getName(), target_vds.getHostName()); - result = getVdsToRunOn(new ArrayList<VDS>(Arrays.asList(new VDS[] { target_vds })), isMigrate); - } - return result; } private Guid getAnyVdsToRunOn(boolean isMigrate) { -- To view, visit http://gerrit.ovirt.org/13212 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecedcd6b9b754dbd853304d58083a556dab51cfa Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
