Sergey Gotliv has posted comments on this change. Change subject: backend, restapi: Add read-only disk functionality ......................................................................
Patch Set 15: (3 comments) Vered, I accepted all proposed changes, let's wait a little bit for more reviews/comments and I will apply another patch set. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java Line 122: @Override Line 123: protected boolean canDoAction() { Line 124: if (!isVmExist() || !isDiskExist(getOldDisk())) { Line 125: return false; Line 126: } else { Yes, I meant that :-). I didn't read a content of "if" just "if". I will change it! Line 127: getOldDisk().setReadOnly(vmDeviceForVm.getIsReadOnly()); Line 128: } Line 129: Line 130: if (!canRunActionOnNonManagedVm()) { Line 316: return null; Line 317: } Line 318: Line 319: private void updateDeviceProperties() { Line 320: if (!getOldDisk().getReadOnly().equals(getNewDisk().getReadOnly())) { Done Line 321: VmDevice device = getVmDeviceDao().get(new VmDeviceId(getOldDisk().getId(), getVmId())); Line 322: device.setIsReadOnly(getNewDisk().getReadOnly()); Line 323: getVmDeviceDao().update(device); Line 324: } .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java Line 332: doReturn(imageDao).when(command).getImageDao(); Line 333: doReturn(vmDeviceDAO).when(command).getVmDeviceDao(); Line 334: doReturn(vmDAO).when(command).getVmDAO(); Line 335: doNothing().when(command).updateVmDisksAndDevice(); Line 336: doReturn(diskDao).when(command).getDiskDao(); Done Line 337: doNothing().when(vmStaticDAO).incrementDbGeneration(any(Guid.class)); Line 338: Line 339: ejbRule.mockResource(ContainerManagedResourceType.TRANSACTION_MANAGER, new DummyTransactionManager()); Line 340: -- To view, visit http://gerrit.ovirt.org/15409 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I124176e8feb91b601a71e76dd63051648ec4353a Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@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: Michael Pasternak <mpast...@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