Liron Ar has posted comments on this change. Change subject: core: Adding import of unregistered VM template ......................................................................
Patch Set 17: (2 comments) http://gerrit.ovirt.org/#/c/27581/17/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateFromConfigurationCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateFromConfigurationCommand.java: Line 58: getParameters().setImages(getVmTemplate().getImages()); Line 59: return super.canDoAction(); Line 60: } Line 61: Line 62: private void init() { there's already an init method upper in the hirerchy, please change the name. Line 63: VmTemplate vmFromConfiguration; Line 64: ovfEntityData = Line 65: getUnregisteredOVFDataDao().getByEntityIdAndStorageDomain(getParameters().getContainerId(), Line 66: getParameters().getStorageDomainId()); http://gerrit.ovirt.org/#/c/27581/17/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfHelper.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfHelper.java: Line 62: * @return Line 63: * VmTemplate that represents the given ovf data Line 64: * @throws OvfReaderException Line 65: */ Line 66: public VmTemplate readVmTemplateFromOvf(String ovf) throws OvfReaderException { the logic here should be the same as in /org/ovirt/engine/core/bll/storage/GetTemplatesFromExportDomainQuery.java (and the query should use this instead to not have it duplicated).. Line 67: VmTemplate vmTemplate = new VmTemplate(); Line 68: ArrayList<DiskImage> diskImages = new ArrayList<DiskImage>(); Line 69: ArrayList<VmNetworkInterface> interfaces = new ArrayList<VmNetworkInterface>(); Line 70: ovfManager.ImportTemplate(ovf, vmTemplate, diskImages, interfaces); -- To view, visit http://gerrit.ovirt.org/27581 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4fc184e687cbeebf4aa732c901f98222d5b11097 Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches