Omer Frenkel has posted comments on this change.
Change subject: core: prevent disabling VirtIO-SCSI on edit VM
......................................................................
Patch Set 1:
(2 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
Line 371: return
failCanDoAction(VdcBllMessages.VIRTIO_SCSI_INTERFACE_IS_NOT_AVAILABLE_FOR_CLUSTER_LEVEL);
Line 372: }
Line 373:
Line 374: if
(Boolean.FALSE.equals(getParameters().isVirtioScsiEnabled())) {
Line 375: List<Disk> allDisks = getDiskDao().getAllForVm(getVmId(),
true);
this list already fetched in this method, please reuse it
Line 376: for (Disk disk : allDisks) {
Line 377: if (disk.getDiskInterface() ==
DiskInterface.VirtIO_SCSI) {
Line 378: return
failCanDoAction(VdcBllMessages.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS);
Line 379: }
Line 372: }
Line 373:
Line 374: if
(Boolean.FALSE.equals(getParameters().isVirtioScsiEnabled())) {
Line 375: List<Disk> allDisks = getDiskDao().getAllForVm(getVmId(),
true);
Line 376: for (Disk disk : allDisks) {
shouldn't you check only for active/plugged disks? (not sure if
'offline'/'inactive' notation exist for disk, if not relevant so ignore this
comment)
Line 377: if (disk.getDiskInterface() ==
DiskInterface.VirtIO_SCSI) {
Line 378: return
failCanDoAction(VdcBllMessages.CANNOT_DISABLE_VIRTIO_SCSI_PLUGGED_DISKS);
Line 379: }
Line 380: }
--
To view, visit http://gerrit.ovirt.org/19637
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic2e6c85a2df434de3180f19a32079f276458d372
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Cheryn Tan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[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