Roy Golan has posted comments on this change.
Change subject: core: adding OvfHelper
......................................................................
Patch Set 5: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfHelper.java
Line 22: VM vm = new VM();
Line 23: ArrayList<DiskImage> diskImages = new ArrayList<DiskImage>();
Line 24: ArrayList<VmNetworkInterface> interfaces = new
ArrayList<VmNetworkInterface>();
Line 25: ovfManager.ImportVm(ovf, vm, diskImages, interfaces);
Line 26:
probably not scoped for this patch (nor you specifically) - I suggest to move
those 2 lines below into OvfManager.
This kind of api is really hard to use - we're passing ovf,vm,disks,interfaces
just so we would set those on the vm later? not very clear...
I'd rather want to see:
public VM from(String ovf) {
vm = create a new VM from that string....
vm....
vm.setIntefaces(...)
vm.setImages(...)
return vm
}
and this would render readVmFromOvf quite skinny and maybe not very neccesary
Line 27: // add images
Line 28: vm.setImages(diskImages);
Line 29: // add interfaces
Line 30: vm.setInterfaces(interfaces);
--
To view, visit http://gerrit.ovirt.org/15626
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3bfc4094178d90e7b0583db4e427fc2b195a367d
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches