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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to