Michal Skrivanek has posted comments on this change. Change subject: core: validate max lun disk attachment ......................................................................
Patch Set 2: (2 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java Line 117: if (getDiskLunMapDao().getDiskIdByLunId(lun.getLUN_id()) != null) { Line 118: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_LUN_IS_ALREADY_IN_USE); Line 119: } Line 120: Line 121: return isDiskPassPciAndIdeLimit(getParameters().getDiskInfo()); how about some meaningful return code/error message so I know what and why failed? Line 122: } Line 123: Line 124: private boolean checkIfImageDiskCanBeAdded(VM vm) { Line 125: boolean returnValue; Line 130: returnValue = false; Line 131: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_POOL_OF_VM_NOT_MATCH); Line 132: } Line 133: returnValue = returnValue Line 134: && checkImageConfiguration() I suppose the above comment is relevant here as well Line 135: && (vm == null || isDiskPassPciAndIdeLimit(getParameters().getDiskInfo())); Line 136: returnValue = returnValue && (vm == null || performImagesChecks(vm)); Line 137: Line 138: if (returnValue && !hasFreeSpace(getStorageDomain())) { -- To view, visit http://gerrit.ovirt.org/9409 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a82b3ed85c89beb8df70315ad457f54b366d69d Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches