Arik Hadas has submitted this change and it was merged.
Change subject: core: fix creation of instance-type
......................................................................
core: fix creation of instance-type
The addition of cinder disks broke creation of instance-type. While
trying to create an instance-type, one would have get NPE in the
AddVmTemplateCommand where cinder disks were about to be added.
The problem was that instance-types are not based on any existing VM so
getVm() returns null. The solution is to check if getVm()!=null before
trying to add cinder disks. This is ok because instance-type don't have
disks and in particular don't have cinder disks.
Change-Id: Idb8b7e439f675fcfe29f403770a5ca52357ab6c4
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
1 file changed, 6 insertions(+), 4 deletions(-)
Approvals:
Tomas Jelinek: Looks good to me, but someone else must approve
Jenkins CI: Looks good to me, but someone else must approve
Omer Frenkel: Looks good to me, approved
Arik Hadas: Verified
--
To view, visit
https://gerrit.ovirt.org/41301
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idb8b7e439f675fcfe29f403770a5ca52357ab6c4
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org