Daniel Erez has posted comments on this change.

Change subject: core: Introduce TryBackToCinderSnapshotCommand.
......................................................................


Patch Set 19:

(5 comments)

https://gerrit.ovirt.org/#/c/42062/19/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/TryBackToCinderSnapshotCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/TryBackToCinderSnapshotCommand.java:

Line 39: updateOldImageActive
supdateOldImageActive/updateOldImageAsActive


Line 80: findImageForSameDrive
The naming here is really confusing... maybe change to 
getImageIdBySnapshotType. btw, why not moving these methods to ImagesHandler 
for re-use and to make it clearer.


Line 87:         }
Line 88: 
Line 89:         DiskImage oldImage = 
getDiskImageDao().getSnapshotById(oldImageId);
Line 90:         oldImage.setActive(active);
Line 91:          getImageDao().update(oldImage.getImage());
formatter
Line 92:     }
Line 93: 
Line 94:     private CinderDisk initializeNewCinderVolumeDisk(Guid newVolumeId) 
{
Line 95:         CinderDisk clonedDiskFromSnapshot =  (CinderDisk) 
getDiskDao().get(getParameters().getContainerId());


Line 91:          getImageDao().update(oldImage.getImage());
Line 92:     }
Line 93: 
Line 94:     private CinderDisk initializeNewCinderVolumeDisk(Guid newVolumeId) 
{
Line 95:         CinderDisk clonedDiskFromSnapshot =  (CinderDisk) 
getDiskDao().get(getParameters().getContainerId());
same
Line 96: 
Line 97:         // override volume type and volume format to Unassigned and 
unassigned for Cinder.
Line 98:         clonedDiskFromSnapshot.setVolumeType(VolumeType.Unassigned);
Line 99:         
clonedDiskFromSnapshot.setvolumeFormat(VolumeFormat.Unassigned);


Line 93: 
Line 94:     private CinderDisk initializeNewCinderVolumeDisk(Guid newVolumeId) 
{
Line 95:         CinderDisk clonedDiskFromSnapshot =  (CinderDisk) 
getDiskDao().get(getParameters().getContainerId());
Line 96: 
Line 97:         // override volume type and volume format to Unassigned and 
unassigned for Cinder.
please extract to CinderBroker (e.g. reuse volumeToCinderDisk if possible)
Line 98:         clonedDiskFromSnapshot.setVolumeType(VolumeType.Unassigned);
Line 99:         
clonedDiskFromSnapshot.setvolumeFormat(VolumeFormat.Unassigned);
Line 100:         clonedDiskFromSnapshot.setImageStatus(ImageStatus.LOCKED);
Line 101:         clonedDiskFromSnapshot.setCreationDate(new Date());


-- 
To view, visit https://gerrit.ovirt.org/42062
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I532fed7fe11a033c8b86251e5ad8b73230801c2d
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to