Liron Ar has posted comments on this change.
Change subject: core, restapi: Introducing support for attaching disk snapshot
......................................................................
Patch Set 6:
(4 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
Line 125: }
Line 126:
Line 127: protected Disk loadDisk(Guid diskId) {
Line 128: if (getParameters().getSnapshotId() == null) {
Line 129: return getDiskDao().get((Guid)
getParameters().getEntityInfo().getId());
this would be changed to diskId
Line 130: } else {
Line 131: return
getDiskImageDao().getDiskSnapshotForVmSnapshot(diskId,
getParameters().getSnapshotId());
Line 132: }
Line 133: }
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
Line 54:
Line 55: // Check if disk has no snapshots before detaching it.
Line 56: if (retValue && DiskStorageType.IMAGE ==
disk.getDiskStorageType()) {
Line 57: // if a disk snapshot is attached, it can be detached if
the snapshot as currently
Line 58: // a user can attach a disk snapshot from another vm only.
the comment should be rewritten :)
Line 59: if (vmDevice.getSnapshotId() == null &&
getDiskImageDao().getAllSnapshotsForImageGroup(disk.getId()).size() > 1) {
Line 60:
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_DETACH_DISK_WITH_SNAPSHOT);
Line 61: retValue = false;
Line 62: }
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/BaseDiskDao.java
Line 22: * @param vmId
Line 23: * the VM id
Line 24: * @return attached disks snapshots to the VM with the specified
id.
Line 25: */
Line 26: List<BaseDisk> getVmAttachedDiskSnapshots(Guid vmId);
possibly would move to DIskImageDAO
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskDao.java
Line 89: * @return The boot disk that is attached to the specified VM,
null if no attached disk is defined as boot.
Line 90: */
Line 91: Disk getVmBootDisk(Guid vmId);
Line 92:
Line 93:
would be removed
Line 94: /**
Line 95: * Returns the Disk with the specified id, with optional filtering.
Line 96: *
Line 97: * @param id
--
To view, visit http://gerrit.ovirt.org/17679
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I02579bf1a91cd294a5040acf432f1fdb87eb18c1
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[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