Hello Gilad Chaplik,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/15821
to review the following change.
Change subject: core: VdsSelector: remove method used only once
......................................................................
core: VdsSelector: remove method used only once
Removing method: 'getAnyVdsToRunOn(boolean)'.
To improve code readability.
Gerrit-cntr: 1
Change-Id: I25d289c0fcfaa31ec5a4f9e5a0b35dea68693840
Signed-off-by: Gilad Chaplik <[email protected]>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsSelector.java
1 file changed, 6 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/21/15821/1
diff --git
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsSelector.java
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsSelector.java
index 57cb912..f9e22db 100644
---
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsSelector.java
+++
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/VdsSelector.java
@@ -75,11 +75,12 @@
log.infoFormat("Checking for a specific VDS only - id:{0},
name:{1}, host_name(ip):{2}",
getDestinationVdsId(), targetVds.getName(),
targetVds.getHostName());
result = getVdsToRunOn(new ArrayList<VDS>(Arrays.asList(new VDS[]
{ targetVds })), isMigrate);
- if (result.equals(Guid.Empty) && privateVm.getMigrationSupport()
!= MigrationSupport.PINNED_TO_HOST) {
- result = getAnyVdsToRunOn(isMigrate);
- }
- } else {
- result = getAnyVdsToRunOn(isMigrate);
+ }
+ if (getDestinationVdsId() == null || result.equals(Guid.Empty)
+ && privateVm.getMigrationSupport() !=
MigrationSupport.PINNED_TO_HOST) {
+ result = getVdsToRunOn(DbFacade.getInstance()
+ .getVdsDao()
+ .getAllOfTypes(new VDSType[] { VDSType.VDS,
VDSType.oVirtNode }), isMigrate);
}
return result;
@@ -112,12 +113,6 @@
}
return returnValue;
- }
-
- private Guid getAnyVdsToRunOn(boolean isMigrate) {
- return getVdsToRunOn(DbFacade.getInstance()
- .getVdsDao()
- .getAllOfTypes(new VDSType[] { VDSType.VDS, VDSType.oVirtNode
}), isMigrate);
}
/**
--
To view, visit http://gerrit.ovirt.org/15821
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I25d289c0fcfaa31ec5a4f9e5a0b35dea68693840
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches