Daniel Erez has posted comments on this change.

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


Patch Set 2:

(5 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveDisksCommand.java
Line 138:             Map<Boolean, List<VM>> allVmsForDisk = 
getVmDAO().getForDisk(diskImage.getId());
Line 139:             List<VM> vmsForPluggedDisk = 
allVmsForDisk.get(Boolean.TRUE);
Line 140:             List<VM> vmsForUnpluggedDisk = 
allVmsForDisk.get(Boolean.FALSE);
Line 141: 
Line 142:             VM vm = vmsForPluggedDisk != null ? 
vmsForPluggedDisk.get(0) :
Done
Line 143:                     vmsForUnpluggedDisk != null ? 
vmsForUnpluggedDisk.get(0) : null;
Line 144: 
Line 145:             addDiskToMap(diskImage, vmsForPluggedDisk, 
vmsForUnpluggedDisk);
Line 146:             MultiValueMapUtils.addToMap(vm, moveDiskParameters, 
vmDisksMap);


Line 197: 
Line 198:     /**
Line 199:      * Return true if all specified disks are plugged; otherwise 
false.
Line 200:      */
Line 201:     private boolean isAllDisksPlugged(List<MoveDiskParameters> 
moveDiskParamsList) {
Done
Line 202:         return isAllDisksPlugged(moveDiskParamsList, true);
Line 203:     }
Line 204: 
Line 205:     /**


Line 208:     private boolean isAllDisksUnplugged(List<MoveDiskParameters> 
moveDiskParamsList) {
Line 209:         return isAllDisksPlugged(moveDiskParamsList, false);
Line 210:     }
Line 211: 
Line 212:     private boolean isAllDisksPlugged(List<MoveDiskParameters> 
moveDiskParamsList, boolean plugged) {
Done
Line 213:         for (MoveDiskParameters moveDiskParameters : 
moveDiskParamsList) {
Line 214:             DiskImage diskImage = 
diskMap.get(moveDiskParameters.getImageId());
Line 215:             if (diskImage.getPlugged() != plugged) {
Line 216:                 return false;


Line 219: 
Line 220:         return true;
Line 221:     }
Line 222: 
Line 223:     private List<String> 
getUnpluggedDisksAliases(List<MoveDiskParameters> moveDiskParamsList) {
Done
Line 224:         List<String> unpluggedDisks = new LinkedList<>();
Line 225:         for (MoveDiskParameters moveDiskParameters : 
moveDiskParamsList) {
Line 226:             DiskImage diskImage = 
diskMap.get(moveDiskParameters.getImageId());
Line 227:             if (!diskImage.getPlugged()) {


....................................................
File 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
Line 129: VM_NOT_FOUND=VM not found
Line 130: ACTION_TYPE_FAILED_VM_IN_PREVIEW=Cannot ${action} ${type}. VM is 
previewing a Snapshot.
Line 131: ACTION_TYPE_FAILED_DISKS_LOCKED=Cannot ${action} ${type}: The 
following disks are locked: ${diskAliases}. Please try again in a few minutes.
Line 132: ACTION_TYPE_FAILED_DISKS_ILLEGAL=Cannot ${action} ${type}. The 
following attached disks are in ILLEGAL status: ${diskAliases} - please remove 
them and try again.
Line 133: ACTION_TYPE_FAILED_DISKS_DEACTIVATED=Cannot ${action} ${type}. The 
following disks are deactivated: ${diskAliases}. Please activate them and try 
again.
Done
Line 134: ACTION_TYPE_FAILED_IMPORT_DISKS_ALREADY_EXIST=Cannot ${action} 
${type}. The following disks already exist: ${diskAliases}. Please import as a 
clone.
Line 135: ACTION_TYPE_FAILED_VM_IS_LOCKED=Cannot ${action} ${type}: VM is 
locked. Please try again in a few minutes.
Line 136: ACTION_TYPE_FAILED_VM_DURING_EXPORT=Cannot ${action} ${type}: VM is 
being exported now. Please try again in a few minutes.
Line 137: ACTION_TYPE_FAILED_VM_IMAGE_IS_ILLEGAL=Cannot ${action} ${type}. VM's 
Image might be corrupted.


-- 
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: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Cheryn Tan <cheryn...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@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