Sergey Gotliv has posted comments on this change.
Change subject: engine: Split update of 'isPlugged' and 'bootOrder'
properties...
......................................................................
Patch Set 5:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
Line 76: }
Line 77:
Line 78: oldVmDevice = getVmDeviceDao().get(new
VmDeviceId(getDisk().getId(), getVmId()));
Line 79: if (getPlugAction() == VDSCommandType.HotPlugDisk &&
oldVmDevice.getIsPlugged()) {
Line 80: return
failCanDoAction(VdcBllMessages.HOT_PLUG_DISK_IS_NOT_UNPLUGGED);
Done
Line 81: }
Line 82:
Line 83: if (getPlugAction() == VDSCommandType.HotUnPlugDisk &&
!oldVmDevice.getIsPlugged()) {
Line 84: return
failCanDoAction(VdcBllMessages.HOT_UNPLUG_DISK_IS_NOT_PLUGGED);
Line 80: return
failCanDoAction(VdcBllMessages.HOT_PLUG_DISK_IS_NOT_UNPLUGGED);
Line 81: }
Line 82:
Line 83: if (getPlugAction() == VDSCommandType.HotUnPlugDisk &&
!oldVmDevice.getIsPlugged()) {
Line 84: return
failCanDoAction(VdcBllMessages.HOT_UNPLUG_DISK_IS_NOT_PLUGGED);
Removed one whitespace
Line 85: }
Line 86:
Line 87: return true;
Line 88: }
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDeviceDAOTest.java
Line 188: dao.updateHotPlugDisk(vmDevice);
Line 189: dao.get(getExistingEntityId());
Line 190: assertEquals(vmDevice.getIsPlugged(), newPluggedValue);
Line 191: }
Line 192:
Done
Line 193: public void testUpdateBootOrder() {
Line 194: VmDevice vmDevice = dao.get(getExistingEntityId());
Line 195: int newBootOrderValue = vmDevice.getBootOrder() + 1;
Line 196:
Assert.assertTrue(StringUtils.isNotBlank(vmDevice.getAddress()));
--
To view, visit http://gerrit.ovirt.org/19311
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1359a34a48a6261e22631ff1640d81d735e8c490
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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