Mike Kolesnik has posted comments on this change.
Change subject: DO NOT SUBMIT core: Introducing AddVmFromSnapshot command
......................................................................
Patch Set 24: (6 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromSnapshotCommand.java
Line 44: private Map<Guid, DiskImage> diskImagesFromClientMap;
minor: IMHO map/list/array in the variable names is usually redundant..
Line 57: public NGuid getStoragePoolId() {
Can you please move this method after the ctors?
Line 236: vmFromConfiguration = getVmFromConfiguration();
What if VM from configuration is null?
You will get an NPE somewhere later in the code..
Line 310: getSnapshotDao().updateStatus(sourceSnapshotId,
SnapshotStatus.LOCKED);
No need to snapshot the status, it is taken care of by
lockVmWithCompensationIfNeeded()
Line 320: protected boolean validateQuota() {
Wouldn't it be better (specifically in this case) to extract the 2 methods
getQuotaIdFromSourc eVmEntity and getImagesForQuotaValidation in the parent
command (AddVmCommand) and override them there, instead of copy paste the
entire code?
Line 368: freeLock();
Why freelock?
--
To view, visit http://gerrit.ovirt.org/2300
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ac7e0c801faf6bca9932c5ed47dc6a065c1ac51
Gerrit-PatchSet: 24
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches