Allon Mureinik has posted comments on this change.

Change subject: core: move unplugged disks while VM is running
......................................................................


Patch Set 1:

(7 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveDisksCommand.java
Line 113:             else if (vm.isRunningAndQualifyForDisksMigration()) {
Line 114:                 if (!isAllDisksPlugged(moveDiskParamsList)) {
Line 115:                     // Cannot live migrate and move disks concurrently
Line 116:                     addDisksDeactivatedMessage(moveDiskParamsList);
Line 117:                     continue;
why not just early return false here, and in all the others?
Line 118:                 }
Line 119: 
Line 120:                 // Adding parameters for live migrate
Line 121:                 
liveMigrateVmDisksParametersList.add(createLiveMigrateVmDisksParameters(moveDiskParamsList,
 vm.getId()));


Line 191:         for (VdcActionParametersBase parameters : parametersList) {
Line 192:             parameters.setSessionId(getParameters().getSessionId());
Line 193:         }
Line 194: 
Line 195:         return new ArrayList<>(parametersList);
why not just return parameterList inplace?
Line 196:     }
Line 197: 
Line 198:     /**
Line 199:      * Return true if all specified disks are plugged; otherwise 
false.


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java
Line 361:     protected VmValidator createVmValidator() {
Line 362:         return new VmValidator(getVm());
Line 363:     }
Line 364: 
Line 365:     private boolean isVmNotInPreview() {
why is this relevant to this patch?
Line 366:         return 
validate(createSnapshotsValidator().vmNotInPreview(getVmId()));
Line 367:     }
Line 368: 
Line 369:     protected SnapshotsValidator createSnapshotsValidator() {


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/MoveDisksCommandTest.java
Line 132:         initDiskImage(diskImageId);
Line 133:         initVm(VMStatus.Down, Guid.newGuid(), diskImageId, false);
Line 134: 
Line 135:         command.updateParameters();
Line 136:         assertTrue(command.getMoveDiskParametersList().size() == 1);
use assertEquals
Line 137:     }
Line 138: 
Line 139:     @Test
Line 140:     public void moveUnpluggedDiskVmUp() {


Line 143:         initDiskImage(diskImageId);
Line 144:         initVm(VMStatus.Up, Guid.newGuid(), diskImageId, false);
Line 145: 
Line 146:         command.updateParameters();
Line 147:         assertTrue(command.getMoveDiskParametersList().size() == 1);
use assertEquals
Line 148:     }
Line 149: 
Line 150:     @Test
Line 151:     public void moveDiskAndLiveMigrateDisk() {


Line 181: 
Line 182:         command.updateParameters();
Line 183:         assertTrue(command.getReturnValue()
Line 184:                 .getCanDoActionMessages()
Line 185:                 
.contains(VdcBllMessages.ACTION_TYPE_FAILED_DISKS_DEACTIVATED.toString()));
use CanDoActionTestUtils
Line 186:     }
Line 187: 
Line 188:     /** Initialize Entities */
Line 189: 


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommandTest.java
Line 204: 
Line 205:         assertFalse(command.canDoAction());
Line 206:         assertTrue(command.getReturnValue()
Line 207:                 .getCanDoActionMessages()
Line 208:                 
.contains(VdcBllMessages.ACTION_TYPE_FAILED_VM_IN_PREVIEW.toString()));
Use CanDoActionTestUtils
Line 209:     }
Line 210: 
Line 211:     /** Initialize Entities */
Line 212: 


-- 
To view, visit http://gerrit.ovirt.org/19105
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie0fbfd95c0086cfe0d792b3071a2d804ff32c18e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@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

Reply via email to