Change in ovirt-engine[master]: core: fix creation of instance-type

ahadas at redhat.com ahadas at redhat.com
Mon May 25 08:33:53 UTC 2015


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 at 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 at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list