Michael Pasternak has posted comments on this change.
Change subject: DO NOT SUBMIT api: Adding support for clone vm from snapshot
......................................................................
Patch Set 18: (7 inline comments)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
Line 82:
please reformat rows 82-77
Line 97: : Guid.Empty;
please reformat rows 97-95
Line 99: String snapshotId = getSnapshotId(vm.getSnapshots());
what is the meaning of empty GUID (snapshotId) in this context?
Line 112: cloneVmFromSnapshot(staticVm,
iiuc you suppose to pass here vmConfiguration.getStaticData() and not staticVm
cause you mapped vm data in to vmConfiguration.getStaticData() L105 and not to
staticVm
also make sure vmConfiguration has all template data for vm as at L78,
otherwise you ignoring it, i.e vm may contain only one property defined while
to create new vm you need all static data stored in vm's template
Line 124: : storageDomainId);
please reformat rows 124-122
Line 161: private Response cloneVmFromSnapshot(VmStatic staticVm, Snapshots
snapshots, Disks disks) {
do you need this signature?
Line 180: Guid sourceSnapshotId =
Guid.createGuidFromString(snapshots.getSnapshots().get(0).getId());
use infrastructure convenience method 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: 18
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