Maor Lipchuk has submitted this change and it was merged.
Change subject: core:Cleanup for BaseImageCommand
......................................................................
core:Cleanup for BaseImageCommand
The next changes/fixes are introduced:
1.Using the disk id to fetch the VM id which contains the disk,
instead using the container id.
2.Clean clone and update image method from BaseImagesCommand.
This method was never called and does not has any reason to be in the
code.
The vmId initialized in the cloned VM from the container id is not
necessery in the BE, since all the
calling methods are not using this parameter, and the vm id should not
be part of the image state in the DB.
3. Remove use of container id when previewing a snapshot -
Use vm id instead of container id when previewing a snapshot.
4. Remove container id use when create snapshot.
5. Clean unlogic code
The initialization which is deleted is already done in getImage method.
The code which is deleted represents the following logic:
a = b;
if (a == null) then get(b.id)
if a is null then b is also null and there will be an NPE.
Change-Id: Ida5aa7be5d5193a0e15d89a7888bdc0a8c15b083
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/BaseImagesCommand.java
1 file changed, 5 insertions(+), 53 deletions(-)
Approvals:
Maor Lipchuk: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/4644
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida5aa7be5d5193a0e15d89a7888bdc0a8c15b083
Gerrit-PatchSet: 21
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>