Michael Pasternak has posted comments on this change.

Change subject: DO NOT SUBMIT api: Adding support for clone vm from snapshot
......................................................................


Patch Set 24: (5 inline comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
Line 97:         if (vm.isSetSnapshots() && 
!getSnapshotId(vm.getSnapshots()).equals(Guid.Empty.toString())) {
isn't it's simpler to do: 

vm.isSetSnapshots() && !vm.isSetSnapshots().isEmpty() ?

Line 113:                 getMapFromDisks(vm.getDisks());
this is ^ ain't needed.

Line 134:     private void mapDisks(Disks from, Collection<DiskImage> to) {
can't see usage for this method.

Line 171:                 DiskImage diskImage = DiskMapper.map(disk, null);
1. that's ^ not the way to call mapper, do
getMapper(Disk.class, DiskImage.class).map(disk, null);

2. wasn't you suppose to merge vm.disk and vmConfiguration.getDisks() ?

Line 181:         Guid sourceSnapshotId = 
Guid.createGuidFromString(snapshots.getSnapshots().get(0).getId());
remember: use asGuid() instead

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8b8285cfe193a1d501c28af042021f4649bc299
Gerrit-PatchSet: 24
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to