Liron Ar has posted comments on this change. Change subject: engine: Validate that IDE disk is not read-only ......................................................................
Patch Set 5: (1 comment) http://gerrit.ovirt.org/#/c/23953/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java: Line 100: return failCanDoAction(VdcBllMessages.CANNOT_ADD_FLOATING_DISK_WITH_PLUG_VM_SET); Line 101: } Line 102: Line 103: DiskValidator diskValidator = getDiskValidator(getParameters().getDiskInfo()); Line 104: if (!validate(diskValidator.isReadOnlyPropertyCompatibleWithInterface())) { > I completely understand you opinion. 1. It is IMO, having the code shorter makes it easier to understand and to maintain, at least as i see it. 2. The fact that today we have two methods, doesn't mean IMO that we should add a third one..better option IMO would be to merge the other two that we have today in a later patch. 3. you try to validate if the interface is supported for a disk when it's attached to a vm, which is disk interface validation. I don't see a reason to add a new method, let's wait for other opinions on that. Anyway, The intention is not to block this change, but i think that it's better approach. Line 105: return false; Line 106: } Line 107: Line 108: if (DiskStorageType.IMAGE == getParameters().getDiskInfo().getDiskStorageType()) { -- To view, visit http://gerrit.ovirt.org/23953 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I441362adf2f4833b034ede4093fc8195debd2ed5 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Cheryn Tan <cheryn...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches