Daniel Erez has posted comments on this change. Change subject: core: Disallow RO LUN ISCSI disks in UI ......................................................................
Patch Set 2: (6 comments) http://gerrit.ovirt.org/#/c/27453/2/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/disks/DisksViewColumns.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/disks/DisksViewColumns.java: Line 264: } Line 265: }) { Line 266: @Override Line 267: protected boolean canEdit(EntityModel object) { Line 268: return true; not relevant to patch... Line 269: } Line 270: Line 271: @Override Line 272: public Boolean getValue(EntityModel object) { http://gerrit.ovirt.org/#/c/27453/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/AbstractDiskModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/AbstractDiskModel.java: Line 665: Line 666: protected void updateReadOnlyChangeability() { Line 667: DiskInterface diskInterface = (DiskInterface) getDiskInterface().getSelectedItem(); Line 668: Line 669: if (diskInterface == DiskInterface.IDE) { why by reference instead of using 'equals'? Line 670: getIsReadOnly().setChangeProhibitionReason(CONSTANTS.cannotEnableIdeInterfaceForReadOnlyDisk()); Line 671: getIsReadOnly().setIsChangable(false); Line 672: getIsReadOnly().setEntity(false); Line 673: return; Line 679: getIsReadOnly().setEntity(false); Line 680: return; Line 681: } Line 682: Line 683: getIsReadOnly().setEntity(false); should be reset to false only when not applicable. Line 684: getIsReadOnly().setIsChangable(isEditEnabled()); Line 685: } Line 686: Line 687: private void updatePlugChangeability() { Line 703: } Line 704: } Line 705: Line 706: private void wipeAfterDelete_EntityChanged(EventArgs e) { Line 707: if (!getIsWipeAfterDelete().getIsChangable() && (Boolean) getIsWipeAfterDelete().getEntity()) { not relevant to patch... Line 708: getIsWipeAfterDelete().setEntity(false); Line 709: } Line 710: } Line 711: Line 798: result.setSuccess(false); Line 799: result.getReasons().add(ConstantsManager.getInstance().getConstants().cannotEnableIdeInterfaceForReadOnlyDisk()); Line 800: } Line 801: Line 802: if (Boolean.FALSE.equals(getIsInternal().getEntity()) && is there a need to validate it? as it's being blocked any way... Line 803: getDiskInterface().getSelectedItem() == DiskInterface.VirtIO_SCSI && Line 804: Boolean.TRUE.equals(getIsReadOnly().getEntity())) Line 805: { Line 806: result.setSuccess(false); Line 803: getDiskInterface().getSelectedItem() == DiskInterface.VirtIO_SCSI && Line 804: Boolean.TRUE.equals(getIsReadOnly().getEntity())) Line 805: { Line 806: result.setSuccess(false); Line 807: result.getReasons().add(ConstantsManager.getInstance().getConstants().cannotEnableIdeInterfaceForReadOnlyDisk()); use the new constant: cannotEnableVirtIoScsiInterfaceForLunReadOnlyDisk Line 808: } Line 809: Line 810: return result; Line 811: } -- To view, visit http://gerrit.ovirt.org/27453 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iffe7996a3134b775e95325a58c6659b64ff4da2f Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Vered Volansky <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Sergey Gotliv <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vered Volansky <[email protected]> Gerrit-Reviewer: [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
