Change in ovirt-engine[master]: restapi: Fix adding customized template with VM name

From Juan Hernandez <juan.hernandez@redhat.com>:
Juan Hernandez has submitted this change and it was merged. Change subject: restapi: Fix adding customized template with VM name ...................................................................... restapi: Fix adding customized template with VM name Currently when a template is added from a virtual machine specifying its name and customizing the disks, there is a NPE when trying to load the disks, because that part of the code assumes that the id of the VM has been provided by the user. This patch changes the code so that it uses the id of the VM retrieved from the database, instead of the id of the VM provided by the user. Change-Id: I9e549ca33333c5fab75980f09cec2ad6c835945e Bug-Url: https://bugzilla.redhat.com/1439970 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResource.java M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResourceTest.java 2 files changed, 48 insertions(+), 35 deletions(-) Approvals: Tomas Jelinek: Looks good to me, but someone else must approve Tal Nisan: Looks good to me, approved Juan Hernandez: Verified Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/75336 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e549ca33333c5fab75980f09cec2ad6c835945e Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjelinek@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
Code Review