Sergey Gotliv has posted comments on this change.

Change subject: backend,webadmin: Enable virtual drive size extension
......................................................................


Patch Set 9: (12 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
Line 46:     }
Line 47: 
Line 48:     @Override
Line 49:     protected void endWithFailure() {
Line 50:         super.endWithFailure();    //To change body of overridden 
methods use File | Settings | File Templates.
My bad! Probably used Ctrl-O insteat of Ctrl-F12 in IntelliJ.
Line 51:     }
Line 52: 
Line 53:     protected void performPlugCommand(VDSCommandType commandType,
Line 54:                                       Disk disk, VmDevice vmDevice) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
Line 76:             }
Line 77:         }
Line 78:         if (shouldResizeDiskImage()) {
Line 79:             exclusiveLock.put(getOldDisk().getId().toString(),
Line 80:                     
LockMessagesMatchUtil.makeLockingPair(LockingGroup.DISK, 
VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED));
I didn't change previous logic: there is a shared lock for VM and exclusive 
locks for VM_DISK_BOOT and DISK(for resize)
Line 81:         }
Line 82:         return exclusiveLock.isEmpty() ? null : exclusiveLock;
Line 83:     }
Line 84: 


Line 438:                 getOldDisk().getPropagateErrors().getValue() != 
getNewDisk().getPropagateErrors().getValue() ||
Line 439:                 getOldDisk().isWipeAfterDelete() != 
getNewDisk().isWipeAfterDelete() ||
Line 440:                 getOldDisk().isShareable() != 
getNewDisk().isShareable() ||
Line 441:                 
!StringUtils.equalsIgnoreCase(getOldDisk().getDiskDescription(), 
getNewDisk().getDiskDescription()) ||
Line 442:                 
!StringUtils.equalsIgnoreCase(getOldDisk().getDiskAlias(), 
getNewDisk().getDiskAlias());
Done
Line 443:     }
Line 444: 
Line 445:     private boolean shouldUpdateImageProperties() {
Line 446:         return (getOldDisk().getDiskStorageType() == 
DiskStorageType.IMAGE) &&


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmDiskCommandTest.java
Line 51: import static org.mockito.Mockito.doReturn;
Line 52: import static org.mockito.Mockito.mock;
Line 53: import static org.mockito.Mockito.spy;
Line 54: import static org.mockito.Mockito.when;
Line 55: import static org.ovirt.engine.core.utils.MockConfigRule.mockConfig;
Done
Line 56: 
Line 57: @RunWith(MockitoJUnitRunner.class)
Line 58: public class UpdateVmDiskCommandTest {
Line 59: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/ImageDao.java
Line 8: /**
Line 9:  * <code>ImageDAO</code> defines a type for performing CRUD operations 
on instances of {@link Image}.
Line 10:  */
Line 11: public interface ImageDao extends GenericDao<Image, Guid>, 
StatusAwareDao<Guid, ImageStatus> {
Line 12:     public void updateQuotaForImageAndSnapshots(Guid imageGroupId, 
NGuid quotaId);
This file will be removed from the path.
Line 13: 
Line 14:     public void updateImageVmSnapshotId(Guid id, Guid vmSnapshotId);


....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ExtendVmDiskSizeVDSCommand.java
Line 19:         );
Line 20: 
Line 21:         ProceedProxyReturnValue();
Line 22: 
Line 23:         if(getVDSReturnValue().getSucceeded()) {
Done
Line 24:             setReturnValue(result.getImageSize());
Line 25:         }
Line 26:     }
Line 27: 


....................................................
Commit Message
Line 5: CommitDate: 2013-07-07 17:32:08 +0300
Line 6: 
Line 7: backend,webadmin: Enable virtual drive size extension
Line 8: 
Line 9: This patch provides the user the ability to extend virtual
Done
Line 10: disk size online (when VM is running or paused) and offline
Line 11: (when VM is down or suspended).
Line 12: 
Line 13: This functionality is exposed through the REST API and UI:


Line 11: (when VM is down or suspended).
Line 12: 
Line 13: This functionality is exposed through the REST API and UI:
Line 14: in UI -
Line 15:     go to "Virtual Machines" tab and pickup VM
Done
Line 16:     go to the "Disks" sub tab and pickup the disk
Line 17:     click on "Edit" and insert value into "Extend size by(GB)" input
Line 18:     field
Line 19: 


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/AbstractDiskModel.java
Line 224:     }
Line 225: 
Line 226:     public AbstractDiskModel() {
Line 227:         setSizeExtend(new EntityModel());
Line 228:         getSizeExtend().setEntity(String.valueOf(0));
Done
Line 229: 
Line 230:         setIsAttachDisk(new EntityModel());
Line 231:         getIsAttachDisk().setEntity(false);
Line 232:         getIsAttachDisk().getEntityChangedEvent().addListener(this);


Line 785:         }
Line 786:     }
Line 787: 
Line 788:     protected boolean isVmDown() {
Line 789:         return getVm() != null && getVm().getStatus() == 
VMStatus.Down;
I meant to use getVm().isDown().
Line 790:     }


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditDiskModel.java
Line 152:     }
Line 153: 
Line 154:     private boolean isExtendImageSizeAllowed() {
Line 155:         return (Boolean) AsyncDataProvider.getConfigValuePreConverted(
Line 156:                 ConfigurationValues.ExtendImageSize, 
getVm().getVdsGroupCompatibilityVersion().toString()) &&
Done
Line 157:         VdcActionUtils.CanExecute(Arrays.asList(getVm()), VM.class, 
VdcActionType.ExtendImageSize);
Line 158:     }


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
Line 724: 
Line 725:     protected void updateExtendImageSizeEnabled() {
Line 726:         isExtendImageSizeEnabled = (Boolean) 
AsyncDataProvider.getConfigValuePreConverted(
Line 727:                 ConfigurationValues.ExtendImageSize, 
getEntity().getVdsGroupCompatibilityVersion().toString()) &&
Line 728:                 VdcActionUtils.CanExecute(Arrays.asList(getEntity()), 
VM.class, VdcActionType.ExtendImageSize);
Done
Line 729:     }
Line 730: 
Line 731:     @Override
Line 732:     protected String getListName() {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie702348a68a26ac02a01f66aaa1ea42c2c675ebb
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: A Burden <abur...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@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: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to