Change in ovirt-engine[ovirt-engine-3.6]: core: Fix match disk profile to storage domain

tnisan at redhat.com tnisan at redhat.com
Tue Sep 27 08:47:09 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Fix match disk profile to storage domain
......................................................................


core: Fix match disk profile to storage domain

Problem cause:

A. When a template has a disk which is allocated to more than one
storage domain, it will contain for that disk image:
 - A list of storage domains
 - A list of disk profiles that belong to each storage domain

B. Creating a VM from that template using REST will :
 - Select the first storage domain from the list
 - Select the first disk profile from the list

Note : VM creation via UI selects a specific storage domain and a
specific disk profile which is associated with that storage domain.
There is no option to leave these values empty -
unlike a REST call where these values can be dismissed.

Consequence:
In cases where the selected disk profile is not associated with
the selected storage domain -
the VM will not be created due to this inconsistency.

Fix:
The disk profile is selected according to the selected
storage domain (out of the possible storage domains).

Change-Id: I2fd4b91842d8f8f6de5cb5e5a538e335c0fcfede
Bug-Url: https://bugzilla.redhat.com/1364792
Signed-off-by: yquinn <yquinn at redhat.com>
(cherry picked from commit 276df6effc6d14bc99fec4f75dfef97f30ef8d0d)
Signed-off-by: Yanir Quinn <yquinn at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmFromExternalProviderCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateVmDisksCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelperTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
19 files changed, 260 insertions(+), 32 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Roy Golan: Looks good to me, approved
  Yanir Quinn: Verified



-- 
To view, visit https://gerrit.ovirt.org/63146
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fd4b91842d8f8f6de5cb5e5a538e335c0fcfede
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Yanir Quinn <yquinn at redhat.com>
Gerrit-Reviewer: Andrej Krejcir <akrejcir at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenny Tokar <jtokar at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Phillip Bailey <phbailey at redhat.com>
Gerrit-Reviewer: Roman Mohr <rmohr at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Yanir Quinn <yquinn at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list