Gilad Chaplik has uploaded a new change for review. Change subject: core: vdsSelector: remove method used once (11/15) ......................................................................
core: vdsSelector: remove method used once (11/15) I want to reduce method count, all methods names sounds the same to me. method removed: canRunOnDestinationVds(List<String>, boolean) Change-Id: Icc59b17b52d655bb603abc0706b6e4e07109124b 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, 5 insertions(+), 13 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/13213/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 3c25487..e41677f 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 @@ -77,7 +77,11 @@ public boolean canFindVdsToRunOn(List<String> messages, boolean isMigrate) { boolean returnValue = false; if (getDestinationVdsId() != null) { - returnValue = canRunOnDestinationVds(messages, 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()); + returnValue = canFindVdsToRun(messages, isMigrate, + new ArrayList<VDS>(Arrays.asList(target_vds))); } if (!returnValue) { @@ -102,18 +106,6 @@ return getVdsToRunOn(DbFacade.getInstance() .getVdsDao() .getAllOfTypes(new VDSType[] { VDSType.VDS, VDSType.oVirtNode }), isMigrate); - } - - private boolean canRunOnDestinationVds(List<String> messages, boolean isMigrate) { - boolean returnValue = false; - 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()); - returnValue = canFindVdsToRun(messages, isMigrate, - new ArrayList<VDS>(Arrays.asList(target_vds))); - } - return returnValue; } private boolean canFindAnyVds(List<String> messages, boolean isMigrate) { -- To view, visit http://gerrit.ovirt.org/13213 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc59b17b52d655bb603abc0706b6e4e07109124b 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
