Sergey Gotliv has posted comments on this change.
Change subject: [WIP]engine: Remove calls to getImageDomainsList API
......................................................................
Patch Set 3:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyTemplateCommand.java
Line 231: for (DiskImage disk : disksList) {
Line 232: GetImagesListVDSCommandParameters params = new
GetImagesListVDSCommandParameters(
Line 233: imageToDestinationDomainMap.get(disk.getId()),
getStoragePoolId());
Line 234:
Line 235: VDSReturnValue runVdsCommand =
getBackend().getResourceManager().RunVdsCommand(
Done
Line 236: VDSCommandType.GetImagesList, params);
Line 237:
Line 238: if (runVdsCommand.getSucceeded()) {
Line 239: List<Guid> imagesOnStorageDomain = (List<Guid>)
runVdsCommand.getReturnValue();
Line 235: VDSReturnValue runVdsCommand =
getBackend().getResourceManager().RunVdsCommand(
Line 236: VDSCommandType.GetImagesList, params);
Line 237:
Line 238: if (runVdsCommand.getSucceeded()) {
Line 239: List<Guid> imagesOnStorageDomain = (List<Guid>)
runVdsCommand.getReturnValue();
I gave this patch thinking that this optimization is great but can be done
later, but now I completely agree with Liron.
Previous API "getImageDomainsList" couldn't be optimized, because the input was
an image. Now when input is a Storage Domain it can and should be optimized.
Line 240: if (imagesOnStorageDomain.contains(disk.getId())) {
Line 241:
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_ALREADY_CONTAINS_DISK);
Line 242: return false;
Line 243: }
--
To view, visit http://gerrit.ovirt.org/15951
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I33069871db34e8b129c4d80098523654cd2a0629
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: liron aravot <[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