Daniel Erez has posted comments on this change. Change subject: webadmin: Repair disallow RO in UI ......................................................................
Patch Set 3: (6 comments) http://gerrit.ovirt.org/#/c/27665/3//COMMIT_MSG Commit Message: Line 6: Line 7: webadmin: Repair disallow RO in UI Line 8: Line 9: Qemu currently does not support Direct-LUN disks connected using Line 10: Virt-IO-SCSI. This patch blocks this option from UI when adding a new s/Virt-IO-SCSI/VirtIO-SCSI Line 11: LUN disk with Virt-IO-SCSI interface to a VM. Line 12: In Add Disk to Vm view, When RO checkbox is disabled, it is not checked. Line 13: IDE behaviour was changed to comply with this behaviour in this patch as well. Line 14: This patch also removes un-needed verfication for IDE disk. Line 7: webadmin: Repair disallow RO in UI Line 8: Line 9: Qemu currently does not support Direct-LUN disks connected using Line 10: Virt-IO-SCSI. This patch blocks this option from UI when adding a new Line 11: LUN disk with Virt-IO-SCSI interface to a VM. s/LUN/DirectLUN Line 12: In Add Disk to Vm view, When RO checkbox is disabled, it is not checked. Line 13: IDE behaviour was changed to comply with this behaviour in this patch as well. Line 14: This patch also removes un-needed verfication for IDE disk. Line 15: Line 8: Line 9: Qemu currently does not support Direct-LUN disks connected using Line 10: Virt-IO-SCSI. This patch blocks this option from UI when adding a new Line 11: LUN disk with Virt-IO-SCSI interface to a VM. Line 12: In Add Disk to Vm view, When RO checkbox is disabled, it is not checked. * s/Vm view/VM dialog Line 13: IDE behaviour was changed to comply with this behaviour in this patch as well. Line 14: This patch also removes un-needed verfication for IDE disk. Line 15: Line 16: Change-Id: Ieb1923d03785be7f228076e12f4865242aed5c90 http://gerrit.ovirt.org/#/c/27665/3/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 667: getIsReadOnly().setEntity(false); Line 668: return; Line 669: } Line 670: Line 671: boolean isVirtIoScsiLun = Boolean.FALSE.equals(getIsInternal().getEntity()) && diskInterface == DiskInterface.VirtIO_SCSI; Just for readability - instead of 'isVirtIoScsiLun' flag, try adding isDirectLUN flag and replace condition with: * if (diskInterface == DiskInterface.VirtIO_SCSI && isDirectLUN) Line 672: if (isVirtIoScsiLun) { Line 673: getIsReadOnly().setChangeProhibitionReason(CONSTANTS.cannotEnableVirtIoScsiInterfaceForLunReadOnlyDisk()); Line 674: getIsReadOnly().setIsChangable(false); Line 675: getIsReadOnly().setEntity(false); Line 782: if (dataCenter != null && dataCenter.getQuotaEnforcementType() == QuotaEnforcementTypeEnum.HARD_ENFORCEMENT) { Line 783: getQuota().validateSelectedItem(new IValidation[] { new NotEmptyQuotaValidation() }); Line 784: } Line 785: Line 786: /*getDiskInterface().validateEntity(new IValidation[] { new IValidation() { remove commented section :) Line 787: @Override Line 788: public ValidationResult validate(Object value) { Line 789: ValidationResult result = new ValidationResult(); Line 790: http://gerrit.ovirt.org/#/c/27665/3/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java File frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java: Line 2235: Line 2236: @DefaultStringValue("An IDE disk can't be read-only.") Line 2237: String cannotEnableIdeInterfaceForReadOnlyDisk(); Line 2238: Line 2239: @DefaultStringValue("A VirtIO-ISCSI LUN disk can't be read-only.") s/LUN/DirectLUN Line 2240: String cannotEnableVirtIoScsiInterfaceForLunReadOnlyDisk(); Line 2241: Line 2242: @DefaultStringValue("Global Maintenance Enabled") Line 2243: String haGlobalMaintenance(); -- To view, visit http://gerrit.ovirt.org/27665 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb1923d03785be7f228076e12f4865242aed5c90 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master 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-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
